Merge branch 'fix/menuconfig-reload-sdkconfig-json_v5.5' into 'release/v5.5'

fix: make sure sdkconfig.json is updated after running the menuconfig (v5.5)

See merge request espressif/esp-idf!41529
This commit is contained in:
Roland Dobai
2025-09-01 08:18:38 +02:00
+15 -22
View File
@@ -209,30 +209,23 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
set(sdkconfig_json ${config_dir}/sdkconfig.json)
set(sdkconfig_json_menus ${config_dir}/kconfig_menus.json)
set(kconfgen_output_options
--output header ${sdkconfig_header}
--output cmake ${sdkconfig_cmake}
--output json ${sdkconfig_json}
--output json_menus ${sdkconfig_json_menus})
idf_build_get_property(output_sdkconfig __OUTPUT_SDKCONFIG)
if(output_sdkconfig)
execute_process(
COMMAND ${prepare_kconfig_files_command})
execute_process(
COMMAND ${kconfgen_basecommand}
--output header ${sdkconfig_header}
--output cmake ${sdkconfig_cmake}
--output json ${sdkconfig_json}
--output json_menus ${sdkconfig_json_menus}
--output config ${sdkconfig}
RESULT_VARIABLE config_result)
else()
execute_process(
COMMAND ${prepare_kconfig_files_command})
execute_process(
COMMAND ${kconfgen_basecommand}
--output header ${sdkconfig_header}
--output cmake ${sdkconfig_cmake}
--output json ${sdkconfig_json}
--output json_menus ${sdkconfig_json_menus}
RESULT_VARIABLE config_result)
list(APPEND kconfgen_output_options --output config ${sdkconfig})
endif()
execute_process(
COMMAND ${prepare_kconfig_files_command})
execute_process(
COMMAND ${kconfgen_basecommand}
${kconfgen_output_options}
RESULT_VARIABLE config_result)
if(config_result)
message(FATAL_ERROR "Failed to run kconfgen (${kconfgen_basecommand}). Error ${config_result}")
endif()
@@ -278,7 +271,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
--env "IDF_ENV_FPGA=${idf_env_fpga}"
--env "IDF_INIT_VERSION=${idf_init_version}"
--dont-write-deprecated
--output config ${sdkconfig}
${kconfgen_output_options}
COMMAND ${TERM_CHECK_CMD}
COMMAND ${CMAKE_COMMAND} -E env
"COMPONENT_KCONFIGS_SOURCE_FILE=${kconfigs_path}"
@@ -298,7 +291,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
--env "IDF_TOOLCHAIN=${idf_toolchain}"
--env "IDF_ENV_FPGA=${idf_env_fpga}"
--env "IDF_INIT_VERSION=${idf_init_version}"
--output config ${sdkconfig}
${kconfgen_output_options}
)
# Custom target to run kconfserver from the build tool