mirror of
https://github.com/hathach/tinyusb.git
synced 2025-02-11 00:39:57 +00:00
Fix up build_family style builds:
- added back pre-existing board directories which now just select PICO_BOARD - added boards/pico_sdk which just uses the pre-existing PICO_BOARD setting - fixed rp2040/family.cmake to include the magic string "CFG_TUSB_MCU=OPT_MCU_RP2040" expected by build_family.py
This commit is contained in:
parent
95f2478146
commit
5d161b79bb
@ -17,12 +17,14 @@ if(FAMILY MATCHES "^esp32s[2-3]")
|
||||
|
||||
else()
|
||||
|
||||
# Family chooses name based on passed name and vars (e.g. <BOARD>-<DIR_NAME>)
|
||||
get_filename_component(DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
|
||||
family_get_project_name(PROJECT "${DIR_NAME}")
|
||||
# gets PROJECT name for the example (e.g. <BOARD>-<DIR_NAME>)
|
||||
family_get_project_name(PROJECT ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
project(${PROJECT})
|
||||
|
||||
# Checks this example is valid for the family and initializes the project
|
||||
family_initialize_project(${PROJECT} ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
add_executable(${PROJECT})
|
||||
|
||||
# Example source
|
||||
|
@ -6,5 +6,5 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(SUPPORTED_TARGETS esp32s2)
|
||||
|
||||
# include basic family CMake functionality
|
||||
set(FAMILY_MCUS esp32s2 ESP32S2)
|
||||
set(FAMILY_MCUS ESP32S2)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../family.cmake)
|
||||
|
@ -6,5 +6,5 @@ include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
set(SUPPORTED_TARGETS esp32s3)
|
||||
|
||||
# include basic family CMake functionality
|
||||
set(FAMILY_MCUS esp32s3 ESP32S3) # TODO MERGE THIS WITH supported targets?
|
||||
set(FAMILY_MCUS ESP32S3)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../family.cmake)
|
||||
|
1
hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake
Normal file
1
hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(PICO_BOARD adafruit_feather_rp2040)
|
@ -0,0 +1 @@
|
||||
set(PICO_BOARD adafruit_itsybitsy_rp2040)
|
1
hw/bsp/rp2040/boards/adafruit_qtpy_rp2040/board.cmake
Normal file
1
hw/bsp/rp2040/boards/adafruit_qtpy_rp2040/board.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(PICO_BOARD adafruit_qtpy_rp2040)
|
1
hw/bsp/rp2040/boards/pico_sdk/board.cmake
Normal file
1
hw/bsp/rp2040/boards/pico_sdk/board.cmake
Normal file
@ -0,0 +1 @@
|
||||
# This builds with settings based purely on the current PICO_BOARD set via the SDK
|
1
hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake
Normal file
1
hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(PICO_BOARD pico)
|
@ -3,17 +3,18 @@ if (NOT TARGET _rp2040_family_inclusion_marker)
|
||||
add_library(_rp2040_family_inclusion_marker INTERFACE)
|
||||
|
||||
# include basic family CMake functionality
|
||||
set(FAMILY_MCUS RP2040 rp2040)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../family.cmake)
|
||||
|
||||
if (BOARD AND NOT PICO_BOARD)
|
||||
message("Defaulting PICO_BOARD from BOARD ('${BOARD}')")
|
||||
set(PICO_BOARD ${BOARD})
|
||||
endif()
|
||||
set(FAMILY_MCUS RP2040)
|
||||
|
||||
# add the SDK in case we are standalone tinyusb example (noop if already present)
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/pico_sdk_import.cmake)
|
||||
set(BOARD ${PICO_BOARD})
|
||||
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/../family.cmake)
|
||||
|
||||
# todo should we default to pico_sdk?
|
||||
if (NOT BOARD)
|
||||
message(FATAL_ERROR "BOARD must be specified")
|
||||
endif()
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/boards/${BOARD}/board.cmake)
|
||||
|
||||
# TOP is absolute path to root directory of TinyUSB git repo
|
||||
set(TOP "../../..")
|
||||
@ -24,6 +25,7 @@ if (NOT TARGET _rp2040_family_inclusion_marker)
|
||||
|
||||
target_compile_definitions(tinyusb_additions INTERFACE
|
||||
PICO_RP2040_USB_DEVICE_ENUMERATION_FIX=1
|
||||
CFG_TUSB_MCU=OPT_MCU_RP2040 # this is already included in the SDK, but needed here for build_family.py grep
|
||||
)
|
||||
|
||||
if(DEFINED LOG)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 20285262657d1b482d132d20d755c8c330d55c1f
|
||||
Subproject commit b7b26f50d00072812aec8453f643e24bafedccb5
|
Loading…
x
Reference in New Issue
Block a user