summaryrefslogtreecommitdiff
path: root/examples/rules.mk
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-03-02 12:44:28 +0700
committerGitHub <[email protected]>2021-03-02 12:44:28 +0700
commita3a9a5efb91b56429ac75c0a81101dedd524eba0 (patch)
treecd83f56098b7f2022b5875aff6206bdbc9815241 /examples/rules.mk
parent0374e085507cd23124d9cc6d5f2b10565717b72d (diff)
parentb066fdc2c69591412d2b7c9111a122266cd9f87a (diff)
Merge pull request #690 from hathach/submodule-on-the-fly
Submodule on the fly
Diffstat (limited to 'examples/rules.mk')
-rw-r--r--examples/rules.mk16
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/rules.mk b/examples/rules.mk
index d248ed247..2b28a4714 100644
--- a/examples/rules.mk
+++ b/examples/rules.mk
@@ -6,7 +6,9 @@
.DEFAULT_GOAL := all
ifeq ($(FAMILY),esp32s2)
+# ---------------------------------------
# Espressif IDF use CMake build system, this add wrapper target to call idf.py
+# ---------------------------------------
.PHONY: all clean flash
@@ -44,6 +46,9 @@ $(BUILD)/$(PROJECT).uf2: $(BUILD)/$(PROJECT).bin
$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID) -b 0x0 -c -o $@ $^
else ifeq ($(FAMILY),rp2040)
+# ---------------------------------------
+# RP2040 CMake
+# ---------------------------------------
ifeq ($(DEBUG), 1)
CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug
@@ -62,7 +67,9 @@ flash:
@$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2
else
+# ---------------------------------------
# GNU Make build system
+# ---------------------------------------
# libc
LIBS += -lgcc -lm -lnosys
@@ -93,12 +100,11 @@ INC += $(TOP)/src
CFLAGS += $(addprefix -I,$(INC))
-# TODO Skip nanolib for MSP430
-ifeq ($(BOARD), msp_exp430f5529lp)
- LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections
-else
- LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections -specs=nosys.specs -specs=nano.specs
+LDFLAGS += $(CFLAGS) -fshort-enums -Wl,-T,$(TOP)/$(LD_FILE) -Wl,[email protected] -Wl,-cref -Wl,-gc-sections
+ifneq ($(SKIP_NANOLIB), 1)
+LDFLAGS += -specs=nosys.specs -specs=nano.specs
endif
+
ASFLAGS += $(CFLAGS)
# Assembly files can be name with upper case .S, convert it to .s