summaryrefslogtreecommitdiffstatshomepage
path: root/teensy
diff options
context:
space:
mode:
authorJohn R. Lenton <jlenton@gmail.com>2014-01-13 13:25:10 +0000
committerJohn R. Lenton <jlenton@gmail.com>2014-01-13 13:25:10 +0000
commit95499193497ce1fd15de217f7b69fc2f91a37dbf (patch)
treeba72dacaf09f8063a166217859cbfeaf530c58e7 /teensy
parenta23a24f89c4b7e05d269aafb54a3d539dd1caa03 (diff)
downloadmicropython-95499193497ce1fd15de217f7b69fc2f91a37dbf.tar.gz
micropython-95499193497ce1fd15de217f7b69fc2f91a37dbf.zip
made DEBUG control CFLAGS in Makefiles oter than stm as well.
Diffstat (limited to 'teensy')
-rw-r--r--teensy/Makefile12
1 files changed, 11 insertions, 1 deletions
diff --git a/teensy/Makefile b/teensy/Makefile
index 8046f862ac..e25f81481f 100644
--- a/teensy/Makefile
+++ b/teensy/Makefile
@@ -24,10 +24,20 @@ SIZE = $(COMPILER_PATH)/arm-none-eabi-size
CFLAGS_TEENSY = -DF_CPU=96000000 -DUSB_SERIAL -D__MK20DX256__
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mcpu=cortex-m4 -fsingle-precision-constant -Wdouble-promotion $(CFLAGS_TEENSY)
-CFLAGS = -I. -I$(PY_SRC) -I$(CORE_PATH) -Wall -ansi -std=gnu99 -Os -DNDEBUG $(CFLAGS_CORTEX_M4) -D$(TARGET)
+CFLAGS = -I. -I$(PY_SRC) -I$(CORE_PATH) -Wall -ansi -std=gnu99
LDFLAGS = -nostdlib -T mk20dx256.ld
LIBS = -L $(COMPILER_PATH)/../lib/gcc/arm-none-eabi/4.7.2/thumb2 -lgcc
+#Debugging/Optimization
+ifdef DEBUG
+CFLAGS += -Og -ggdb
+else
+CFLAGS += -Os #-DNDEBUG
+endif
+
+# if order is not important for these, move them up
+CFLAGS += $(CFLAGS_CORTEX_M4) -D$(TARGET)
+
SRC_C = \
main.c \
lcd.c \