summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-11-23 12:43:13 +0700
committerhathach <[email protected]>2023-11-23 12:43:13 +0700
commit82880eecbd51ce8cf801ae0c04871e65f81826f4 (patch)
treec22f030dfd488da61173967ac192176bb3cd498f /examples
parent1a98f5389c70d159f359c5bfe369d1cbf3af7475 (diff)
make nanolib linking explicitly by each family/board
Diffstat (limited to 'examples')
-rw-r--r--examples/build_system/make/cpu/cortex-m23.mk14
-rw-r--r--examples/build_system/make/toolchain/arm_gcc_rules.mk4
2 files changed, 14 insertions, 4 deletions
diff --git a/examples/build_system/make/cpu/cortex-m23.mk b/examples/build_system/make/cpu/cortex-m23.mk
new file mode 100644
index 000000000..29542d8e8
--- /dev/null
+++ b/examples/build_system/make/cpu/cortex-m23.mk
@@ -0,0 +1,14 @@
+ifeq ($(TOOLCHAIN),gcc)
+ CFLAGS += \
+ -mthumb \
+ -mcpu=cortex-m23 \
+ -mfloat-abi=soft \
+
+else ifeq ($(TOOLCHAIN),iar)
+ # IAR Flags
+ CFLAGS += --cpu cortex-m23
+ ASFLAGS += --cpu cortex-m23
+endif
+
+# For freeRTOS port source
+FREERTOS_PORTABLE_SRC ?= $(FREERTOS_PORTABLE_PATH)/ARM_CM23
diff --git a/examples/build_system/make/toolchain/arm_gcc_rules.mk b/examples/build_system/make/toolchain/arm_gcc_rules.mk
index b76d4aec3..d295879d9 100644
--- a/examples/build_system/make/toolchain/arm_gcc_rules.mk
+++ b/examples/build_system/make/toolchain/arm_gcc_rules.mk
@@ -31,10 +31,6 @@ ifdef LD_FILE_GCC
LDFLAGS += -Wl,-T,$(TOP)/$(LD_FILE_GCC)
endif
-ifneq ($(SKIP_NANOLIB), 1)
-LDFLAGS += --specs=nosys.specs --specs=nano.specs
-endif
-
ASFLAGS += $(CFLAGS)
LIBS_GCC ?= -lgcc -lm -lnosys