espressif: group boards using target name as a family

`hw\bsp` separate one family folder to esp32s2, esp32s3
add board specific board.cmake file to override board specific options(features)
fix examples and test scripts to use new family approach
This commit is contained in:
Alex Lisitsyn
2021-04-16 13:37:14 +02:00
parent 2f0cb8b5f1
commit f5e02e72ed
49 changed files with 618 additions and 154 deletions

View File

@@ -0,0 +1,17 @@
# Apply board specific content here
target_include_directories(${COMPONENT_LIB} PRIVATE .)
idf_build_get_property(idf_target IDF_TARGET)
message(STATUS "Apply ${BOARD}(${idf_target}) specific options for component: ${COMPONENT_TARGET}")
if(NOT ${idf_target} STREQUAL "esp32s2")
message(FATAL_ERROR "Incorrect target for board ${BOARD}: $ENV{IDF_TARGET}(${idf_target}), try to clean the build first." )
endif()
set(IDF_TARGET "esp32s2" FORCE)
target_compile_options(${COMPONENT_TARGET} PUBLIC
"-DCFG_TUSB_MCU=OPT_MCU_ESP32S2"
"-DCFG_TUSB_OS=OPT_OS_FREERTOS"
)