Add DEBUG flag to Makefile

* Add a DEBUG flag to Makefile, enables: "-O0 -ggdb"
This commit is contained in:
mux 2014-01-09 13:42:18 +02:00
parent c70ac7bf71
commit 74269f86b9

View File

@ -22,8 +22,16 @@ OBJCOPY = arm-none-eabi-objcopy
SIZE = arm-none-eabi-size
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 -DSTM32F40XX -DHSE_VALUE=8000000
CFLAGS = -I. -I$(PY_SRC) -I$(FATFSSRC) -I$(STMSRC) -Wall -ansi -std=gnu99 -Os -DNDEBUG $(CFLAGS_CORTEX_M4) -D$(TARGET)
CFLAGS = -I. -I$(PY_SRC) -I$(FATFSSRC) -I$(STMSRC) -Wall -ansi -std=gnu99 $(CFLAGS_CORTEX_M4) -D$(TARGET)
#CFLAGS += -I$(STMOTGSRC) -DUSE_HOST_MODE -DUSE_OTG_MODE
#Debugging/Optimization
ifeq ($(DEBUG), 1)
CFLAGS = -O0 -ggdb
else
CFLAGS = -Os -DNDEBUG
endif
LDFLAGS = --nostdlib -T stm32f405.ld
SRC_C = \