Hi,
I tried to build the Hello_World.c example shipped with ESP-IDF but it fails with the below messages when I set the target to ESP32H2 or ESP32C6.
Surprisingly the build runs fine when the target is set to ESP32.
C:/Users/Bruno/Documents/Visual_Studio_Code/ESP-IDF/v5.2/espressif/tools/riscv32-esp-elf/esp-13.2.0_20230928/riscv32-esp-elf/riscv32-esp-elf/include/c++/13.2.0/cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
41 | #include <bits/c++config.h>
The environment is :
OS - Windows 10
Visual Studio Code version 1.86.0
ESP-IDF Extension version 1.7.0
Git version 2.39.2.windows.1
ESP-IDF version 5.2.0
Python version 3.11.2
Python's pip version 23.3.2
I found hits in the net mainly related to the Arduino env or to problem with the long path names not allowed in Windows.
Still the file c++config.h does not exist in the bits subdir.
Is this file missing in this version of ESP-IDF (no issue reported during the install) or is there a workaround I could try ?
Thanks.
Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
Last edited by brunofr on Tue Feb 20, 2024 5:44 pm, edited 1 time in total.
-
- Posts: 229
- Joined: Wed May 02, 2018 12:12 pm
Re: Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
Where are you seeing the error ? Is the error coming from the Microsoft C/C++ extension ? or is it in the build output ?
You can check the .vscode/c_cpp_properties.json and use the compile_commands.json configuration as described in https://github.com/espressif/vscode-esp ... URATION.md
You can check the .vscode/c_cpp_properties.json and use the compile_commands.json configuration as described in https://github.com/espressif/vscode-esp ... URATION.md
Re: Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
The error messages are in the terminal during the build in the ESP-IDF, not sure what you mean by Microsoft C/C++ extension.
Since I have reinstalled VSCode and the ESP-IDF extension from scratch with ESP IDF 5.1.2 stable.
I run with the c_cpp_properties.json unmodified after the install. Hard coding the compilerPath did not help.
The C code used is now reduced to the bare minimum :
I see the same problem where builds for Xtensa ESP32 modules work (using xtensa-esp32-elf-gcc.exe) while builds for RISC-V ESP32 modules fail (using riscv32-esp-elf-g++.exe) with the same errors.
Below the error messages for a build done with target set to ESP32H2:
There is no file c++config.h in the ...\include\c++\12.2.0\bits in the directories but the compile_commands.json file always contains build commands for cxx_guards.cpp and cxx_exception_stubs.cpp for both ESP32 architectures.
As expected I guess the includes change depending in the ESP32 type.
Of course the problem may be somewhere in my W10 (I get the same error on 2 PCs) or in my setup but it is rather strange that this would make build fail just for the RISC-V modules.
Is there debug options I could use ?
Since I have reinstalled VSCode and the ESP-IDF extension from scratch with ESP IDF 5.1.2 stable.
I run with the c_cpp_properties.json unmodified after the install. Hard coding the compilerPath did not help.
Code: Select all
{
"configurations": [
{
"name": "ESP-IDF",
"compilerPath": "${config:idf.toolsPathWin}undefined",
"compileCommands": "${workspaceFolder}/build/compile_commands.json",
"includePath": [
"${config:idf.espIdfPath}/components/**",
"${config:idf.espIdfPathWin}/components/**",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}/**"
],
"browse": {
"path": [
"${config:idf.espIdfPath}/components",
"${config:idf.espIdfPathWin}/components",
"${config:idf.espAdfPath}/components/**",
"${config:idf.espAdfPathWin}/components/**",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": false
}
}
],
"version": 4
}
Code: Select all
#include <stdio.h>
void app_main(void)
{
}
I see the same problem where builds for Xtensa ESP32 modules work (using xtensa-esp32-elf-gcc.exe) while builds for RISC-V ESP32 modules fail (using riscv32-esp-elf-g++.exe) with the same errors.
Below the error messages for a build done with target set to ESP32H2:
Code: Select all
Successfully created esp32h2 image.
Generated C:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test/build/bootloader/bootloader.bin
[105/105] cmd.exe /C "cd /D C:\Users\Bruno\VSCode\Projects\Espressif\v5.1.2\Test\build\bootloader\esp-idf\esptool_py && C:\Users\Bruno\VSCode\ESP-IDF\v5.1.2\.espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x0
C:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test/build/bootloader/bootloader.bin"
Bootloader binary size 0x5240 bytes. 0x2dc0 bytes (36%) free.
[391/909] Building CXX object esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_guards.cpp.obj
FAILED: esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_guards.cpp.obj
C:\Users\Bruno\VSCode\ESP-IDF\v5.1.2\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -DESP_PLATFORM -DIDF_VER=\"v5.1.2\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -IC:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test/build/config -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/newlib/platform_include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include/freertos -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/arch/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/. -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/private_include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/heap/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/log/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/esp32h2/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/platform_port/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_common/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/soc -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/riscv -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/private -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps/sntp -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/lwip/src/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/freertos/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/pthread/include -march=rv32imac_zicsr_zifencei -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -nostartfiles -Og -fmacro-prefix-map=C:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test=. -fmacro-prefix-map=C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu++2b -fno-exceptions -fno-rtti -MD -MT esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_guards.cpp.obj -MF esp-idf\cxx\CMakeFiles\__idf_cxx.dir\cxx_guards.cpp.obj.d -o esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_guards.cpp.obj -c C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/cxx/cxx_guards.cpp
In file included from c:\users\bruno\vscode\esp-idf\v5.1.2\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\riscv32-esp-elf\include\c++\12.2.0\stdlib.h:36,
from C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/cxx/cxx_guards.cpp:7:
c:\users\bruno\vscode\esp-idf\v5.1.2\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\riscv32-esp-elf\include\c++\12.2.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
41 | #include <bits/c++config.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
[393/909] Building CXX object esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_exception_stubs.cpp.obj
FAILED: esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_exception_stubs.cpp.obj
C:\Users\Bruno\VSCode\ESP-IDF\v5.1.2\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\bin\riscv32-esp-elf-g++.exe -DESP_PLATFORM -DIDF_VER=\"v5.1.2\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS -IC:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test/build/config -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/newlib/platform_include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include/freertos -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/arch/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/. -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/private_include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/heap/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/log/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/esp32h2/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/hal/platform_port/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/esp32h2 -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_common/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/soc -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/riscv -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/private -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/riscv/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps/sntp -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/lwip/src/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/freertos/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/pthread/include -march=rv32imac_zicsr_zifencei -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -nostartfiles -Og -fmacro-prefix-map=C:/Users/Bruno/VSCode/Projects/Espressif/v5.1.2/Test=. -fmacro-prefix-map=C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu++2b -fno-exceptions -fno-rtti -MD -MT esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_exception_stubs.cpp.obj -MF esp-idf\cxx\CMakeFiles\__idf_cxx.dir\cxx_exception_stubs.cpp.obj.d -o esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_exception_stubs.cpp.obj -c C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/cxx/cxx_exception_stubs.cpp
In file included from C:/Users/Bruno/VSCode/ESP-IDF/v5.1.2/esp-idf/components/cxx/cxx_exception_stubs.cpp:6:
c:\users\bruno\vscode\esp-idf\v5.1.2\.espressif\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\riscv32-esp-elf\include\c++\12.2.0\cstdlib:41:10: fatal error: bits/c++config.h: No such file or directory
41 | #include <bits/c++config.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
[396/909] Building C object esp-idf/newlib/CMakeFiles/__idf_newlib.dir/time.c.obj
ninja: build stopped: subcommand failed.
As expected I guess the includes change depending in the ESP32 type.
Of course the problem may be somewhere in my W10 (I get the same error on 2 PCs) or in my setup but it is rather strange that this would make build fail just for the RISC-V modules.
Is there debug options I could use ?
Re: Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
After more searches I found that there are many copies file c++config.h in subdirectories under .....\tools\riscv32-esp-elf\esp-12.2.0_20230208\riscv32-esp-elf\riscv32-esp-elf\include\c++\12.2.0\riscv32-esp-elf\ .
After that I managed to get a successful build by adding a path to a directory where there is a c++config.h file in INCLUDES statements in the build.ninja file. I did that to fix the builds for 22 obj files so the builds complete without error.
Below the statement I added :
As an example this is how a build command looks like with my change :
What seems wierd to me is that there is no c++config.h files in the directories listed in the INCLUDES statements in the build.ninja file as created by CMAKE.
Of course my change is just a workaround which wiped out whenever the build.ninja file is recreated.
The content of the path I added in the INCLUDES statement is build at installation time and is not customization dependent so I guess my questions now are :
- Should CMAKE add paths to directories with a c++config.h file in the INCLUDES statements when the build.ninja file is created ?
- or is there a why to append some sort of default path to the INCLUDES statements in the ESP-IDF customization ?
Right now I feel alone in the Titanic ..Help please!
Bruno
After that I managed to get a successful build by adding a path to a directory where there is a c++config.h file in INCLUDES statements in the build.ninja file. I did that to fix the builds for 22 obj files so the builds complete without error.
Below the statement I added :
Code: Select all
-IC:/Users/Bruno/Documents/Espressif/esp-idf/V5.1.2/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/riscv32-esp-elf/include/c++/12.2.0/riscv32-esp-elf
Code: Select all
build esp-idf/cxx/CMakeFiles/__idf_cxx.dir/cxx_exception_stubs.cpp.obj: CXX_COMPILER____idf_cxx_ C$:/ESP-IDF/v5.1.2/esp-idf/components/cxx/cxx_exception_stubs.cpp || cmake_object_order_depends_target___idf_cxx
DEFINES = -DESP_PLATFORM -DIDF_VER=\"v5.1.2\" -DSOC_MMU_PAGE_SIZE=CONFIG_MMU_PAGE_SIZE -D_GNU_SOURCE -D_POSIX_READER_WRITER_LOCKS
DEP_FILE = esp-idf\cxx\CMakeFiles\__idf_cxx.dir\cxx_exception_stubs.cpp.obj.d
FLAGS = -march=rv32imac_zicsr_zifencei -fdiagnostics-color=always -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=unused-but-set-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-enum-conversion -gdwarf-4 -ggdb -nostartfiles -Og -fmacro-prefix-map=C:/Users/Bruno/Documents/Espressif/Projects/v5.1.2/Test=. -fmacro-prefix-map=C:/ESP-IDF/v5.1.2/esp-idf=/IDF -fstrict-volatile-bitfields -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu++2b -fno-exceptions -fno-rtti
INCLUDES = -IC:/Users/Bruno/Documents/Espressif/esp-idf/V5.1.2/tools/riscv32-esp-elf/esp-12.2.0_20230208/riscv32-esp-elf/riscv32-esp-elf/include/c++/12.2.0/riscv32-esp-elf -IC:/Users/Bruno/Documents/Espressif/Projects/v5.1.2/Test/build/config -IC:/ESP-IDF/v5.1.2/esp-idf/components/newlib/platform_include -IC:/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include/freertos -IC:/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/freertos/esp_additions/arch/riscv/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/include/soc/esp32h2 -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/. -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_hw_support/port/esp32h2/private_include -IC:/ESP-IDF/v5.1.2/esp-idf/components/heap/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/log/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/soc/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2 -IC:/ESP-IDF/v5.1.2/esp-idf/components/soc/esp32h2/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/hal/esp32h2/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/hal/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/hal/platform_port/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/include/esp32h2 -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_rom/esp32h2 -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_common/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_system/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/soc -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/riscv -IC:/ESP-IDF/v5.1.2/esp-idf/components/esp_system/port/include/private -IC:/ESP-IDF/v5.1.2/esp-idf/components/riscv/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/include/apps/sntp -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/lwip/src/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/freertos/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include -IC:/ESP-IDF/v5.1.2/esp-idf/components/lwip/port/esp32xx/include/arch -IC:/ESP-IDF/v5.1.2/esp-idf/components/pthread/include
OBJECT_DIR = esp-idf\cxx\CMakeFiles\__idf_cxx.dir
OBJECT_FILE_DIR = esp-idf\cxx\CMakeFiles\__idf_cxx.dir
TARGET_COMPILE_PDB = esp-idf\cxx\CMakeFiles\__idf_cxx.dir\__idf_cxx.pdb
TARGET_PDB = esp-idf\cxx\libcxx.pdb
Of course my change is just a workaround which wiped out whenever the build.ninja file is recreated.
The content of the path I added in the INCLUDES statement is build at installation time and is not customization dependent so I guess my questions now are :
- Should CMAKE add paths to directories with a c++config.h file in the INCLUDES statements when the build.ninja file is created ?
- or is there a why to append some sort of default path to the INCLUDES statements in the ESP-IDF customization ?
Right now I feel alone in the Titanic ..Help please!
Bruno
Re: [Solved] Build of Hello_World.c fails for target devices ESP32H2, ESP32C6
Problem fixed. The build failed as the path length to included files exceeded some limit somewhere.
No sure where this limit is as the registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled exists in my W10s and is set to 1 thus permitting an extended-length path of32767 character max.
During my tests, build for the ESP32H2 worked after I installed the esp-idf extension in VSCode under my user home directory (C:\Users\Bruno\) instead of directory 'C:\Users\Bruno\Documents\'.
But still the limit can be exceeded if too long qualifiers are used for the installation directory.
By instance, the build for ESP32H2 works when the extension is placed in C:\Users\Bruno\esp\V5.1.2 but it fails when the extension is in C:\Users\Bruno\esp_very_very_long_name\v5.1.2\.
Kind of funny that the problem did not surface for build done for Xtensa based ESP32 modules.
I wonder if a limit for path names might be reached in the esp-idf code itself. If such it would be good to have it checked so the user is warned during the installation procedure..if not, my bad
No sure where this limit is as the registry key \HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled exists in my W10s and is set to 1 thus permitting an extended-length path of32767 character max.
During my tests, build for the ESP32H2 worked after I installed the esp-idf extension in VSCode under my user home directory (C:\Users\Bruno\) instead of directory 'C:\Users\Bruno\Documents\'.
But still the limit can be exceeded if too long qualifiers are used for the installation directory.
By instance, the build for ESP32H2 works when the extension is placed in C:\Users\Bruno\esp\V5.1.2 but it fails when the extension is in C:\Users\Bruno\esp_very_very_long_name\v5.1.2\.
Kind of funny that the problem did not surface for build done for Xtensa based ESP32 modules.
I wonder if a limit for path names might be reached in the esp-idf code itself. If such it would be good to have it checked so the user is warned during the installation procedure..if not, my bad
Who is online
Users browsing this forum: No registered users and 27 guests