Build for stlink with -Os.

This commit is contained in:
Gareth McMullin 2015-03-15 20:36:58 -07:00
parent c3f798438a
commit f5f87bf70f
2 changed files with 5 additions and 2 deletions

View File

@ -9,8 +9,10 @@ endif
BUILDDATE := `date +"%Y%m%d"`
CFLAGS += -Wall -Wextra -Wno-char-subscripts\
-O2 -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\
OPT_FLAGS ?= -O2
CFLAGS += -Wall -Wextra -Werror -Wno-char-subscripts\
$(OPT_FLAGS) -std=gnu99 -g3 -DBUILDDATE=\"$(BUILDDATE)\"\
-I. -Iinclude -Iplatforms/common -I$(PLATFORM_DIR) \
-DVERSION_SUFFIX=\"`../scripts/setlocalversion`\" -MD

View File

@ -2,6 +2,7 @@ CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
OBJCOPY = $(CROSS_COMPILE)objcopy
OPT_FLAGS = -Os
CFLAGS += -mcpu=cortex-m3 -mthumb \
-DSTM32F1 -DDISCOVERY_STLINK -I../libopencm3/include \
-I platforms/stm32