diff --git a/Libraries/zephyr/MAX/CMakeLists.txt b/Libraries/zephyr/MAX/CMakeLists.txt index eb6414c4039..69499e2acd4 100644 --- a/Libraries/zephyr/MAX/CMakeLists.txt +++ b/Libraries/zephyr/MAX/CMakeLists.txt @@ -40,6 +40,7 @@ set(MSDK_PERIPH_INC_DIR ${MSDK_PERIPH_DIR}/Include/${TARGET_UC}) zephyr_include_directories( ./Include + ${MSDK_LIBRARY_DIR}/CMSIS/Include ${MSDK_CMSIS_DIR}/Include ${MSDK_PERIPH_INC_DIR} ) diff --git a/Libraries/zephyr/MAX/Source/MAX32655/CMakeLists.txt b/Libraries/zephyr/MAX/Source/MAX32655/CMakeLists.txt index cdc901c73bb..c78155ea5c1 100644 --- a/Libraries/zephyr/MAX/Source/MAX32655/CMakeLists.txt +++ b/Libraries/zephyr/MAX/Source/MAX32655/CMakeLists.txt @@ -48,14 +48,18 @@ zephyr_include_directories( ${MSDK_PERIPH_SRC_DIR}/WUT ) +if(CONFIG_ARM) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_max32655.c) + zephyr_library_sources(${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c) +elseif(CONFIG_RISCV) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_riscv_max32655.c) +endif() + zephyr_library_sources( ./max32xxx_system.c - ${MSDK_CMSIS_DIR}/Source/system_max32655.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_assert.c ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_delay.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c ${MSDK_PERIPH_SRC_DIR}/SYS/pins_me17.c ${MSDK_PERIPH_SRC_DIR}/SYS/sys_me17.c diff --git a/Libraries/zephyr/MAX/Source/MAX32680/CMakeLists.txt b/Libraries/zephyr/MAX/Source/MAX32680/CMakeLists.txt index bcdfad4f30e..03458b6a9e8 100644 --- a/Libraries/zephyr/MAX/Source/MAX32680/CMakeLists.txt +++ b/Libraries/zephyr/MAX/Source/MAX32680/CMakeLists.txt @@ -48,14 +48,18 @@ zephyr_include_directories( ${MSDK_PERIPH_SRC_DIR}/WUT ) +if(CONFIG_ARM) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_max32680.c) + zephyr_library_sources(${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c) +elseif(CONFIG_RISCV) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_riscv_max32680.c) +endif() + zephyr_library_sources( ./max32xxx_system.c - ${MSDK_CMSIS_DIR}/Source/system_max32680.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_assert.c ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_delay.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c ${MSDK_PERIPH_SRC_DIR}/SYS/pins_me20.c ${MSDK_PERIPH_SRC_DIR}/SYS/sys_me17.c diff --git a/Libraries/zephyr/MAX/Source/MAX32690/CMakeLists.txt b/Libraries/zephyr/MAX/Source/MAX32690/CMakeLists.txt index add3ddc5e1b..53afa9fe036 100644 --- a/Libraries/zephyr/MAX/Source/MAX32690/CMakeLists.txt +++ b/Libraries/zephyr/MAX/Source/MAX32690/CMakeLists.txt @@ -51,14 +51,18 @@ zephyr_include_directories( ${MSDK_PERIPH_SRC_DIR}/WUT ) +if(CONFIG_ARM) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_max32690.c) + zephyr_library_sources(${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c) +elseif(CONFIG_RISCV) + zephyr_library_sources(${MSDK_CMSIS_DIR}/Source/system_riscv_max32690.c) +endif() + zephyr_library_sources( ./max32xxx_system.c - ${MSDK_CMSIS_DIR}/Source/system_max32690.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_assert.c ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_delay.c - ${MSDK_PERIPH_SRC_DIR}/SYS/mxc_lock.c ${MSDK_PERIPH_SRC_DIR}/SYS/pins_me18.c ${MSDK_PERIPH_SRC_DIR}/SYS/sys_me18.c