diff options
| author | iabdalkader <i.abdalkader@gmail.com> | 2024-12-11 13:17:47 +0100 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-02-14 12:08:03 +1100 |
| commit | 842e3617a0f152f837b2e8cc4e9d4efae6cb52a4 (patch) | |
| tree | 3fe8e172e10aaae0191a211a0e566a57e9cb748a | |
| parent | b675c87992b8b62ca8b18a05862e9c7b9427b9de (diff) | |
renesas-ra/Makefile: Remove id_code section from binary file generation.
The linker scripts for most of these microcontrollers contain a
non-contiguous flash section for the ID code that results in big binary
files, which exceed the flash size. This commit removes the ID code
section from the main firmware binary, and outputs it to a separate binary,
which can be deployed manually if ID code is enabled.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
| -rw-r--r-- | ports/renesas-ra/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ports/renesas-ra/Makefile b/ports/renesas-ra/Makefile index dd70f56d7..03eb9b52b 100644 --- a/ports/renesas-ra/Makefile +++ b/ports/renesas-ra/Makefile @@ -442,7 +442,8 @@ endef define GENERATE_BIN $(ECHO) "GEN $(1)" - $(Q)$(OBJCOPY) -I ihex -O binary $(2) $(1) + $(Q)$(OBJCOPY) -O binary -j .id_code $(2) $(BUILD)/id_code.bin + $(Q)$(OBJCOPY) -O binary --remove-section=.id_code $(2) $(1) endef define GENERATE_HEX @@ -452,7 +453,7 @@ endef .PHONY: -$(BUILD)/firmware.bin: $(BUILD)/firmware.hex +$(BUILD)/firmware.bin: $(BUILD)/firmware.elf $(call GENERATE_BIN,$@,$^) $(BUILD)/firmware.hex: $(BUILD)/firmware.elf |
