From 17b04972f9549f83d5ffcf73574e878a57fffa31 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 11 Jun 2020 16:14:11 +0200 Subject: [PATCH 1/3] makefiles/features_modules.inc.mk: convert bootloader_stm32 feature as module --- makefiles/features_modules.inc.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/makefiles/features_modules.inc.mk b/makefiles/features_modules.inc.mk index 38462db9ab..d1e6efce49 100644 --- a/makefiles/features_modules.inc.mk +++ b/makefiles/features_modules.inc.mk @@ -21,6 +21,9 @@ endif # select cpu_check_address pseudomodule if the corresponding feature is used USEMODULE += $(filter cpu_check_address, $(FEATURES_USED)) +# select bootloader_stm32 module if the feature is used +USEMODULE += $(filter bootloader_stm32, $(FEATURES_USED)) + # include puf_sram if used USEMODULE += $(filter puf_sram, $(FEATURES_USED)) From 1259a89acf98b83fe59713dee974d84bd937ec81 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Thu, 11 Jun 2020 16:14:49 +0200 Subject: [PATCH 2/3] cpu/stm32: remove useless bootloader dependency resolution --- cpu/stm32/Makefile.dep | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cpu/stm32/Makefile.dep b/cpu/stm32/Makefile.dep index aeba105e33..65202aab22 100644 --- a/cpu/stm32/Makefile.dep +++ b/cpu/stm32/Makefile.dep @@ -8,10 +8,6 @@ ifneq (,$(filter periph_usbdev,$(FEATURES_USED))) USEMODULE += xtimer endif -ifneq (,$(filter bootloader_stm32,$(FEATURES_USED))) - USEMODULE += bootloader_stm32 -endif - ifneq (,$(filter periph_uart_nonblocking,$(USEMODULE))) USEMODULE += tsrb endif From ef864bba39c8ccb1f959d28b017663171a7bf73d Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Mon, 28 Sep 2020 19:47:41 +0200 Subject: [PATCH 3/3] cpu/stm32: only build bootloader when the module is loaded --- cpu/stm32/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cpu/stm32/Makefile b/cpu/stm32/Makefile index 7cfdddf258..5a56d50d65 100644 --- a/cpu/stm32/Makefile +++ b/cpu/stm32/Makefile @@ -1,5 +1,9 @@ MODULE = cpu -DIRS = $(RIOTCPU)/cortexm_common periph stmclk vectors bootloader +DIRS = $(RIOTCPU)/cortexm_common periph stmclk vectors + +ifneq (,$(filter bootloader_stm32,$(USEMODULE))) + DIRS += bootloader +endif include $(RIOTBASE)/Makefile.base