summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Epler <jepler@gmail.com>2020-09-01 10:05:13 -0500
committerJeff Epler <jepler@gmail.com>2020-09-01 10:55:45 -0500
commitad4bf75367b1b1992d653428593c0f66f5b5e7ff (patch)
treebe5d3b2762f75f94e31941c3d5559a48fca9ccfe
parentee1b142f5d22f13658395b7eb2fc5420b88b45c0 (diff)
samd: only set NDEBUG for non-debug builds
-rw-r--r--ports/atmel-samd/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index 30487ae3e..25dc0cf15 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -107,7 +107,7 @@ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_
endif
# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
-CFLAGS += $(OPTIMIZATION_FLAGS) -DNDEBUG
+CFLAGS += $(OPTIMIZATION_FLAGS)
$(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
#Debugging/Optimization
@@ -121,6 +121,7 @@ ifeq ($(DEBUG), 1)
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
endif
else
+ CFLAGS += -DNDEBUG
# -finline-limit can shrink the image size.
# -finline-limit=80 or so is similar to not having it on.
# There is no simple default value, though.