X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=example%2Fblink%2FMakefile;h=e5f704525a8da8eccb63c0d1857764deb96949ea;hb=ebaf5ac5be01306be8d806bfaa33834d9615552c;hp=1b310b1765e8984d1c92b8ef4a7239789934695d;hpb=52f3b4381b17e276beb1a4aec6b6d42b724fef01;p=fw%2Fstlink diff --git a/example/blink/Makefile b/example/blink/Makefile index 1b310b1..e5f7045 100644 --- a/example/blink/Makefile +++ b/example/blink/Makefile @@ -4,8 +4,15 @@ BIN_IMAGE=blink.bin CC=arm-none-eabi-gcc OBJCOPY=arm-none-eabi-objcopy -CFLAGS=-O2 -mlittle-endian -mthumb -CFLAGS+=-mcpu=cortex-m3 -ffreestanding -nostdlib -nostdinc +CFLAGS=-g -O2 -mlittle-endian -mthumb +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