Checksum error when microapp binary is an exact multiple of 32
mrquincle opened this issue · 1 comments
mrquincle commented
There seems to be an error when the binary is an exact multiple of 32 bytes. Probably some kind of <
vs <=
boundary issue somewhere.
mrquincle commented
This turned out to be something completely different. During playing around with startup.S
in the microapp repository, there was some shifting around from certain sections which created a .hex
file that was slightly different from the .bin
file. Namely, there was different padding (3 bytes) just before __etext
(in the binary 0x0
, in the hex file 0xFF
). This leads to a different checksum for the uploaded binary (via nrfjprog
) versus the one calculated by the python scripts.
This is fixed by adding fill values for the gaps in the Makefile of the microapp repository
$(TARGET).hex: $(TARGET).elf.deps $(TARGET).elf
@echo "Create hex file from elf file"
@$(OBJCOPY) -O ihex --gap-fill 0x00 $(TARGET).elf $@