From 67d8022c83c332bb21afda64bc10e3ab3d2897d7 Mon Sep 17 00:00:00 2001 From: jake-g00dwin Date: Sun, 22 Feb 2026 19:32:26 -0800 Subject: [PATCH] Fixed up implimentation of object_gen_flags and arch flags to use CMAKE lists style. Tested it by running both the units tests build and the hex build. Both currently build correctly without any issues. --- riscv32-toolchain.cmake | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/riscv32-toolchain.cmake b/riscv32-toolchain.cmake index 9a6b339..d37d0cc 100644 --- a/riscv32-toolchain.cmake +++ b/riscv32-toolchain.cmake @@ -98,23 +98,25 @@ add_compile_definitions(${MCU}=1) # General Flags #------------------- -set(OBJECT_GEN_FLAGS "\ --g \ --Os \ --flto \ --ffunction-sections \ --fdata-sections \ --fmessage-length=0 \ --msmall-data-limit=8 ") + +set(OBJECT_GEN_FLAGS "-g;\ +-Os;\ +-flto;\ +-ffunction-sections;\ +-fdata-sections;\ +-fmessage-length=0;\ +-msmall-data-limit=8") #------------------- # CFLAGS for ARCH #------------------- +# For CH32V003(QingKeV2A) + set(C_FLAGS_ARCH "\ --march=rv32ec \ --mabi=ilp32e \ --I${ALTCLIB} \ +-march=rv32ec;\ +-mabi=ilp32e;\ +-I${ALTCLIB};\ -nostdlib") #-------------------