X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=example%2Fblink%2FMakefile;h=6f31bb26f02a85f2c136b2b47d68772cc5e14642;hb=f4d4f19f6162fe4c75fffe0070f4cd090c824750;hp=1b310b1765e8984d1c92b8ef4a7239789934695d;hpb=2ec1e2b25d75766095e99ac158517d5128e2d287;p=fw%2Fstlink diff --git a/example/blink/Makefile b/example/blink/Makefile index 1b310b1..6f31bb2 100644 --- a/example/blink/Makefile +++ b/example/blink/Makefile @@ -5,7 +5,14 @@ CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy CFLAGS=-O2 -mlittle-endian -mthumb -CFLAGS+=-mcpu=cortex-m3 -ffreestanding -nostdlib -nostdinc +ifeq ($(CONFIG_STM32L_DISCOVERY), 1) + CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY +else ifeq ($(CONFIG_STM32VL_DISCOVERY), 1) + CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32VL_DISCOVERY=1 +else ifeq ($(CONFIG_STM32F4_DISCOVERY), 1) + CFLAGS+=-mcpu=cortex-m4 -DCONFIG_STM32F4_DISCOVERY=1 +endif + CFLAGS+=-ffreestanding -nostdlib -nostdinc # to run from SRAM CFLAGS+=-Wl,-Ttext,0x20000000 -Wl,-e,0x20000000