After partial review, the following fixes are included : - return used without parentheses. I prefer parentheses, as it allows macros around. For instance, I oftenly use macros like FUNCTION_RETURN(xx) do dump the return code at debug time. Not the case here, so, () removed. - unsigned int total_size. errr. yes ;-) - verification error message changed to Error: verification aborted because of flash read failure. - length > total_size length == total_size is allowed !.
Anything else ?
Stephan.