stm: Copy COPT style from unix port.

This commit is contained in:
Damien George 2014-02-12 20:55:33 +00:00
parent 648d9e6447
commit 780ba22bb8
1 changed files with 4 additions and 3 deletions

View File

@ -18,7 +18,7 @@ DFU=../tools/dfu.py
CROSS_COMPILE = arm-none-eabi-
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
CFLAGS = -I. -I$(PY_SRC) -I$(CMSIS_DIR) -I$(STMPERIPH_DIR) -I$(STMUSB_DIR) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4)
CFLAGS = -I. -I$(PY_SRC) -I$(CMSIS_DIR) -I$(STMPERIPH_DIR) -I$(STMUSB_DIR) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS += -I$(STMUSBD_DIR)
CFLAGS += -I$(STMUSBH_DIR)
CFLAGS += -I$(FATFS_DIR)
@ -26,9 +26,10 @@ CFLAGS += -I$(FATFS_DIR)
#Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS += -O0 -ggdb
CFLAGS += -g
COPT = -O0
else
CFLAGS += -Os -DNDEBUG
COPT += -Os -DNDEBUG
endif
LDFLAGS = --nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref