diff --git a/examples/stm32/f4/Makefile.include b/examples/stm32/f4/Makefile.include index 6ea1368..5272005 100644 --- a/examples/stm32/f4/Makefile.include +++ b/examples/stm32/f4/Makefile.include @@ -19,11 +19,14 @@ ## along with this library. If not, see . ## +# You should use linker script generation! Specify device! +ifeq ($(DEVICE),) LIBNAME = opencm3_stm32f4 DEFS += -DSTM32F4 FP_FLAGS ?= -mfloat-abi=hard -mfpu=fpv4-sp-d16 ARCH_FLAGS = -mthumb -mcpu=cortex-m4 $(FP_FLAGS) +endif ################################################################################ # OpenOCD specific variables diff --git a/examples/stm32/f4/stm32f4-discovery/adc-dac-printf/Makefile b/examples/stm32/f4/stm32f4-discovery/adc-dac-printf/Makefile index 35d1111..4f4af41 100644 --- a/examples/stm32/f4/stm32f4-discovery/adc-dac-printf/Makefile +++ b/examples/stm32/f4/stm32f4-discovery/adc-dac-printf/Makefile @@ -18,7 +18,7 @@ ## BINARY = adc-dac-printf -LDSCRIPT = ../stm32f4-discovery.ld +DEVICE=STM32F407VG include ../../Makefile.include diff --git a/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile b/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile index 6f17986..022c78b 100644 --- a/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile +++ b/examples/stm32/f4/stm32f4-discovery/miniblink/Makefile @@ -19,7 +19,7 @@ BINARY = miniblink -LDSCRIPT = ../stm32f4-discovery.ld +DEVICE=STM32F407VG include ../../Makefile.include