summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-09 21:39:10 +0700
committerhathach <[email protected]>2023-05-09 21:39:10 +0700
commitbc579c045e5d62050f0b58f20fd28fb71e4070a8 (patch)
tree9dfa24ffdf80595882bbee0215639908445f7d95 /examples
parent77f0726361c66bf2783c1ce68e0f00bdd5f58229 (diff)
skip link option --print-memory-usage for renesas rx since it does not support this option
Diffstat (limited to 'examples')
-rw-r--r--examples/rules.mk7
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/rules.mk b/examples/rules.mk
index 3ec3c880b..516beca78 100644
--- a/examples/rules.mk
+++ b/examples/rules.mk
@@ -72,6 +72,11 @@ endif
LDFLAGS += $(CFLAGS) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections
+# Some toolchain such as renesas rx does not support --print-memory-usage flags
+ifneq ($(FAMILY),rx)
+LDFLAGS += -Wl,--print-memory-usage
+endif
+
ifdef LD_FILE
LDFLAGS += -Wl,-T,$(TOP)/$(LD_FILE)
endif
@@ -169,7 +174,7 @@ $(BUILD)/$(PROJECT).hex: $(BUILD)/$(PROJECT).elf
$(BUILD)/$(PROJECT).elf: $(OBJ)
@echo LINK $@
- @$(LD) -o $@ $(LDFLAGS) $^ -Wl,--print-memory-usage -Wl,--start-group $(LIBS) -Wl,--end-group
+ @$(LD) -o $@ $(LDFLAGS) $^ -Wl,--start-group $(LIBS) -Wl,--end-group
endif