I am creating my own set of libraries in addition to ESP-IDF. All of them are collected OUTSIDE OF THE PROJECT FOLDER. This allows them to be used in many projects at once.
For example:
1. ESP-IDF is installed as:
Code: Select all
c:\Projects\Espressif\.esp-idf\...Code: Select all
c:\Projects\Espressif\espidf-k12\components\...But the project, as they say, "went to the people", a lot of people started using it and it became very inconvenient.
Now I want to stuff many parameters into the standard idf.py menuconfig system. This is not a problem.
The problem is that I have a lot of components, and a lot of unorganized items are created in the COMPONENT CONFIG submenu. I absolutely do not like this. I want to build a KCONFIG system so that all "my" settings are in a tree and start with one item in COMPONENT CONFIG:
I achieved this by creating an "empty" component, with a KConfig file containing the following:
Code: Select all
menu "k12 Options"
menu "System"
orsource "../re_strings/KConfig.k12"
orsource "../re_core/KConfig.k12"
endmenu
menu "Formats"
orsource "./KConfig_Formats_DateTime.k12"
endmenu
menu "Peripherals"
orsource "../re_led/KConfig.k12"
orsource "../re_sysled/KConfig.k12"
endmenu
orsource "../re_debug/KConfig.k12"
endmenu
I was completely satisfied with this, until.... Until I needed a conditional CMakeLists.txt:
Code: Select all
idf_build_get_property(target IDF_TARGET)
set(srcs)
set(includes)
set(requires)
set(priv_requires log re_strings)
if(CONFIG_RE_DEBUG_BACKTRACE_INTERCEPTION)
list(APPEND srcs "backtrace/re_backtrace.c")
list(APPEND includes "backtrace")
endif()
if(CONFIG_RE_DEBUG_MQTT_PUBLISH_SYSTEM_INFO)
list(APPEND srcs "sysinfo/re_sysinfo_json.c")
list(APPEND includes "sysinfo")
list(APPEND priv_requires heap)
endif()
if(CONFIG_RE_DEBUG_MQTT_PUBLISH_CORE_SYSTEM_FLAGS)
list(APPEND srcs "sysflags/re_sysflags_json.c")
list(APPEND includes "sysflags")
list(APPEND priv_requires re_core)
endif()
if(CONFIG_RE_DEBUG_MQTT_PUBLISH_TASK_LIST)
list(APPEND srcs "tasklist/re_tasklist.c")
list(APPEND includes "tasklist")
list(APPEND priv_requires re_heap)
endif()
idf_component_register(
SRCS SRCS "${srcs}"
INCLUDE_DIRS ${includes}
REQUIRES ${requires}
PRIV_REQUIRES ${priv_requires}
)
And now the main question:
HOW DO I COLLECT MY PARAMETERS INTO A TREE WITH ONE ROOT (OR VERtex - CALL IT WHATEVER YOU WANT), AND NOT LOSE THE FUNCTIONALITY OF CMakeList.txt