Commit 780ba22b authored by Damien George's avatar Damien George
Browse files

stm: Copy COPT style from unix port.

parent 648d9e64
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment