Skip to content

Commit

Permalink
Fix srec_cat metadata offset
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ThirteenFish committed May 25, 2024
1 parent ccb5b04 commit 178ab4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolchain/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ ifeq ($(USE_BOOTLOADER),yes)
POST_MAKE_ALL_RULE_HOOK:
python3 $(TOOLCHAIN)/f0_pack_image.py $(BUILDDIR)/$(PROJECT).bin $(BUILDDIR)/$(PROJECT).crc32.bin $(DATE)
@# Convert the crc32 bin file to a hex file that can be written to the STM32F0 with 'make write'
srec_cat $(BUILDDIR)/$(PROJECT).crc32.bin -binary -offset 0x0800A000 -o $(BUILDDIR)/$(PROJECT).bin.hex -Intel -Line_Length 44
srec_cat $(BUILDDIR)/$(PROJECT).crc32.bin -binary -offset 0x0800A7F4 -o $(BUILDDIR)/$(PROJECT).bin.hex -Intel -Line_Length 44
mv $(BUILDDIR)/$(PROJECT).hex $(BUILDDIR)/$(PROJECT).origional.hex
cp $(BUILDDIR)/$(PROJECT).bin.hex $(BUILDDIR)/$(PROJECT).hex
xxd -i $(BUILDDIR)/$(PROJECT).crc32.bin > $(BUILDDIR)/$(PROJECT).crc32.bin.h
Expand Down

0 comments on commit 178ab4d

Please sign in to comment.