From ad4bf75367b1b1992d653428593c0f66f5b5e7ff Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 1 Sep 2020 10:05:13 -0500 Subject: [PATCH] samd: only set NDEBUG for non-debug builds --- ports/atmel-samd/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 30487ae3ef..25dc0cf15e 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.