move set TOP to family_support.cmake

This commit is contained in:
hathach 2023-05-26 14:56:22 +07:00
parent 23c8670e79
commit c0ecf8b50f
No known key found for this signature in database
GPG Key ID: F5D50C6D51D17CBA
7 changed files with 5 additions and 13 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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})