Can't compile projects for esp32c6 target

Ildar Belkin
Posts: 10
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:
  1. idf.py build
  2. 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
  1. idf.py set-target esp32c6

but the error appeared:
  1.  
  2. C:\Proj\IoTG>idf.py set-target esp32c6
  3. Adding "set-target"'s dependency "fullclean" to list of commands with default set of options.
  4. Executing action: fullclean
  5. Executing action: set-target
  6. Set Target to: esp32c6, new sdkconfig will be created.
  7. Running cmake in directory C:\Proj\IoTG\build
  8. 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"...
  9. -- Existing sdkconfig 'C:/Proj/IoTG/sdkconfig' renamed to 'C:/Proj/IoTG/sdkconfig.old'.
  10. -- Found Git: C:/Espressif/tools/idf-git/2.44.0/cmd/git.exe (found version "2.44.0.windows.1")
  11. -- ccache will be used for faster recompilation
  12. -- The C compiler identification is GNU 13.2.0
  13. -- The CXX compiler identification is GNU 13.2.0
  14. -- The ASM compiler identification is GNU
  15. -- Found assembler: C:/Espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/bin/riscv32-esp-elf-gcc.exe
  16. -- Detecting C compiler ABI info
  17. -- Detecting C compiler ABI info - done
  18. -- 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
  19. -- Detecting C compile features
  20. -- Detecting C compile features - done
  21. -- Detecting CXX compiler ABI info
  22. -- Detecting CXX compiler ABI info - done
  23. -- 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
  24. -- Detecting CXX compile features
  25. -- Detecting CXX compile features - done
  26. -- git rev-parse returned 'fatal: not a git repository (or any of the parent directories): .git'
  27. -- Could not use 'git describe' to determine PROJECT_VER.
  28. -- Building ESP-IDF components for target esp32c6
  29. -- Project sdkconfig file C:/Proj/IoTG/sdkconfig
  30. Traceback (most recent call last):
  31.   File "<frozen runpy>", line 198, in _run_module_as_main
  32.   File "<frozen runpy>", line 88, in _run_code
  33.   File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\__main__.py", line 16, in <module>
  34.     main()
  35.   File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 402, in main
  36.     output_function(deprecated_options, config, temp_file)
  37.   File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 598, in write_json
  38.     config_dict = get_json_values(config)
  39.                   ^^^^^^^^^^^^^^^^^^^^^^^
  40.   File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 593, in get_json_values
  41.     write_node(n)
  42.   File "C:\Espressif\python_env\idf5.2_py3.11_env\Lib\site-packages\kconfgen\core.py", line 589, in write_node
  43.     val = int(val)
  44.           ^^^^^^^^
  45. ValueError: invalid literal for int() with base 10: ''
  46. CMake Error at C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/kconfig.cmake:209 (message):
  47.   Failed to run kconfgen
  48.   (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).
  49.   Error 1
  50. Call Stack (most recent call first):
  51.   C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/build.cmake:615 (__kconfig_generate_config)
  52.   C:/Espressif/frameworks/esp-idf-v5.2.2/tools/cmake/project.cmake:605 (idf_build_process)
  53.   CMakeLists.txt:6 (project)
  54.  
  55.  
  56. -- Configuring incomplete, errors occurred!
  57. See also "C:/Proj/IoTG/build/CMakeFiles/CMakeOutput.log".
  58. 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
  59.  
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
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Can't compile projects for esp32c6 target

Postby ESP_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: 10
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
ESP_Roland
Posts: 265
Joined: Tue Oct 09, 2018 10:28 am

Re: Can't compile projects for esp32c6 target

Postby ESP_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: 10
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: No registered users and 185 guests