summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2023-05-16 11:04:07 +0700
committerGitHub <[email protected]>2023-05-16 11:04:07 +0700
commite2d3c0b2d3905a5194abb7bb8894e8b6b9c9b7e4 (patch)
tree885ddc96d474aebb7a2d13f2398502ec44c2e3aa /examples
parentf1bef8d8dde1b0e1b7227347606eac37163595fa (diff)
parent116a258858ef3c58639d00346e197bd07ad86952 (diff)
Merge pull request #2065 from hathach/cmake-lpc55
add support for nrf5340 application core with pca10059
Diffstat (limited to 'examples')
-rw-r--r--examples/cmake/cpu/cortex-m33.cmake12
-rw-r--r--examples/cmake/cpu/cortex-m4.cmake12
-rw-r--r--examples/rules.mk4
3 files changed, 26 insertions, 2 deletions
diff --git a/examples/cmake/cpu/cortex-m33.cmake b/examples/cmake/cpu/cortex-m33.cmake
new file mode 100644
index 000000000..fbd5027b1
--- /dev/null
+++ b/examples/cmake/cpu/cortex-m33.cmake
@@ -0,0 +1,12 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ list(APPEND TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m33
+ -mfloat-abi=hard
+ -mfpu=fpv5-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM33_NONSECURE CACHE INTERNAL "")
+else ()
+ # TODO support IAR
+endif ()
diff --git a/examples/cmake/cpu/cortex-m4.cmake b/examples/cmake/cpu/cortex-m4.cmake
new file mode 100644
index 000000000..5a2d16c05
--- /dev/null
+++ b/examples/cmake/cpu/cortex-m4.cmake
@@ -0,0 +1,12 @@
+if (TOOLCHAIN STREQUAL "gcc")
+ list(APPEND TOOLCHAIN_COMMON_FLAGS
+ -mthumb
+ -mcpu=cortex-m4
+ -mfloat-abi=hard
+ -mfpu=fpv4-sp-d16
+ )
+
+ set(FREERTOS_PORT GCC_ARM_CM4F CACHE INTERNAL "")
+else ()
+ # TODO support IAR
+endif ()
diff --git a/examples/rules.mk b/examples/rules.mk
index 516beca78..426000128 100644
--- a/examples/rules.mk
+++ b/examples/rules.mk
@@ -86,7 +86,7 @@ LDFLAGS += -Wl,-T,$(TOP)/$(GCC_LD_FILE)
endif
ifneq ($(SKIP_NANOLIB), 1)
-LDFLAGS += -specs=nosys.specs -specs=nano.specs
+LDFLAGS += --specs=nosys.specs --specs=nano.specs
endif
ASFLAGS += $(CFLAGS)
@@ -230,7 +230,7 @@ JLINK_IF ?= swd
# Flash using jlink
flash-jlink: $(BUILD)/$(PROJECT).hex
@echo halt > $(BUILD)/$(BOARD).jlink
- @echo r > $(BUILD)/$(BOARD).jlink
+ @echo r >> $(BUILD)/$(BOARD).jlink
@echo loadfile $^ >> $(BUILD)/$(BOARD).jlink
@echo r >> $(BUILD)/$(BOARD).jlink
@echo go >> $(BUILD)/$(BOARD).jlink