Esp_hosted: issues with building
Posted: Mon Jan 26, 2026 5:17 am
I am a student currently learning to use the ESP32-P4-FUNCTION-EV-Board development kit. When attempting to connect the P4 to the C6 via the SDIO2 interface, I keep encountering strange issues—my esp32_hosted component cannot be properly integrated into my project.
This is my idf_component.yml file,which is located in the main directory of the project (the folder where the main function resides).
Here are my two CMakeLists.txt files, which are located in the main directory (where the main function resides) and the root directory of the project respectively.
Here are my error messages. I apologize for not being sure which part is the key information, so I've copied and pasted the entire content here.
I’ve reached out to many AI tools for help, including Copilot and ChatGPT, but none of them provided effective solutions.
I would greatly appreciate it if any of you could give me some tips on troubleshooting direction or solutions! Even a small clue will help me a lot. Once the problem is solved, I will update the solution in this post timely to help others who may encounter the same issue later. Thank you all again for your kindness and help.
Code: Select all
dependencies:
espressif/esp_wifi_remote:
version: "0.14.*"
espressif/esp_hosted:
version: "1.4.*"
Code: Select all
idf_component_register(SRCS "main.c" "esp_hosted_example.c"
INCLUDE_DIRS "."
REQUIRES esp_wifi esp_event nvs_flash esp_system esp32_p4_function_ev_board esp_psram custom mqtt generated espressif__esp_hosted)
Code: Select all
# The following five lines of boilerplate have to be in your project's
# CMakeLists in this exact order for cmake to work correctly
cmake_minimum_required(VERSION 3.16)
# Add component directories
set(EXTRA_COMPONENT_DIRS
components/hardware/esp32_p4_function_ev_board
components/software/mqtt
components/software/wifi
components/app/custom
components/app/generated
managed_components/espressif__esp_hosted
)
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
project(newset_P4)
Here are my error messages. I apologize for not being sure which part is the key information, so I've copied and pasted the entire content here.
Whenever I include #include "esp_hosted.h" in any of my source files (function files), the build process always throws an error.CMake Error in CMakeLists.txt:
Evaluation file to be written multiple times with different content. This
is generally caused by the content evaluating the configuration type,
language, or location of object files:
D:/Documents/VScode_esp_idf/newset_P4/build/ldgen_libraries
CMake Error in CMakeLists.txt:
Evaluation file to be written multiple times with different content. This
is generally caused by the content evaluating the configuration type,
language, or location of object files:
D:/Documents/VScode_esp_idf/newset_P4/build/project_description.json
-- Generating done (4.3s)
CMake Generate step failed. Build files cannot be regenerated correctly.
ninja: error: rebuilding 'build.ninja': subcommand failed
FAILED: build.ninja
D:\ESP32_IDF_Versions\.espressif\tools\cmake\3.30.2\bin\cmake.exe --regenerate-during-build -SD:\Documents\VScode_esp_idf\newset_P4 -BD:\Documents\VScode_esp_idf\newset_P4\build
I’ve reached out to many AI tools for help, including Copilot and ChatGPT, but none of them provided effective solutions.
I would greatly appreciate it if any of you could give me some tips on troubleshooting direction or solutions! Even a small clue will help me a lot. Once the problem is solved, I will update the solution in this post timely to help others who may encounter the same issue later. Thank you all again for your kindness and help.