From e8dd200fed6adeebd98ebc7abf09d45285da7abf Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 19 May 2023 14:46:39 +0700 Subject: [PATCH] move cmake folder to tools/ --- .idea/vcs.xml | 61 ------------------- hw/bsp/imxrt/family.cmake | 8 +-- hw/bsp/lpc55/family.cmake | 13 ++-- hw/bsp/nrf/family.cmake | 3 +- .../cmake/cpu/cortex-m33.cmake | 0 {examples => tools}/cmake/cpu/cortex-m4.cmake | 0 {examples => tools}/cmake/cpu/cortex-m7.cmake | 0 .../cmake/toolchain/arm_gcc.cmake | 0 .../cmake/toolchain/set_flags.cmake | 0 9 files changed, 12 insertions(+), 73 deletions(-) rename {examples => tools}/cmake/cpu/cortex-m33.cmake (100%) rename {examples => tools}/cmake/cpu/cortex-m4.cmake (100%) rename {examples => tools}/cmake/cpu/cortex-m7.cmake (100%) rename {examples => tools}/cmake/toolchain/arm_gcc.cmake (100%) rename {examples => tools}/cmake/toolchain/set_flags.cmake (100%) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 63371256f..94a25f7f4 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,67 +1,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake index a475b4721..e9be7acc8 100644 --- a/hw/bsp/imxrt/family.cmake +++ b/hw/bsp/imxrt/family.cmake @@ -8,9 +8,12 @@ if (NOT BOARD) message(FATAL_ERROR "BOARD not specified") endif () +# TOP is path to root directory +set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..") + # toolchain set up set(CMAKE_SYSTEM_PROCESSOR cortex-m7 CACHE INTERNAL "System Processor") -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/../../../examples/cmake/toolchain/arm_${TOOLCHAIN}.cmake) +set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake) set(FAMILY_MCUS MIMXRT CACHE INTERNAL "") @@ -24,9 +27,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake) # only need to be built ONCE for all examples set(BOARD_TARGET board_${BOARD}) if (NOT TARGET ${BOARD_TARGET}) - # TOP is path to root directory - set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..") - set(SDK_DIR ${TOP}/hw/mcu/nxp/mcux-sdk) set(CMSIS_DIR ${TOP}/lib/CMSIS_5) diff --git a/hw/bsp/lpc55/family.cmake b/hw/bsp/lpc55/family.cmake index 0ac2b6ce3..439f54170 100644 --- a/hw/bsp/lpc55/family.cmake +++ b/hw/bsp/lpc55/family.cmake @@ -8,9 +8,14 @@ if (NOT BOARD) message(FATAL_ERROR "BOARD not specified") endif () +# TOP is path to root directory +set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..") +set(SDK_DIR ${TOP}/hw/mcu/nxp/mcux-sdk) +set(CMSIS_DIR ${TOP}/lib/CMSIS_5) + # toolchain set up set(CMAKE_SYSTEM_PROCESSOR cortex-m33 CACHE INTERNAL "System Processor") -set(CMAKE_TOOLCHAIN_FILE ${CMAKE_CURRENT_LIST_DIR}/../../../examples/cmake/toolchain/arm_${TOOLCHAIN}.cmake) +set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake) set(FAMILY_MCUS LPC55XX CACHE INTERNAL "") @@ -24,12 +29,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake) # only need to be built ONCE for all examples set(BOARD_TARGET board_${BOARD}) if (NOT TARGET ${BOARD_TARGET}) - # TOP is path to root directory - set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..") - - set(SDK_DIR ${TOP}/hw/mcu/nxp/mcux-sdk) - set(CMSIS_DIR ${TOP}/lib/CMSIS_5) - add_library(${BOARD_TARGET} STATIC # external driver #lib/sct_neopixel/sct_neopixel.c diff --git a/hw/bsp/nrf/family.cmake b/hw/bsp/nrf/family.cmake index c8faa23cc..ca28c4f5d 100644 --- a/hw/bsp/nrf/family.cmake +++ b/hw/bsp/nrf/family.cmake @@ -25,10 +25,11 @@ else () set(JLINK_DEVICE ${MCU_VARIANT}_xxaa) endif () -set(CMAKE_TOOLCHAIN_FILE ${TOP}/examples/cmake/toolchain/arm_${TOOLCHAIN}.cmake) +set(CMAKE_TOOLCHAIN_FILE ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake) set(FAMILY_MCUS NRF5X CACHE INTERNAL "") + #------------------------------------ # BOARD_TARGET #------------------------------------ diff --git a/examples/cmake/cpu/cortex-m33.cmake b/tools/cmake/cpu/cortex-m33.cmake similarity index 100% rename from examples/cmake/cpu/cortex-m33.cmake rename to tools/cmake/cpu/cortex-m33.cmake diff --git a/examples/cmake/cpu/cortex-m4.cmake b/tools/cmake/cpu/cortex-m4.cmake similarity index 100% rename from examples/cmake/cpu/cortex-m4.cmake rename to tools/cmake/cpu/cortex-m4.cmake diff --git a/examples/cmake/cpu/cortex-m7.cmake b/tools/cmake/cpu/cortex-m7.cmake similarity index 100% rename from examples/cmake/cpu/cortex-m7.cmake rename to tools/cmake/cpu/cortex-m7.cmake diff --git a/examples/cmake/toolchain/arm_gcc.cmake b/tools/cmake/toolchain/arm_gcc.cmake similarity index 100% rename from examples/cmake/toolchain/arm_gcc.cmake rename to tools/cmake/toolchain/arm_gcc.cmake diff --git a/examples/cmake/toolchain/set_flags.cmake b/tools/cmake/toolchain/set_flags.cmake similarity index 100% rename from examples/cmake/toolchain/set_flags.cmake rename to tools/cmake/toolchain/set_flags.cmake