diff options
| author | Alex Lisitsyn <[email protected]> | 2021-03-09 11:29:07 +0100 |
|---|---|---|
| committer | Alex Lisitsyn <[email protected]> | 2021-04-16 13:38:00 +0200 |
| commit | 2f0cb8b5f1a944187635a58a748ed08738d324a5 (patch) | |
| tree | 72948ac73b578aa315d37486f04fc2c3351ab9aa /examples/device/board_test/src | |
| parent | c611199632b9288eff76c1c4bfdce5d8cc024748 (diff) | |
tinyusb: add support of esp32s3 target
add support of new esp32s3 target and the board
update the roles.mk wrapper to allow dfu flashing of espressif chip
update examples to allow compilation for esp32s3_addax_1 board
once the code is tested the PR to original tinyusb repo will be submitted
Diffstat (limited to 'examples/device/board_test/src')
| -rw-r--r-- | examples/device/board_test/src/CMakeLists.txt | 12 | ||||
| -rw-r--r-- | examples/device/board_test/src/main.c | 2 |
2 files changed, 11 insertions, 3 deletions
diff --git a/examples/device/board_test/src/CMakeLists.txt b/examples/device/board_test/src/CMakeLists.txt index e59661069..e44863609 100644 --- a/examples/device/board_test/src/CMakeLists.txt +++ b/examples/device/board_test/src/CMakeLists.txt @@ -1,10 +1,18 @@ -# FAMILY = "esp32s2" +# FAMILY = esp32sx idf_component_register(SRCS "main.c" INCLUDE_DIRS "." REQUIRES freertos soc) +string(REGEX MATCH "^(esp32s[2-3])*" chip_target "$ENV{IDF_TARGET}") + +if(NOT chip_target) + message(FATAL_ERROR "Incorrect target: $ENV{IDF_TARGET}" ) +endif() + +string(TOUPPER ${chip_target} upper_case_target) + target_compile_options(${COMPONENT_TARGET} PUBLIC - "-DCFG_TUSB_MCU=OPT_MCU_ESP32S2" + "-DCFG_TUSB_MCU=OPT_MCU_${upper_case_target}" "-DCFG_TUSB_OS=OPT_OS_FREERTOS" ) diff --git a/examples/device/board_test/src/main.c b/examples/device/board_test/src/main.c index d94b24650..c77dd5647 100644 --- a/examples/device/board_test/src/main.c +++ b/examples/device/board_test/src/main.c @@ -70,7 +70,7 @@ int main(void) return 0; } -#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 +#if CFG_TUSB_MCU == OPT_MCU_ESP32S2 || CFG_TUSB_MCU == OPT_MCU_ESP32S3 void app_main(void) { main(); |
