riotboot.mk: get variable as hex rather than dec#11201
riotboot.mk: get variable as hex rather than dec#11201danpetry wants to merge 1 commit intoRIOT-OS:masterfrom
Conversation
Previously, summing hex values using the shell was resulting in a decimal value, meaning the image was flashing in the wrong place.
39dc8da to
c460d8b
Compare
|
rebased to resolve conflicts from #11181 |
Yes. If we precede all hex values by "0x" we ensure that no command can interpret that as decimal. Also, it makes 100% sense that summing hex gives back hex. Running |
|
yep. Could put those changes in a separate PR so #11126 is unblocked soon? |
|
Nice find about JLink interpreting hex values. However, if the issue is JLink misinterpreting the value, jlink.sh should do the conversion. If for any reason another flasher needs a decimal value, then what would we do ? |
But it does not, and now how do we know we are not breaking anything if we "fix" jlink.sh? |
|
I think this one can be closed as #11200 handles it properly. |
Contribution description
Previously, summing two hex values using the shell in this location was resulting in a decimal value, meaning the slot 1 image was flashing in the wrong place when using jlink. (Jlink seems to interpret all flashing values as hex values, even when not preceded by "0x".) This provides a fix.
Suggest making the same change in other locations where
shell echois used to sum hex variables?Testing procedure
tests/riotboot with nrf52dk
tests/riotboot with a board that uses openocd (e.g. samr21-xpro)
Issues/PRs references
Fixes #11126
Dependencies
#11200