← index #17987Issue #18497
Off-topic · high · value 2.385
QUERY · ISSUE

v1.26.0 error when building ESP32_C3

openby xuancong84opened 2025-08-26updated 2025-12-09
bug

Port, board and/or hardware

ESP32-C3

MicroPython version

Nonsense, cannot even build, how to run micropython??

Reproduction

Follow the instruction for building ESP32. At the last step, make works, but make BOARD=ESP32_GENERIC_C3 fails with error.

Expected behaviour

ESP32_GENERIC_C3 should be able to build.

Observed behaviour

$ make BOARD=ESP32_GENERIC_C3
Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity.
Executing action: all (aliases: build)
Running cmake in directory /home/xuancong/projects/micropython-orig/ports/esp32/build-ESP32_GENERIC_C3
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=/home/xuancong/.espressif/python_env/idf5.4_py3.10_env/bin/python -DESP_PLATFORM=1 -DMICROPY_BOARD=ESP32_GENERIC_C3 -DMICROPY_BOARD_DIR=/home/xuancong/projects/micropython-orig/ports/esp32/boards/ESP32_GENERIC_C3 -DCCACHE_ENABLE=0 /home/xuancong/projects/micropython-orig/ports/esp32"...
-- Found Git: /usr/bin/git (found version "2.34.1") 
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- The ASM compiler identification is unknown
-- Found assembler: riscv32-esp-elf-gcc
CMake Error at /home/xuancong/projects/esp-idf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_C_COMPILER:

    riscv32-esp-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CC" or the CMake cache entry CMAKE_C_COMPILER to the full path to
  the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:65 (project)


CMake Error at /home/xuancong/projects/esp-idf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_CXX_COMPILER:

    riscv32-esp-elf-g++

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:65 (project)


CMake Error at /home/xuancong/projects/esp-idf/tools/cmake/project.cmake:571 (__project):
  The CMAKE_ASM_COMPILER:

    riscv32-esp-elf-gcc

  is not a full path and was not found in the PATH.

  Tell CMake where to find the compiler by setting either the environment
  variable "ASM" or the CMake cache entry CMAKE_ASM_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.
Call Stack (most recent call first):
  CMakeLists.txt:65 (project)


-- Warning: Did not find file Compiler/-ASM
-- Configuring incomplete, errors occurred!
See also "/home/xuancong/projects/micropython-orig/ports/esp32/build-ESP32_GENERIC_C3/CMakeFiles/CMakeOutput.log".
See also "/home/xuancong/projects/micropython-orig/ports/esp32/build-ESP32_GENERIC_C3/CMakeFiles/CMakeError.log".
HINT: Try to reinstall the toolchain for the chip that you trying to use. 
For more information run 'idf.py docs -sp get-started/#installation' and follow the instructions for your system
cmake failed with exit code 1, output of the command is in the /home/xuancong/projects/micropython-orig/ports/esp32/build-ESP32_GENERIC_C3/log/idf_py_stderr_output_31507 and /home/xuancong/projects/micropython-orig/ports/esp32/build-ESP32_GENERIC_C3/log/idf_py_stdout_output_31507
-e See https://github.com/micropython/micropython/wiki/Build-Troubleshooting
make: *** [Makefile:77: all] Error 1

Additional Information

No, I've provided everything above.

Code of Conduct

Yes, I agree

CANDIDATE · ISSUE

make submodules fails if BOARD is set to enable USB

closedby kdschlosseropened 2025-12-01updated 2025-12-03
bugport-esp32

Port, board and/or hardware

esp32 port generic S3

MicroPython version

master branch

Reproduction

building for the Generic S3 using the SPIRAM_OCT board variant.

Expected behaviour

I am expecting it to compile.

Observed behaviour

-- Building ESP-IDF components for target esp32s3
"idf_component.yml" file was found for components:
micropython/ports/esp32/main
However, the component manager is not enabled.
Failed to resolve component 'espressif__tinyusb'
Call Stack (most recent call first):
esp32_common.cmake:102 (idf_component_get_property)
main/CMakeLists.txt:11 (include)
make: Leaving directory 'micropython/ports/esp32'
HINT: The component 'espressif__tinyusb' could not be found. This could be because: component name was misspelled, the component was not added to the build, the component has been moved to the IDF component manager, the component has been removed and refactored into some other component or the component may not be supported by the selected target.
Please look out for component in 'https://components.espressif.com' and add using 'idf.py add-dependency' command.
Refer to the migration guide for more details about moved components.
Refer to the build-system guide for more details about how components are found and included in the build.

Additional Information

I noticed this in the makefile for the ESP32 port

submodules:
    $(Q)IDF_COMPONENT_MANAGER=0 idf.py $(IDFPY_FLAGS) -B $(BUILD)/submodules -D UPDATE_SUBMODULES=1 reconfigure

I am going to hazard a guess that when running the reconfigure the esp32_common.cmake file gets processed and when it does you have this bit of code inside that file.


if(NOT DEFINED MICROPY_PY_TINYUSB)
    if(CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3 OR CONFIG_IDF_TARGET_ESP32P4)
        set(MICROPY_PY_TINYUSB ON)
    endif()
endif()

and then this

if(MICROPY_PY_TINYUSB)
    string(TOUPPER OPT_MCU_${IDF_TARGET} tusb_mcu)

    list(APPEND MICROPY_DEF_TINYUSB
        CFG_TUSB_MCU=${tusb_mcu}
    )

    list(APPEND MICROPY_SOURCE_TINYUSB
        ${MICROPY_DIR}/shared/tinyusb/mp_usbd.c
        ${MICROPY_DIR}/shared/tinyusb/mp_usbd_cdc.c
        ${MICROPY_DIR}/shared/tinyusb/mp_usbd_descriptor.c
        ${MICROPY_DIR}/shared/tinyusb/mp_usbd_runtime.c
    )

    list(APPEND MICROPY_INC_TINYUSB
        ${MICROPY_DIR}/shared/tinyusb/
    )

    # Build the Espressif tinyusb component with MicroPython shared/tinyusb/tusb_config.h
    idf_component_get_property(tusb_lib espressif__tinyusb COMPONENT_LIB)
    target_include_directories(${tusb_lib} PRIVATE
        ${MICROPY_DIR}/shared/tinyusb
        ${MICROPY_DIR}
        ${MICROPY_PORT_DIR}
        ${MICROPY_BOARD_DIR})
endif()

the line where it is specifically failing is

    idf_component_get_property(tusb_lib espressif__tinyusb COMPONENT_LIB)

The esp32_common.cmake file is being imported in the main/CMakeLists.txt file which idf.py is processing.

Code of Conduct

Yes, I agree

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied