diff options
author | mux <freelancer.c@gmail.com> | 2014-01-09 13:42:18 +0200 |
---|---|---|
committer | mux <freelancer.c@gmail.com> | 2014-01-09 13:42:18 +0200 |
commit | 74269f86b9aea00e8bcd4e44d028ca3bb78184ac (patch) | |
tree | c4bbbaf08a8860ccfef5e96b8f2939c77ad025e8 | |
parent | c70ac7bf71811ce17ff422b9448e1129bf438bd2 (diff) |
Add DEBUG flag to Makefile
* Add a DEBUG flag to Makefile, enables: "-O0 -ggdb"
-rw-r--r-- | stm/Makefile | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/stm/Makefile b/stm/Makefile index 644a64c47..95ee74dc6 100644 --- a/stm/Makefile +++ b/stm/Makefile @@ -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 = \ |