sdkconfig and sdkconfig.h issues

ThomasBit
Posts: 10
Joined: Thu Jun 09, 2022 11:05 am

sdkconfig and sdkconfig.h issues

Postby ThomasBit » Wed Aug 10, 2022 12:09 pm

Hi

I probably is doing something wrong, but I have some difficulties to generate a usable sdkconfig.h file. Sometime it revert to something different that I have made in menuconfig

I have ESP IDF v4.4.1 and using visual studio and CMake

My application folder:
Esp32Config
sdkconfig
main
main.cpp
CmakeLists

I run 'idf.py menuconfig' from the \Esp32Config folder. It builds the menuconfig fine and the folder is containing a good sdkconfig file with the changes after i have saved the config

I than open my project and reconfigure. Than the file \MyApp\Esp32Config\sdlconfig is changed back to was it was before? And when I build the sdkconfig.h in the output directory used for the build is wrong.

I set 'SDKCONFIG ${CMAKE_CURRENT_SOURCE_DIR}/Esp32Config/sdkconfig' in my idf_build_process structure in the CMakeLists.txt for the application

Code: Select all

idf_build_process( esp32
  PROJECT_NAME "${PROJECT_NAME}"
  PROJECT_VER "${PROJECT_VER}"
  COMPONENTS esp32 freertos esptool_py app_update esp_eth    
  SDKCONFIG ${CMAKE_CURRENT_SOURCE_DIR}/Esp32Config/sdkconfig
  BUILD_DIR ${CMAKE_BINARY_DIR}
)
My build dir is C:/CMakeBuilds/build/Esp32-Freertos-Debug

SDKCONFIG is set to C:\MyApp/Application/Esp32Config/sdkconfig

The \MyApp\* is under git control

Any idea what I have missed?`Maybe I must use sdkconfig.defaults, but how does that exactly work?

Thomas

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: sdkconfig and sdkconfig.h issues

Postby ESP_igrr » Mon Aug 15, 2022 11:07 pm

Hi ThomasBit,

Could you please explain the project(s) structure in a bit more detail?
Based on your description, I understood as that you have two projects:
- one IDF build system project where you execute 'idf.py menuconfig'
- another CMake project where you use IDF as a library and reference the sdkconfig file generated by the first project
Is my understanding correct?

If it is, then the reason why the sdkconfig file content may change is that you are not building the same set of components in the second project as in the first one. Please try setting the COMPONENTS variable in the CMakeLists.txt file of the first project to the same list of components as you are building in the 2nd project.

Who is online

Users browsing this forum: No registered users and 78 guests