1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 04:15:44 +03:00

EXST - Ensure HEX files are suitable for flashing using the

configurator.

Without the padding and length the HASH in the HEX will be invalid since
erased flash defaults to 0xFF but the hash is created on the binary file
which has a default of 0x00 for un-filled data.
This commit is contained in:
Dominic Clifton 2019-08-08 01:26:34 +02:00
parent 871486527b
commit 577d57ea70

View file

@ -352,7 +352,7 @@ $(TARGET_HEX): $(TARGET_BIN)
$(if $(EXST_ADJUST_VMA),,$(error "EXST_ADJUST_VMA not specified"))
@echo "Creating EXST HEX from patched EXST ELF $(TARGET_HEX), VMA Adjust $(EXST_ADJUST_VMA)" "$(STDOUT)"
$(V1) $(OBJCOPY) -O ihex --adjust-vma $(EXST_ADJUST_VMA) $(TARGET_EXST_ELF) $@
$(V1) $(OBJCOPY) -O ihex --adjust-vma=$(EXST_ADJUST_VMA) --gap-fill=0x00 --pad-to=$(shell echo "$(FIRMWARE_SIZE)" | awk '{printf("0x%08x", (1024*$$1) + $(EXST_ADJUST_VMA));}') $(TARGET_EXST_ELF) $@
endif