Skip to content

Commit 178ab4d

Browse files
committed
Fix srec_cat metadata offset
While the *.crc32.bin images are correct, converting them to hex with srec_cat didn't get the updated metadata offset, so make write (but not normal bootloader updates) would write the image in the wrong place.
1 parent ccb5b04 commit 178ab4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toolchain/toolchain.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ifeq ($(USE_BOOTLOADER),yes)
1414
POST_MAKE_ALL_RULE_HOOK:
1515
python3 $(TOOLCHAIN)/f0_pack_image.py $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).crc32.bin $(DATE)
1616
@# Convert the crc32 bin file to a hex file that can be written to the STM32F0 with 'make write'
17-
srec_cat $(BUILDDIR)/$(PROJECT).crc32.bin -binary -offset 0x0800A000 -o $(BUILDDIR)/$(PROJECT).bin.hex -Intel -Line_Length 44
17+
srec_cat $(BUILDDIR)/$(PROJECT).crc32.bin -binary -offset 0x0800A7F4 -o $(BUILDDIR)/$(PROJECT).bin.hex -Intel -Line_Length 44
1818
mv $(BUILDDIR)/$(PROJECT).hex $(BUILDDIR)/$(PROJECT).origional.hex
1919
cp $(BUILDDIR)/$(PROJECT).bin.hex $(BUILDDIR)/$(PROJECT).hex
2020
xxd -i $(BUILDDIR)/$(PROJECT).crc32.bin > $(BUILDDIR)/$(PROJECT).crc32.bin.h

0 commit comments

Comments
 (0)