Self-Verify failed on non-aligned hex files
Closed this issue · 6 comments
I used this code to understand what is going on UBHA's side and it was very helpful but I found out that some hex files with non-aligned hex addresses cannot be programmed on dsPIC33 devices (like :10D6940073xxxxx). The same thing happend on my onboard programmer which employed Zephyr OS to reproduce UBHA actions. I fixed the issue by putting extra heading 0xFF before the sent data and it worked for me.
Hello @amink-liquip and thank you for the bug report!
Please run mcbootflash with the --verbose
flag and include the output in a comment to this issue.
If possible, please also include a copy of the problematic HEX file. If you do not wish to upload it to the public bug tracker, you can send it to me privately at alexander.bessman@gmail.com.
The full terminal debug output is in this file:
mcbootflash_terminal_output_gh1.txt
Here is the last lines in terminal output:
DEBUG:mcbootflash.flash:RX: 02 90 00 55 00 AA 00 B8 77 05 00
DEBUG:mcbootflash.flash:RX: 01
DEBUG:mcbootflash.flash:TX: 08 90 00 00 00 00 00 B8 77 05 00
DEBUG:mcbootflash.flash:RX: 08 90 00 00 00 00 00 B8 77 05 00
DEBUG:mcbootflash.flash:RX: 01
DEBUG:mcbootflash.flash:RX: 56 B6
DEBUG:mcbootflash.flash:Checksum OK: 46678
DEBUG:mcbootflash.__main__:139480 bytes written of 139472 (100.01%)
DEBUG:mcbootflash.flash:TX: 0A 00 00 00 00 00 00 00 00 00 00
DEBUG:mcbootflash.flash:RX: 0A 00 00 00 00 00 00 00 00 00 00
DEBUG:mcbootflash.flash:RX: FC
ERROR:mcbootflash.__main__:
DEBUG:mcbootflash.__main__:
Traceback (most recent call last):
File "C:\Users\*******\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcbootflash\__main__.py", line 121, in main
mcbf.self_verify(connection)
File "C:\Users\*******\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcbootflash\flash.py", line 252, in self_verify
_send_and_receive(connection, Command(command=CommandCode.SELF_VERIFY))
File "C:\Users\*******\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcbootflash\flash.py", line 397, in _send_and_receive
return _get_response(connection, command)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\*******\AppData\Local\Programs\Python\Python311\Lib\site-packages\mcbootflash\flash.py", line 377, in _get_response
raise bootloader_exceptions[ResponseCode(success[0])]
mcbootflash.error.VerifyFail
@bessman
The Hex file is a simple bulky code and does nothing but sending data on UART, so I put it here for you:
master.X.production.zip
I see you are using mcbootflash 8.0.1. I fixed an alignment bug in 9.0.0, please try the latest version and let me know if it still doesn't work.
I see you are using mcbootflash 8.0.1. I fixed an alignment bug in 9.0.0, please try the latest version and let me know if it still doesn't work.
Yes, it works with the new version, thanks
Thanks for confirming!