diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3f23ccc089..329f44f8d9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,6 +15,7 @@ build_template_app: script: - git clone https://github.com/espressif/esp-idf-template.git - cd esp-idf-template + - make defconfig - make all test_nvs_on_host: diff --git a/make/project.mk b/make/project.mk index bfc9a2f7f6..99fa1c1a15 100644 --- a/make/project.mk +++ b/make/project.mk @@ -10,7 +10,7 @@ # Makefile is located. # -.PHONY: build-components menuconfig all build clean all_binaries +.PHONY: build-components menuconfig defconfig all build clean all_binaries all: all_binaries # other components will add dependencies to 'all_binaries' @echo "To flash all build output, run 'make flash' or:" @echo $(ESPTOOLPY_WRITE_FLASH) $(ESPTOOL_ALL_FLASH_ARGS) @@ -23,6 +23,7 @@ help: @echo "Welcome to Espressif IDF build system. Some useful make targets:" @echo "" @echo "make menuconfig - Configure IDF project" + @echo "make defconfig - Set defaults for all new configuration options" @echo "" @echo "make all - Build app, bootloader, partition table" @echo "make flash - Flash all components to a fresh chip" diff --git a/make/project_config.mk b/make/project_config.mk index b8808180c1..c813ac5849 100644 --- a/make/project_config.mk +++ b/make/project_config.mk @@ -28,10 +28,18 @@ ifeq ("$(wildcard $(PROJECT_PATH)/sdkconfig)","") $(PROJECT_PATH)/sdkconfig: menuconfig endif +defconfig: $(KCONFIG_TOOL_DIR)/mconf $(IDF_PATH)/Kconfig $(BUILD_DIR_BASE) + $(vecho) DEFCONFIG + $(Q) mkdir -p $(PROJECT_PATH)/build/include/config + $(Q) KCONFIG_AUTOHEADER=$(PROJECT_PATH)/build/include/sdkconfig.h \ + KCONFIG_CONFIG=$(PROJECT_PATH)/sdkconfig \ + COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" \ + COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \ + $(KCONFIG_TOOL_DIR)/conf --olddefconfig $(IDF_PATH)/Kconfig # Work out of whether we have to build the Kconfig makefile # (auto.conf), or if we're in a situation where we don't need it -NON_CONFIG_TARGETS := clean %-clean get_variable help +NON_CONFIG_TARGETS := clean %-clean get_variable help menuconfig defconfig AUTO_CONF_REGEN_TARGET := $(PROJECT_PATH)/build/include/config/auto.conf # disable AUTO_CONF_REGEN_TARGET if all targets are non-config targets