@@ -579,11 +579,15 @@ macro(idf_build_process target)
579579
580580 # Call for component manager to download dependencies for all components
581581 idf_build_get_property(idf_component_manager IDF_COMPONENT_MANAGER)
582+
583+ set (result 0)
582584 if (idf_component_manager EQUAL 1)
583585 idf_build_get_property(build_dir BUILD_DIR)
584586 set (managed_components_list_file ${build_dir} /managed_components_list.temp.cmake)
585587 set (local_components_list_file ${build_dir} /local_components_list.temp.yml)
586588
589+ set (__RERUN_EXITCODE 10) # missing kconfig
590+
587591 set (__contents "components:\n " )
588592 idf_build_get_property(build_component_targets BUILD_COMPONENT_TARGETS)
589593 foreach (__build_component_target ${build_component_targets} )
@@ -610,6 +614,7 @@ macro(idf_build_process target)
610614 "idf_component_manager.prepare_components"
611615 "--project_dir=${project_dir} "
612616 "--lock_path=${dependencies_lock_file} "
617+ "--sdkconfig_json_file=${build_dir} /config/sdkconfig.json"
613618 "--interface_version=${component_manager_interface_version} "
614619 "prepare_dependencies"
615620 "--local_components_list_file=${local_components_list_file} "
@@ -618,7 +623,11 @@ macro(idf_build_process target)
618623 ERROR_VARIABLE error)
619624
620625 if (NOT result EQUAL 0)
621- message (FATAL_ERROR "${error} " )
626+ if (result EQUAL ${__RERUN_EXITCODE} )
627+ message (WARNING "${error} " )
628+ else ()
629+ message (FATAL_ERROR "${error} " )
630+ endif ()
622631 endif ()
623632
624633 include (${managed_components_list_file} )
@@ -689,21 +698,30 @@ macro(idf_build_process target)
689698 # Generate config values in different formats
690699 idf_build_get_property(sdkconfig SDKCONFIG)
691700 idf_build_get_property(sdkconfig_defaults SDKCONFIG_DEFAULTS)
692- __kconfig_generate_config("${sdkconfig} " "${sdkconfig_defaults} " )
701+
702+ # add target here since we have all components
703+ if (result EQUAL 0)
704+ __kconfig_generate_config("${sdkconfig} " "${sdkconfig_defaults} " CREATE_MENUCONFIG_TARGET)
705+ else ()
706+ __kconfig_generate_config("${sdkconfig} " "${sdkconfig_defaults} " )
707+ endif ()
708+
693709 __build_import_configs()
694710
695- # All targets built under this scope is with the ESP-IDF build system
696- set (ESP_PLATFORM 1)
697- idf_build_set_property(COMPILE_DEFINITIONS "ESP_PLATFORM" APPEND )
711+ if (result EQUAL 0)
712+ # All targets built under this scope is with the ESP-IDF build system
713+ set (ESP_PLATFORM 1)
714+ idf_build_set_property(COMPILE_DEFINITIONS "ESP_PLATFORM" APPEND )
698715
699- # Perform component processing (inclusion of project_include.cmake, adding component
700- # subdirectories, creating library targets, linking libraries, etc.)
701- __build_process_project_includes()
716+ # Perform component processing (inclusion of project_include.cmake, adding component
717+ # subdirectories, creating library targets, linking libraries, etc.)
718+ __build_process_project_includes()
702719
703- idf_build_get_property(idf_path IDF_PATH)
704- add_subdirectory (${idf_path} ${build_dir} /esp-idf)
720+ idf_build_get_property(idf_path IDF_PATH)
721+ add_subdirectory (${idf_path} ${build_dir} /esp-idf)
705722
706- unset (ESP_PLATFORM)
723+ unset (ESP_PLATFORM)
724+ endif ()
707725endmacro ()
708726
709727# idf_build_executable
0 commit comments