kopia lustrzana https://github.com/stlink-org/stlink
Added multiple-board support to blink_flash Makefile
rodzic
93051281c7
commit
f10d08b4a5
|
|
@ -5,7 +5,18 @@ CC=arm-none-eabi-gcc
|
||||||
OBJCOPY=arm-none-eabi-objcopy
|
OBJCOPY=arm-none-eabi-objcopy
|
||||||
|
|
||||||
CFLAGS=-O2 -mlittle-endian -mthumb
|
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
|
# to run from FLASH
|
||||||
CFLAGS+=-Wl,-T,stm32_flash.ld
|
CFLAGS+=-Wl,-T,stm32_flash.ld
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue