esp32: Don't add TinyUSB files to an ECHO_SUBMODULES build.
Similar to other places, CMake will error out if this file
doesn't exist yet but we don't want this if we're only getting
the list of submodules.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index b6bfcda..e03d2ff 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -60,7 +60,7 @@
)
string(CONCAT GIT_SUBMODULES "${GIT_SUBMODULES} " lib/tinyusb)
-if(MICROPY_PY_TINYUSB)
+if(MICROPY_PY_TINYUSB AND NOT ECHO_SUBMODULES)
set(TINYUSB_SRC "${MICROPY_DIR}/lib/tinyusb/src")
string(TOUPPER OPT_MCU_${IDF_TARGET} tusb_mcu)