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.
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.