summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhathach <[email protected]>2023-05-26 14:56:22 +0700
committerhathach <[email protected]>2023-05-26 14:56:22 +0700
commitc0ecf8b50fe68a56b28bed98ecbfc6b236a848ef (patch)
tree542026cc1fa51a2a8312f501afcf79d5ebe1b007
parent23c8670e7910ae0987b789c0a640f7cc9ad951f9 (diff)
move set TOP to family_support.cmake
-rw-r--r--hw/bsp/family_support.cmake3
-rw-r--r--hw/bsp/imxrt/family.cmake3
-rw-r--r--hw/bsp/lpc18/family.cmake2
-rw-r--r--hw/bsp/lpc55/family.cmake2
-rw-r--r--hw/bsp/mcx/family.cmake2
-rw-r--r--hw/bsp/nrf/family.cmake2
-rw-r--r--hw/bsp/rp2040/family.cmake4
7 files changed, 5 insertions, 13 deletions
diff --git a/hw/bsp/family_support.cmake b/hw/bsp/family_support.cmake
index 5bd9a6d75..68a21bc7d 100644
--- a/hw/bsp/family_support.cmake
+++ b/hw/bsp/family_support.cmake
@@ -2,6 +2,9 @@ include_guard()
include(CMakePrintHelpers)
+# TOP is path to root directory
+set(TOP "${CMAKE_CURRENT_LIST_DIR}/../..")
+
# Default to gcc
if (NOT DEFINED TOOLCHAIN)
set(TOOLCHAIN gcc)
diff --git a/hw/bsp/imxrt/family.cmake b/hw/bsp/imxrt/family.cmake
index f9818cde6..a681b0419 100644
--- a/hw/bsp/imxrt/family.cmake
+++ b/hw/bsp/imxrt/family.cmake
@@ -4,9 +4,6 @@ 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 ${TOP}/tools/cmake/toolchain/arm_${TOOLCHAIN}.cmake)
diff --git a/hw/bsp/lpc18/family.cmake b/hw/bsp/lpc18/family.cmake
index c47839a5c..698120077 100644
--- a/hw/bsp/lpc18/family.cmake
+++ b/hw/bsp/lpc18/family.cmake
@@ -4,8 +4,6 @@ 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/lpcopen/lpc18xx/lpc_chip_18xx)
# toolchain set up
diff --git a/hw/bsp/lpc55/family.cmake b/hw/bsp/lpc55/family.cmake
index d6ce0b781..1b9c1a655 100644
--- a/hw/bsp/lpc55/family.cmake
+++ b/hw/bsp/lpc55/family.cmake
@@ -4,8 +4,6 @@ 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)
diff --git a/hw/bsp/mcx/family.cmake b/hw/bsp/mcx/family.cmake
index abca7c90e..1719320e6 100644
--- a/hw/bsp/mcx/family.cmake
+++ b/hw/bsp/mcx/family.cmake
@@ -4,8 +4,6 @@ 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)
diff --git a/hw/bsp/nrf/family.cmake b/hw/bsp/nrf/family.cmake
index 59d4a7947..68b19b33b 100644
--- a/hw/bsp/nrf/family.cmake
+++ b/hw/bsp/nrf/family.cmake
@@ -4,8 +4,6 @@ if (NOT BOARD)
message(FATAL_ERROR "BOARD not specified")
endif ()
-# TOP is path to root directory
-set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..")
set(NRFX_DIR ${TOP}/hw/mcu/nordic/nrfx)
set(CMSIS_DIR ${TOP}/lib/CMSIS_5)
diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake
index 17f206c77..28637e3ee 100644
--- a/hw/bsp/rp2040/family.cmake
+++ b/hw/bsp/rp2040/family.cmake
@@ -16,8 +16,8 @@ if (NOT TARGET _rp2040_family_inclusion_marker)
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
# TOP is absolute path to root directory of TinyUSB git repo
- set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..")
- get_filename_component(TOP "${TOP}" REALPATH)
+ #set(TOP "${CMAKE_CURRENT_LIST_DIR}/../../..")
+ #get_filename_component(TOP "${TOP}" REALPATH)
if (NOT PICO_TINYUSB_PATH)
set(PICO_TINYUSB_PATH ${TOP})