Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better error handling #165

Open
schneidersoft opened this issue Apr 20, 2023 · 1 comment
Open

Better error handling #165

schneidersoft opened this issue Apr 20, 2023 · 1 comment

Comments

@schneidersoft
Copy link
Contributor

For all functions read/write/verify the error handling should be improved.

f.i. currently when specifying a verify operation with a byte count that is larger than part->*_size it will be silently reduced. this will result in only a partial verification of the file. i.e. stm8flash may return success even though the contents of the file does not match the contents of the IC.

  • The size should be taken either from the command line or determined from the input file.
  • It should be an error if size given on the command line is larger than the data in the input file.
  • It should be an error if size is larger than the device size.
  • both fread, srec_read and ihex_read must be checked for error condition correctly.
@spth
Copy link
Collaborator

spth commented Apr 25, 2023

IMO these are two issues:

  1. Emit a diagnostic if the input size is larger than the device (one could consider this a bugfix)
  2. Add a command line option for size (this would be a new feature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants