diff options
| author | Reinhard Panhuber <[email protected]> | 2021-03-10 19:33:11 +0100 |
|---|---|---|
| committer | Reinhard Panhuber <[email protected]> | 2021-03-10 19:33:11 +0100 |
| commit | 8cb3bd3cd30172d3023facb2522a435b414a3b7e (patch) | |
| tree | 1bc65aa35561cc43f4fab139a3a6e2654b110faa /examples/rules.mk | |
| parent | d5a5a1cab63e8e43b22f13db95df35afdfa6befb (diff) | |
| parent | a397353916db36d925f5aec654fc66d5ca09f427 (diff) | |
Merge remote-tracking branch 'upstream/edpt_ISO_xfer' into edpt_ISO_xfer
Diffstat (limited to 'examples/rules.mk')
| -rw-r--r-- | examples/rules.mk | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/examples/rules.mk b/examples/rules.mk index d248ed247..a97eb566a 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 @@ -58,11 +63,14 @@ all: $(BUILD) clean: $(RM) -rf $(BUILD) +#flash: flash-pyocd flash: @$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2 else +# --------------------------------------- # GNU Make build system +# --------------------------------------- # libc LIBS += -lgcc -lm -lnosys @@ -93,12 +101,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 @@ -188,6 +195,8 @@ else $(RM) -rf $(BUILD) endif +endif # GNU Make + # Print out the value of a make variable. # https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile print-%: @@ -221,7 +230,6 @@ flash-pyocd: $(BUILD)/$(PROJECT).hex pyocd flash -t $(PYOCD_TARGET) $< pyocd reset -t $(PYOCD_TARGET) -endif # GNU Make #-------------- Artifacts -------------- |
