Pad binary file to total flash size

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2023-07-12 11:52:36 -06:00
committed by Jeremy Soller
parent 64e5b8308d
commit 0d83819a21
2 changed files with 4 additions and 1 deletions

View File

@ -33,7 +33,7 @@ sim: $(BUILD)/ec.rom
$(BUILD)/ec.rom: $(BUILD)/ec.ihx
@echo " OBJCOPY $(subst $(obj)/,,$@)"
mkdir -p $(@D)
objcopy -I ihex -O binary --gap-fill=0xFF $< $@
objcopy -I ihex -O binary --gap-fill=0xFF --pad-to=$(CONFIG_EC_FLASH_SIZE) $< $@
# Link object files into Intel Hex file
$(BUILD)/ec.ihx: $(OBJ)

View File

@ -27,3 +27,6 @@ ARCH=8051
# 64 KB is the max without banking
CODE_SIZE=65536
# Total flash size: 128 KiB
CONFIG_EC_FLASH_SIZE = 131072