summaryrefslogtreecommitdiff
path: root/examples/build_system/make/cpu
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-05-15 20:13:00 +0700
committerhathach <[email protected]>2024-05-16 19:18:43 +0700
commit2a67ce773dcd68f7f8c4c07fce2e6e4f7947e03d (patch)
tree26bbab78171dbc8d63e20e4149eb3689344c94be /examples/build_system/make/cpu
parentdb60fa1c63ae58c205e43e144253dab6815bb2d1 (diff)
change default risv-gcc to riscv-none-elf- and add _zicsr extension
add cmake for ch32v20x, skip freertos examples for CH32V20X, also skip net webserver due to lack of RAM update to use openocd with wlinke adapter
Diffstat (limited to 'examples/build_system/make/cpu')
-rw-r--r--examples/build_system/make/cpu/rv32i-ilp32.mk11
-rw-r--r--examples/build_system/make/cpu/rv32imac-ilp32.mk10
2 files changed, 14 insertions, 7 deletions
diff --git a/examples/build_system/make/cpu/rv32i-ilp32.mk b/examples/build_system/make/cpu/rv32i-ilp32.mk
index a465baf4c..af764afc5 100644
--- a/examples/build_system/make/cpu/rv32i-ilp32.mk
+++ b/examples/build_system/make/cpu/rv32i-ilp32.mk
@@ -1,12 +1,15 @@
ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
- -march=rv32i \
+ -march=rv32i_zicsr \
-mabi=ilp32 \
-else ifeq ($(TOOLCHAIN),iar)
- #CFLAGS += --cpu cortex-a53
- #ASFLAGS += --cpu cortex-a53
+else ifeq ($(TOOLCHAIN),clang)
+ CFLAGS += \
+ -march=rv32i_zicsr \
+ -mabi=ilp32 \
+else ifeq ($(TOOLCHAIN),iar)
+ $(error not support)
endif
# For freeRTOS port source
diff --git a/examples/build_system/make/cpu/rv32imac-ilp32.mk b/examples/build_system/make/cpu/rv32imac-ilp32.mk
index 2b6493e48..19c322ebc 100644
--- a/examples/build_system/make/cpu/rv32imac-ilp32.mk
+++ b/examples/build_system/make/cpu/rv32imac-ilp32.mk
@@ -1,11 +1,15 @@
ifeq ($(TOOLCHAIN),gcc)
CFLAGS += \
- -march=rv32imac \
+ -march=rv32imac_zicsr \
+ -mabi=ilp32 \
+
+else ifeq ($(TOOLCHAIN),clang)
+ CFLAGS += \
+ -march=rv32imac_zicsr \
-mabi=ilp32 \
else ifeq ($(TOOLCHAIN),iar)
- #CFLAGS += --cpu cortex-a53
- #ASFLAGS += --cpu cortex-a53
+ $(error not support)
endif