sdkconfig in subfolder results in: error retrieving output from the JSON configuration server (IEP-899)
Describe the bug
Using the multi_config approach https://github.com/espressif/esp-idf/tree/master/examples/build_system/cmake/multi_config, I keep my sdkconfigs in separate subfolders. One called /cmake/main and one /cmake/factory.
The SDK Configuration can't open this files, resulting in error retrieving output from the JSON configuration server
Also building the project first with a specific sdkconfig does not solve the issues. Reinstalling the IDE also did not work.
If I put the sdkconfig back to the top level folder, it works.
To Reproduce
- Have 2 separate sdkconfigs and defined via the CMakeLists.txt like that:
cmake_minimum_required(VERSION 3.5)
option(FACTORY_APP "Trimmed factory app version (USAGE: idf.py build -D FACTORY_APP=ON )" ON)
if(FACTORY_APP) #custom SDKCONFIG needs to be set before calling cmake/project.cmake
set(SDKCONFIG "./cmake/factory/sdkconfig")
else()
set(SDKCONFIG "./cmake/main/sdkconfig")
endif()
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
-
Build the project with one sdkconfig
-
Try to open the sdkconfig that was used for the build with the SDK Configuration
Expected behavior sdkconfig gets opened with SDK Configuration
Eclipse Error log:
java.lang.reflect.InvocationTargetException: Cannot invoke "org.eclipse.core.resources.IProject.getPersistentProperty(org.eclipse.core.runtime.QualifiedName)" because "project" is null
at com.espressif.idf.sdk.config.ui.SDKConfigurationEditor.lambda$0(SDKConfigurationEditor.java:174)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: java.lang.NullPointerException: Cannot invoke "org.eclipse.core.resources.IProject.getPersistentProperty(org.eclipse.core.runtime.QualifiedName)" because "project" is null
at com.espressif.idf.core.util.IDFUtil.getBuildDir(IDFUtil.java:527)
at com.espressif.idf.core.util.SDKConfigUtil.getConfigMenuFilePath(SDKConfigUtil.java:28)
at com.espressif.idf.sdk.config.ui.SDKConfigurationEditor.lambda$0(SDKConfigur
[Espressif-IDE Product Info.txt](https://github.com/espressif/idf-eclipse-plugin/files/10883415/Espressif-IDE.Product.Info.txt)
ationEditor.java:150)
... 1 more
Root exception:
java.lang.NullPointerException: Cannot invoke "org.eclipse.core.resources.IProject.getPersistentProperty(org.eclipse.core.runtime.QualifiedName)" because "project" is null
at com.espressif.idf.core.util.IDFUtil.getBuildDir(IDFUtil.java:527)
at com.espressif.idf.core.util.SDKConfigUtil.getConfigMenuFilePath(SDKConfigUtil.java:28)
at com.espressif.idf.sdk.config.ui.SDKConfigurationEditor.lambda$0(SDKConfigurationEditor.java:150)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Espressif-IDE Product Information: Espressif-IDE Product Info.txt
So far I've noticed with this kind of configuration that you can manually open the sdkconfig.defaults file with SDK Configuration tool, but instead of the sdkconfig.defaults contents the /build/sdkconfig ones are used, which I guess is directly related to this issue.
I'm also struggling to build the multi_config example in Espressif IDE at all, maybe some clarification or usage example would be good.