Skip to content

Commit

Permalink
move set TOP to family_support.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed May 26, 2023
1 parent 23c8670 commit c0ecf8b
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 13 deletions.
3 changes: 3 additions & 0 deletions hw/bsp/family_support.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions hw/bsp/imxrt/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/lpc18/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/lpc55/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/mcx/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 0 additions & 2 deletions hw/bsp/nrf/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions hw/bsp/rp2040/family.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit c0ecf8b

Please sign in to comment.