← index #17987Issue #17953
Related · high · value 5.783
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

ESP32-C6: build error

openby smurfixopened 2025-08-18updated 2025-10-11
bug

Port, board and/or hardware

ESP32-C6

MicroPython version

v1.26.0-51-g020eeba41
esp-idf: 5.4.2 or 5.5

Reproduction

$ cd ports/esp32
$ make BOARD=ESP32_GENERIC_C6

Expected behaviour

no build error

Observed behaviour

[281/290] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/__/__/frozen_content.c.obj
FAILED: esp-idf/main/CMakeFiles/__idf_main.dir/__/__/frozen_content.c.obj
/home/smurf/.espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/riscv32-esp-elf-gcc … -c /src/moat/ext/micropython/ports/esp32/build-ESP32_GENERIC_C6/frozen_content.c
/src/moat/ext/micropython/ports/esp32/build-ESP32_GENERIC_C6/frozen_content.c:375:5: error: redeclaration of enumerator 'MP_QSTR_put'
  375 |     MP_QSTR_put,
      |     ^~~~~~~~~~~
In file included from /src/moat/ext/micropython/py/obj.h:33,
                 from /src/moat/ext/micropython/py/objint.h:30,
                 from /src/moat/ext/micropython/ports/esp32/build-ESP32_GENERIC_C6/frozen_content.c:16:
/src/moat/ext/micropython/ports/esp32/build-ESP32_GENERIC_C6/genhdr/qstrdefs.generated.h:955:7: note: previous definition of 'MP_QSTR_put' with type 'enum <anonymous>'
  955 | QDEF1(MP_QSTR_put, 28788, 3, "put")
      |       ^~~~~~~~~~~
/src/moat/ext/micropython/py/qstr.h:52:35: note: in definition of macro 'QDEF1'
   52 | #define QDEF1(id, hash, len, str) id,
      |                                   ^~
[283/290] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/__/modespnow.c.obj
ninja: build stopped: subcommand failed.

Additional Information

This build should probably be included in the CI script. Apparently right now it is not.

I ran some test builds:

Fails on 1.25.0 (esp-idf v5.4.2) due to

/var/cache/smurf/dot-espressif/tools/riscv32-esp-elf/esp-14.2.0_20241119/riscv32-esp-elf/bin/../lib/gcc/riscv32-esp-elf/14.2.0/../../../../riscv32-esp-elf/bin/ld: esp-idf/main/libmain.a(panichandler.c.obj): in function `__wrap_esp_panic_handler':
/src/moat/ext/micropython/ports/esp32/panichandler.c:49:(.text.__wrap_esp_panic_handler+0xc): undefined reference to `esp_panic_handler_reconfigure_wdts'

Works on 1.25.0 (esp-idf v5.3.3).

Fails on 1.26.0 and master 020eeba41 (esp-idf 5.3.3) due to

/src/moat/ext/micropython/ports/esp32/machine_timer.c: In function 'machine_timer_enable':
/src/moat/ext/micropython/ports/esp32/machine_timer.c:183:5: error: implicit declaration of function 'esp_clk_tree_enable_src' [-Werror=implicit-function-declaration]
  183 |     esp_clk_tree_enable_src(TIMER_CLK_SRC, true);
      |     ^~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors

but builds when I remove that line.

Fails on 1.26.0 (esp-idf 5.4.2) due to

-- Configuring done (11.4s)
CMake Error at /src/esp-idf/tools/cmake/ldgen.cmake:159 (file):
  Error evaluating generator expression:

    $<TARGET_FILE:micropy_extmod_btree>

  Target "micropy_extmod_btree" is not an executable or library.
Call Stack (most recent call first):
  /src/esp-idf/tools/cmake/build.cmake:734 (__ldgen_create_target)
  /src/esp-idf/tools/cmake/project.cmake:972 (idf_build_executable)
  CMakeLists.txt:65 (project)

then with the same error as master when I disable the btree module.

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