Replace makebin with objcopy

Replace custom SDCC tool with the more standard binutils tool.

scratch.rom and flash.rom are different (no unnecessary padding), but
resulting ec.rom is the same.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
This commit is contained in:
Tim Crawford
2022-10-26 12:15:18 -06:00
committed by Tim Crawford
parent 69f97fe149
commit d36fb62cd7
4 changed files with 8 additions and 7 deletions

View File

@@ -32,12 +32,12 @@ SCRATCH_CC=\
# Convert from binary file to C header
$(BUILD)/include/scratch.h: $(SCRATCH_BUILD)/scratch.rom
@mkdir -p $(@D)
xxd -s $(SCRATCH_OFFSET) --include < $< > $@
xxd -include < $< > $@
# Convert from Intel Hex file to binary file
$(SCRATCH_BUILD)/scratch.rom: $(SCRATCH_BUILD)/scratch.ihx
@mkdir -p $(@D)
makebin -p < $< > $@
objcopy -I ihex -O binary $< $@
# Link object files into Intel Hex file
$(SCRATCH_BUILD)/scratch.ihx: $(SCRATCH_OBJ)