- change to use CMAKE_SYSTEM_CPU to prevent CMAKE_SYSTEM_PROCESSOR conflict with zephyr

- change tinyusb CMakeLists.txt to function tinyusb_target_add() instead of defining tinyusb lib target
This commit is contained in:
hathach
2025-01-22 22:31:08 +07:00
parent 91214b4614
commit 6080f89f3d
67 changed files with 171 additions and 239 deletions

View File

@@ -4,7 +4,7 @@ if (M4 STREQUAL "1")
set(MCU_CORE _cm4)
set(JLINK_CORE _M4)
set(LD_FILE_GNU ${SDK_DIR}/devices/${MCU_VARIANT}/gcc/${MCU_VARIANT}xxxxx${MCU_CORE}_ram.ld)
set(CMAKE_SYSTEM_PROCESSOR cortex-m4 CACHE INTERNAL "System Processor")
set(CMAKE_SYSTEM_CPU cortex-m4 CACHE INTERNAL "System Processor")
else ()
set(MCU_CORE _cm7)
set(JLINK_CORE _M7)

View File

@@ -8,8 +8,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
set(MCU_VARIANT_WITH_CORE ${MCU_VARIANT}${MCU_CORE})
# toolchain set up
if (NOT DEFINED CMAKE_SYSTEM_PROCESSOR)
set(CMAKE_SYSTEM_PROCESSOR cortex-m7 CACHE INTERNAL "System Processor")
if (NOT DEFINED CMAKE_SYSTEM_CPU)
set(CMAKE_SYSTEM_CPU cortex-m7 CACHE INTERNAL "System Processor")
endif ()
set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/build_system/cmake/toolchain/arm_${TOOLCHAIN}.cmake)