summaryrefslogtreecommitdiffstatshomepage
path: root/ports/esp32/esp32_common.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'ports/esp32/esp32_common.cmake')
-rw-r--r--ports/esp32/esp32_common.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/ports/esp32/esp32_common.cmake b/ports/esp32/esp32_common.cmake
index d026a64b0c..99fcebac32 100644
--- a/ports/esp32/esp32_common.cmake
+++ b/ports/esp32/esp32_common.cmake
@@ -20,7 +20,6 @@ if(CONFIG_IDF_TARGET_ARCH_RISCV)
${MICROPY_DIR}/shared/runtime/gchelper_native.c
${MICROPY_DIR}/shared/runtime/gchelper_rv32i.s
)
- list(APPEND IDF_COMPONENTS riscv)
endif()
if(NOT DEFINED MICROPY_PY_TINYUSB)
@@ -237,8 +236,10 @@ idf_component_register(
set(MICROPY_TARGET ${COMPONENT_TARGET})
# Define mpy-cross flags, for use with frozen code.
-if(CONFIG_IDF_TARGET_ARCH STREQUAL "xtensa")
-set(MICROPY_CROSS_FLAGS -march=xtensawin)
+if(CONFIG_IDF_TARGET_ARCH_XTENSA)
+ set(MICROPY_CROSS_FLAGS -march=xtensawin)
+elseif(CONFIG_IDF_TARGET_ARCH_RISCV)
+ set(MICROPY_CROSS_FLAGS -march=rv32imc)
endif()
# Set compile options for this port.