stm8flash icon indicating copy to clipboard operation
stm8flash copied to clipboard

Better error handling

Open schneidersoft opened this issue 1 year ago • 1 comments

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.

schneidersoft avatar Apr 20 '23 22:04 schneidersoft

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)

spth avatar Apr 25 '23 05:04 spth