Skip to content

Commit

Permalink
feat(Other): Enable building zephyr for risc-v targets (#1051)
Browse files Browse the repository at this point in the history
Signed-off-by: Maureen Helm <maureen.helm@analog.com>
  • Loading branch information
MaureenHelm committed Jul 8, 2024
1 parent 713cf98 commit 1d180aa
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 9 deletions.
1 change: 1 addition & 0 deletions Libraries/zephyr/MAX/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down
10 changes: 7 additions & 3 deletions Libraries/zephyr/MAX/Source/MAX32655/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 7 additions & 3 deletions Libraries/zephyr/MAX/Source/MAX32680/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 7 additions & 3 deletions Libraries/zephyr/MAX/Source/MAX32690/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 1d180aa

Please sign in to comment.