vdudouyt / stm8flash

program your stm8 devices with SWIM/stlinkv(1,2)
GNU General Public License v2.0
403 stars 183 forks source link

Better error handling #165

Open schneidersoft opened 1 year ago

schneidersoft commented 1 year ago

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.

spth commented 1 year ago

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)