summaryrefslogtreecommitdiff
path: root/ports/esp32/esp32_common.cmake
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2025-03-04 12:20:02 +1100
committerDamien George <damien@micropython.org>2025-03-13 11:33:10 +1100
commit4b1c666c28ef9adb5a9b5156624bccd6a3d129b6 (patch)
treedfe67b4a72fcc99edca821f8532b7bcd77019023 /ports/esp32/esp32_common.cmake
parentdafff1fd0e37514b230081b1b34288d1d4b25867 (diff)
esp32: Merge the per-SoC "main" components back together.
Removes redundant metadata from each, shouldn't otherwise change any build output. Reverts the split originally added in e4650125. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'ports/esp32/esp32_common.cmake')
-rw-r--r--ports/esp32/esp32_common.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index 059989c10..09952363d 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -14,6 +14,18 @@ if(NOT MICROPY_PORT_DIR)
get_filename_component(MICROPY_PORT_DIR ${MICROPY_DIR}/ports/esp32 ABSOLUTE)
endif()
+# RISC-V specific inclusions
+if(CONFIG_IDF_TARGET_ARCH_RISCV)
+ list(APPEND MICROPY_SOURCE_LIB ${MICROPY_DIR}/shared/runtime/gchelper_generic.c)
+ list(APPEND IDF_COMPONENTS riscv)
+endif()
+
+if(NOT DEFINED MICROPY_PY_TINYUSB)
+ if(CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3)
+ set(MICROPY_PY_TINYUSB ON)
+ endif()
+endif()
+
# Include core source components.
include(${MICROPY_DIR}/py/py.cmake)
@@ -182,7 +194,7 @@ list(APPEND IDF_COMPONENTS
if (MICROPY_USER_LDFRAGMENTS)
set(MICROPY_LDFRAGMENTS ${MICROPY_USER_LDFRAGMENTS})
else()
- set(MICROPY_LDFRAGMENTS linker.lf)
+ set(MICROPY_LDFRAGMENTS linker_esp32.lf)
endif()
# Register the main IDF component.