Hey there !
It’s my first post here, so please correct me if I selected the wrong section for the following questions
Some context :
- I’m using platformio with vscode, and espidf framework.
- I’ve a core system of files which is shared through different projects, and I want to do customization (specific to the project) with an “override” manner.
=> to do so, I have an “override” folder, and some files are copy pasted in it and modified, to override the original “core content”. Hence, I want to exclude from the build the core .c and .h files that have been duplicated… in order to build the project with the overridden ones and only.
That said, I tried many things… For example : using build_src_filter with espidf project has no effect…
=> “Warning: the ‘src_filter’ option cannot be used with ESP-IDF. Select source files to build in the project CMakeLists.txt file.”
I also tried to modify the CMakeLists.txt file with, for example :
FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
message("All sources: ${app_sources}")
# Removing specific files from the build
list(REMOVE_ITEM app_sources
"${CMAKE_SOURCE_DIR}/src/test/test2.c"
)
idf_component_register(SRCS ${app_sources})
Which does not work either. But I doubt that the CMakeLists.txt file is even read by cMake, because the message does not seem to be displayed.
What am I missing here ? Is there a simple way to proceed ?
I’ve been trying for 2 days with many options and scripts, but got no luck until now…
I will appreciate your help ! thanks a lot