mirror of
https://github.com/Klipper3d/klipper.git
synced 2026-03-05 01:24:41 -07:00
Automate the process of build .srec file, and added print-openblt-vector-table-cs-offset helper, that prints BOOT_FLASH_VECTOR_TABLE_CS_OFFSET value for OpenBLT bootloader.
This commit is contained in:
parent
8fe0d35e41
commit
ecfeb45485
1 changed files with 14 additions and 0 deletions
|
|
@ -92,11 +92,25 @@ src-$(CONFIG_HAVE_GPIO_SDIO) += stm32/sdio.c
|
|||
|
||||
# Binary output file rules
|
||||
target-y += $(OUT)klipper.bin
|
||||
target-y += $(OUT)klipper.srec
|
||||
|
||||
$(OUT)klipper.bin: $(OUT)klipper.elf
|
||||
@echo " Creating bin file $@"
|
||||
$(Q)$(OBJCOPY) -O binary $< $@
|
||||
|
||||
$(OUT)klipper.srec: $(OUT)klipper.bin
|
||||
@echo " Creating srec file $@"
|
||||
$(Q)$(OBJCOPY) -I binary -O srec --change-addresses "$(CONFIG_FLASH_APPLICATION_ADDRESS)" $< $@
|
||||
|
||||
# Print OpenBLT BOOT_FLASH_VECTOR_TABLE_CS_OFFSET
|
||||
print-openblt-vector-table-cs-offset:
|
||||
@addr=`$(OBJDUMP) -s -j .text $(OUT)klipper.elf | grep ee11aa55 | awk '{print $$1}'`; \
|
||||
if [ -z "$$addr" ]; then \
|
||||
echo "Pattern not found"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
printf "BOOT_FLASH_VECTOR_TABLE_CS_OFFSET: 0x%X\n" $$((0x$$addr - $(CONFIG_FLASH_APPLICATION_ADDRESS)))
|
||||
|
||||
# Flash rules
|
||||
lib/hidflash/hid-flash:
|
||||
@echo " Building hid-flash"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue