From: Ned Konz Date: Thu, 20 Oct 2011 01:55:29 +0000 (-0700) Subject: Added multiple-board support to blink_flash Makefile X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=f10d08b4a5eeb253407f06f9ffba7ef87ab6ac91;p=fw%2Fstlink Added multiple-board support to blink_flash Makefile --- diff --git a/example/blink_flash/Makefile b/example/blink_flash/Makefile index d058390..7776471 100644 --- a/example/blink_flash/Makefile +++ b/example/blink_flash/Makefile @@ -5,7 +5,18 @@ 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 +else +$(error "must specify CONFIG_ for board!") +endif + CFLAGS+=-ffreestanding -nostdlib -nostdinc # to run from FLASH CFLAGS+=-Wl,-T,stm32_flash.ld