-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
imgtool custom TLV disregards endian and always uses big endian #1846
Labels
Comments
This issue has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this issue will automatically be closed in 14 days. Note, that you can always re-open a closed issue at any time. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This was originally (a long time ago) reported to the wrong repository: apache/mynewt-mcumgr#152
The issue with imgtool is that the value of
--custom-tlv
is always encoded in big-endian format, one might assume that selecting the endian of the output would determine this but it does not, and according to https:/mcu-tools/mcuboot/blob/main/boot/bootutil/include/bootutil/boot_status.h#L156 actually should not because all fields must be in little endian, therefore imgtool has a bug in this functionality.Example:
The following is the raw bytes from the hex file (taken from JFlash):
00 AA 00 04 00 22 55 00 11
, as can be seen 0x22550011 is wrongly added in big endian format.The text was updated successfully, but these errors were encountered: