@@ -579,11 +579,15 @@ macro(idf_build_process target)
579
579
580
580
# Call for component manager to download dependencies for all components
581
581
idf_build_get_property(idf_component_manager IDF_COMPONENT_MANAGER)
582
+
583
+ set (result 0)
582
584
if (idf_component_manager EQUAL 1)
583
585
idf_build_get_property(build_dir BUILD_DIR)
584
586
set (managed_components_list_file ${build_dir} /managed_components_list.temp.cmake)
585
587
set (local_components_list_file ${build_dir} /local_components_list.temp.yml)
586
588
589
+ set (__RERUN_EXITCODE 10) # missing kconfig
590
+
587
591
set (__contents "components:\n " )
588
592
idf_build_get_property(build_component_targets BUILD_COMPONENT_TARGETS)
589
593
foreach (__build_component_target ${build_component_targets} )
@@ -610,6 +614,7 @@ macro(idf_build_process target)
610
614
"idf_component_manager.prepare_components"
611
615
"--project_dir=${project_dir} "
612
616
"--lock_path=${dependencies_lock_file} "
617
+ "--sdkconfig_json_file=${build_dir} /config/sdkconfig.json"
613
618
"--interface_version=${component_manager_interface_version} "
614
619
"prepare_dependencies"
615
620
"--local_components_list_file=${local_components_list_file} "
@@ -618,7 +623,11 @@ macro(idf_build_process target)
618
623
ERROR_VARIABLE error)
619
624
620
625
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 ()
622
631
endif ()
623
632
624
633
include (${managed_components_list_file} )
@@ -689,21 +698,30 @@ macro(idf_build_process target)
689
698
# Generate config values in different formats
690
699
idf_build_get_property(sdkconfig SDKCONFIG)
691
700
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
+
693
709
__build_import_configs()
694
710
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 )
698
715
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()
702
719
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)
705
722
706
- unset (ESP_PLATFORM)
723
+ unset (ESP_PLATFORM)
724
+ endif ()
707
725
endmacro ()
708
726
709
727
# idf_build_executable
0 commit comments