diff options
| author | Damien George | 2021-02-19 12:08:11 +1100 |
|---|---|---|
| committer | Damien George | 2021-04-15 10:31:06 +1000 |
| commit | c81d048bb3ad35d62c3c7afe9b770a32f8b49c8b (patch) | |
| tree | e5cbaffa6b924f43d30b63c49db06d7dbac29c7d /ports/esp32/main/CMakeLists.txt | |
| parent | 66a86a061530eeee51191c3c667e9bc3cfcfda40 (diff) | |
esp32: Add support for USB with CDC ACM.
The REPL will be available on the USB serial port.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'ports/esp32/main/CMakeLists.txt')
| -rw-r--r-- | ports/esp32/main/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ports/esp32/main/CMakeLists.txt b/ports/esp32/main/CMakeLists.txt index 63a221e4d..656045da9 100644 --- a/ports/esp32/main/CMakeLists.txt +++ b/ports/esp32/main/CMakeLists.txt @@ -37,6 +37,7 @@ set(MICROPY_SOURCE_DRIVERS set(MICROPY_SOURCE_PORT ${PROJECT_DIR}/main.c ${PROJECT_DIR}/uart.c + ${PROJECT_DIR}/usb.c ${PROJECT_DIR}/gccollect.c ${PROJECT_DIR}/mphalport.c ${PROJECT_DIR}/fatfs_port.c @@ -126,6 +127,7 @@ if(IDF_TARGET STREQUAL "esp32") list(APPEND IDF_COMPONENTS esp32) elseif(IDF_TARGET STREQUAL "esp32s2") list(APPEND IDF_COMPONENTS esp32s2) + list(APPEND IDF_COMPONENTS tinyusb) endif() # Register the main IDF component. @@ -185,6 +187,10 @@ if(IDF_VERSION_MINOR GREATER_EQUAL 2) # so add them explicitly. list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/${IDF_TARGET}/include) list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/soc/soc/include) + if(IDF_VERSION_MINOR GREATER_EQUAL 3) + list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/tinyusb/additions/include) + list(APPEND MICROPY_CPP_INC_EXTRA ${IDF_PATH}/components/tinyusb/tinyusb/src) + endif() endif() # Include the main MicroPython cmake rules. |
