microchip-pic-avr-tools / pymcuprog

a Python utility for programming various Microchip MCU devices using Microchip CMSIS-DAP based debuggers
MIT License
96 stars 22 forks source link

Error return code when --verify fails #38

Closed strawberryhacker closed 7 months ago

strawberryhacker commented 11 months ago

Request: return error code when --verify fails

I am running this comand and captures the return code:

$ sudo pymcuprog write -d avr64ea48 -i updi --verify -f build/out.hex && echo Status code: $?

gives status code 0 when it fails

Writing flash...
Verifying flash...
pymcuprog.programmer - ERROR - Verify failed for flash memory:
pymcuprog.programmer - ERROR - Verify mismatch starting at location 0x000000: 0x0C vs 0xFF (is the memory section erased?)
Verification failed!
Done.
Status code: 0

and status code 0 when it succeeds

Writing flash...
Verifying flash...
OK
Done.
Status code: 0
xedbg commented 11 months ago

Oh dear, that is not good and should be fixed. Logged as DSG-6409

pic-avr-github-admin commented 7 months ago

Fixed in 3.16 release.