diff options
| author | iabdalkader <i.abdalkader@gmail.com> | 2023-04-16 17:16:37 +0200 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-09-14 23:34:18 +1000 |
| commit | 09a2ee8e7f45756470f9ca51edd4402fcb0fc39c (patch) | |
| tree | 1e5485d3a184d596ee48688e7a4b16910f50c1c0 | |
| parent | 397697aa8368f45bd0794e22a25083e9e18e3cfe (diff) | |
renesas-ra/Makefile: Generate binary firmware output.
This patch generates a binary firmware image (*.bin) and removes the split
TEXT1/0_ADDR/SECTIONS because it's not configured for this port so it
generates broken binaries.
Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
| -rw-r--r-- | ports/renesas-ra/Makefile | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/ports/renesas-ra/Makefile b/ports/renesas-ra/Makefile index 71d0a2d66..77077d6cc 100644 --- a/ports/renesas-ra/Makefile +++ b/ports/renesas-ra/Makefile @@ -427,7 +427,7 @@ $(PY_BUILD)/formatfloat.o: COPT += -Os $(PY_BUILD)/parsenum.o: COPT += -Os $(PY_BUILD)/mpprint.o: COPT += -Os -all: $(TOP)/lib/fsp/README.md $(BUILD)/firmware.hex +all: $(TOP)/lib/fsp/README.md $(BUILD)/firmware.hex $(BUILD)/firmware.bin # For convenience, automatically fetch required submodules if they don't exist $(TOP)/lib/fsp/README.md: @@ -442,7 +442,7 @@ endef define GENERATE_BIN $(ECHO) "GEN $(1)" - $(Q)$(OBJCOPY) -O binary $(addprefix -j ,$(3)) $(2) $(1) + $(Q)$(OBJCOPY) -I ihex -O binary $(2) $(1) endef define GENERATE_HEX @@ -450,19 +450,10 @@ define GENERATE_HEX $(Q)$(OBJCOPY) -O ihex $(2) $(1) endef -.PHONY: +.PHONY: -# A board should specify TEXT0_ADDR if to use a different location than the -# default for the firmware memory location. A board can also optionally define -# TEXT1_ADDR to split the firmware into two sections; see below for details. -TEXT0_ADDR ?= 0x00000000 - -# No TEXT1_ADDR given so put all firmware at TEXT0_ADDR location - -TEXT0_SECTIONS ?= .isr_vector .text .data - -$(BUILD)/firmware.bin: $(BUILD)/firmware.elf - $(call GENERATE_BIN,$@,$^,$(TEXT0_SECTIONS)) +$(BUILD)/firmware.bin: $(BUILD)/firmware.hex + $(call GENERATE_BIN,$@,$^) $(BUILD)/firmware.hex: $(BUILD)/firmware.elf $(call GENERATE_HEX,$@,$^) |
