Can't compile projects for esp32c6 target

Ildar Belkin
Posts: 13
Joined: Mon Apr 24, 2023 3:16 pm

Can't compile projects for esp32c6 target

Postby Ildar Belkin » Sun Jun 09, 2024 9:59 am

Hello.
Im compilling my projects for ESP32 for a long time via windows console.
Im using Notepad++ for writing code and windows console for building and flashing ESP32.
Everything is perfect. All projects are compiled as well with standard chain:

Code: Untitled.txt Select all


idf.py build
idf.py flash or idf.py app-flash


Today I tried to compile my project for ESP32-C6-WROOM.
I tried to set target by

Code: Untitled.txt Select all


idf.py set-target esp32c6

but the error appeared:

Code: Untitled.txt Select all



C:\Proj\IoTG>idf.py set-target esp32c6
Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
Executing action: fullclean
Executing action: set-target
Set Target to: esp32c6, new sdkconfig will be created.
Running cmake in directory C:\Proj\IoTG\build
Executing "cmake -G Ninja -DPYTHON_DEPS_CHECKED=1 -DPYTHON=C:\Espressif\python_env\idf5.2_py3.11_env\Scripts\python.exe -DESP_PLATFORM=1 -DIDF_TARGET=esp32c6 -DCCACHE_ENABLE=1 C:\StecProj\IoTGarden"...
-- Existing sdkconfig 'C:/Proj/IoTG/sdkconfig' renamed to 'C:/Proj/IoTG/sdkconfig.old'.
-- Found Git: C:/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.1")
-- ccache will be used for faster recompilation
-- The C compiler identification is GNU 13.2.0
-- The CXX compiler identification is GNU 13.2.0
-- The ASM compiler identification is GNU
-- Found assembler: C:/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
-- Building ESP-IDF components for target esp32c6
-- Project sdkconfig file C:/Proj/IoTG/sdkconfig
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\__main__.py", line 16, in <module>
main()
File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 402, in main
output_function(deprecated_options, config, temp_file)
File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 598, in write_json
config_dict = get_json_values(config)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 593, in get_json_values
write_node(n)
File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 589, in write_node
val = int(val)
^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
CMake Error at C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/kconfig.cmake:209 (message):
Failed to run kconfgen
(C:/Espressif/python_env/idf5.2_py3.11_env/Scripts/python.exe;-m;kconfgen;--list-separator=semicolon;--kconfig;C:/Espressif/frameworks/esp-idf-v5.2.2/Kconfig;--sdkconfig-rename;C:/Espressif/frameworks/esp-idf-v5.2.2/sdkconfig.rename;--config;C:/Proj/IoTG/sdkconfig;--env-file;C:/Proj/IoTG/build/config.env).
Error 1
Call Stack (most recent call first):
C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/build.cmake:615 (__kconfig_generate_config)
C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/project.cmake:605 (idf_build_process)
CMakeLists.txt:6 (project)


-- Configuring incomplete, errors occurred!
See also "C:/Proj/IoTG/build/CMakeFiles/CMakeOutput.log".
cmake failed with exit code 1, output of the command is in the C:\Proj\IoTG\build\log\idf_py_stderr_output_7772 and C:\Proj\IoTG\build\log\idf_py_stdout_output_7772
Also I tried to set other variants: esp32, esp32c2, esp32c3, esp32s2, esp32h2 and projects compiled ok.

I'm using IDF versions 5.2.2 and 5.2.1 and the results the same.
IDF 5.2.2 was downloaded today from official site and installed as I have done it before with previous versions.

Could you help me what is the problem and how to fix it?

User avatar
Roland
Espressif staff
Espressif staff
Posts: 272
Joined: Tue Oct 09, 2018 10:28 am

Re: Can't compile projects for esp32c6 target

Postby Roland » Mon Jun 10, 2024 6:49 am

Hi Ildar Belkin,

we are sorry for this issue. The error message is not clear and provide not enough information to pinpoint the issue. We already track this problem and will address it soon.

In the meantime, we can try to find the root cause manually. Is this some project publicly available we can try to build? If not then can you share please the list of components used in your project?

Ildar Belkin
Posts: 13
Joined: Mon Apr 24, 2023 3:16 pm

Re: Can't compile projects for esp32c6 target

Postby Ildar Belkin » Mon Jun 10, 2024 5:20 pm

Hello ESP_Roland!
No problem :) . Thank you for reply. I've sent you my project by private message.
If I can help you I will do you need to check or else for fixing.

User avatar
Roland
Espressif staff
Espressif staff
Posts: 272
Joined: Tue Oct 09, 2018 10:28 am

Re: Can't compile projects for esp32c6 target

Postby Roland » Tue Jun 11, 2024 10:11 am

I don't see you being use any external components. However, in your Kconfig.projbuild you have several "default" and "range" statements applying to certain IDF_TARGETs. You have these for those chips which are working for you. But you don't have them for ESP32-C6.

If you have an integer-based Kconfig option but none of the "defaults" statements are enabled then it will assume that it is an empty string "". And it cannot make an integer out of empty string. This is what the error message is about.

Ildar Belkin
Posts: 13
Joined: Mon Apr 24, 2023 3:16 pm

Re: Can't compile projects for esp32c6 target

Postby Ildar Belkin » Tue Jun 11, 2024 10:55 am

Hello ESP_Roland.
Thank you! You are right!
I've added IDF_TARGET_ESP32C6 to Kconfig.projbuild and it fixed my problem.
Everything is working as expected now.
:)

sergiomarina
Posts: 48
Joined: Wed Feb 05, 2020 6:29 pm

Re: Can't compile projects for esp32c6 target

Postby sergiomarina » Wed Jun 19, 2024 4:32 pm

Hi.
I'm dealing with a different target (ESP32) but I can refer to this post for the following message which I'd like to diagnose:
**********
-- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
-- Could not use 'git describe' to determine PROJECT_VER.
***************
It does not seem a blocking issue, but I'd like to investigate and, possibly, get rid of.
Is it possible?

Additionally, again low severity, I got this warning as the first line of the ESP-IDF 5.2 CMD window
******
Setting PYTHONNOUSERSITE, was not set
******
Could it avoided? How to?

Thank you in advance.

Who is online

Users browsing this forum: Semrush [Bot] and 3 guests