projects
/
fw
/
stlink
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'jnosky/master'
[fw/stlink]
/
example
/
blink_flash
/
Makefile
diff --git
a/example/blink_flash/Makefile
b/example/blink_flash/Makefile
index 77764715d9f42de214acc8895786329624ff49cb..46117311e4a98df7c6523d6123d37e4abb9aa011 100644
(file)
--- a/
example/blink_flash/Makefile
+++ b/
example/blink_flash/Makefile
@@
-4,11
+4,9
@@
BIN_IMAGE=blink.bin
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
CC=arm-none-eabi-gcc
OBJCOPY=arm-none-eabi-objcopy
-CFLAGS=-O2 -mlittle-endian -mthumb
-
-CFLAGS=-g -O2 -mlittle-endian -mthumb
+CFLAGS=-O3 -mlittle-endian -mthumb
ifeq ($(CONFIG_STM32L_DISCOVERY), 1)
ifeq ($(CONFIG_STM32L_DISCOVERY), 1)
- CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY
+ CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32L_DISCOVERY
=1
else ifeq ($(CONFIG_STM32VL_DISCOVERY), 1)
CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32VL_DISCOVERY=1
else ifeq ($(CONFIG_STM32F4_DISCOVERY), 1)
else ifeq ($(CONFIG_STM32VL_DISCOVERY), 1)
CFLAGS+=-mcpu=cortex-m3 -DCONFIG_STM32VL_DISCOVERY=1
else ifeq ($(CONFIG_STM32F4_DISCOVERY), 1)
@@
-16,18
+14,24
@@
else ifeq ($(CONFIG_STM32F4_DISCOVERY), 1)
else
$(error "must specify CONFIG_ for board!")
endif
else
$(error "must specify CONFIG_ for board!")
endif
-
CFLAGS+=-ffreestanding -nostdlib -nostdinc
+CFLAGS+=-ffreestanding -nostdlib -nostdinc
# to run from FLASH
CFLAGS+=-Wl,-T,stm32_flash.ld
# to run from FLASH
CFLAGS+=-Wl,-T,stm32_flash.ld
+# stm32l_discovery lib
+CFLAGS+=-I../libstm32l_discovery/inc
+CFLAGS+=-I../libstm32l_discovery/inc/base
+CFLAGS+=-I../libstm32l_discovery/inc/core_support
+CFLAGS+=-I../libstm32l_discovery/inc/device_support
+
all: $(BIN_IMAGE)
$(BIN_IMAGE): $(EXECUTABLE)
$(OBJCOPY) -O binary $^ $@
all: $(BIN_IMAGE)
$(BIN_IMAGE): $(EXECUTABLE)
$(OBJCOPY) -O binary $^ $@
-$(EXECUTABLE): main.c startup_stm32l1xx_md.s
- $(CC) $(CFLAGS) $^ -o $@
+$(EXECUTABLE): main.c s
ystem_stm32l1xx.c s
tartup_stm32l1xx_md.s
+ $(CC) $(CFLAGS) $^ -o $@
-L../libstm32l_discovery/build -lstm32l_discovery
clean:
rm -rf $(EXECUTABLE)
clean:
rm -rf $(EXECUTABLE)