From f10d08b4a5eeb253407f06f9ffba7ef87ab6ac91 Mon Sep 17 00:00:00 2001 From: Ned Konz Date: Wed, 19 Oct 2011 18:55:29 -0700 Subject: [PATCH] Added multiple-board support to blink_flash Makefile --- example/blink_flash/Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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