diff options
| author | Alex Lisitsyn <[email protected]> | 2021-04-16 13:37:14 +0200 |
|---|---|---|
| committer | Alex Lisitsyn <[email protected]> | 2021-04-16 15:41:42 +0200 |
| commit | f5e02e72ed8e6dae5ce854263fdca86ac7453e3c (patch) | |
| tree | 0364e7fdda32374af84bb989bfb1f961ed0fc878 /examples/device/hid_composite_freertos/src | |
| parent | 2f0cb8b5f1a944187635a58a748ed08738d324a5 (diff) | |
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
Diffstat (limited to 'examples/device/hid_composite_freertos/src')
| -rw-r--r-- | examples/device/hid_composite_freertos/src/CMakeLists.txt | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/examples/device/hid_composite_freertos/src/CMakeLists.txt b/examples/device/hid_composite_freertos/src/CMakeLists.txt index ae213a3c8..6d4a3c1e2 100644 --- a/examples/device/hid_composite_freertos/src/CMakeLists.txt +++ b/examples/device/hid_composite_freertos/src/CMakeLists.txt @@ -2,21 +2,12 @@ idf_component_register(SRCS "main.c" "usb_descriptors.c" INCLUDE_DIRS "." REQUIRES freertos soc) -string(REGEX MATCH "^(esp32s[2-3])*" chip_target "$ENV{IDF_TARGET}") +file(TO_NATIVE_PATH "${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake" board_cmake) -if(NOT chip_target) - message(FATAL_ERROR "Incorrect target: $ENV{IDF_TARGET}" ) -else() - set(chip_family "esp32sx") +if(EXISTS ${board_cmake}) + include(${board_cmake}) endif() -string(TOUPPER ${chip_target} upper_case_target) - -target_compile_options(${COMPONENT_TARGET} PUBLIC - "-DCFG_TUSB_MCU=OPT_MCU_${upper_case_target}" - "-DCFG_TUSB_OS=OPT_OS_FREERTOS" -) - idf_component_get_property( FREERTOS_ORIG_INCLUDE_PATH freertos ORIG_INCLUDE_PATH) target_include_directories(${COMPONENT_TARGET} PUBLIC "${FREERTOS_ORIG_INCLUDE_PATH}" @@ -37,5 +28,5 @@ target_sources(${COMPONENT_TARGET} PUBLIC "${TOP}/src/class/net/net_device.c" "${TOP}/src/class/usbtmc/usbtmc_device.c" "${TOP}/src/class/vendor/vendor_device.c" - "${TOP}/src/portable/espressif/${chip_family}/dcd_${chip_family}.c" + "${TOP}/src/portable/espressif/esp32sx/dcd_esp32sx.c" ) |
