Skip to content

Commit ad4bf75

Browse files
committed
samd: only set NDEBUG for non-debug builds
1 parent ee1b142 commit ad4bf75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ports/atmel-samd/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ CFLAGS += -DCFG_TUSB_MCU=OPT_MCU_SAME5X -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_
107107
endif
108108

109109
# option to override default optimization level, set in boards/$(BOARD)/mpconfigboard.mk
110-
CFLAGS += $(OPTIMIZATION_FLAGS) -DNDEBUG
110+
CFLAGS += $(OPTIMIZATION_FLAGS)
111111

112112
$(echo PERIPHERALS_CHIP_FAMILY=$(PERIPHERALS_CHIP_FAMILY))
113113
#Debugging/Optimization
@@ -121,6 +121,7 @@ ifeq ($(DEBUG), 1)
121121
CFLAGS += -DENABLE_MICRO_TRACE_BUFFER
122122
endif
123123
else
124+
CFLAGS += -DNDEBUG
124125
# -finline-limit can shrink the image size.
125126
# -finline-limit=80 or so is similar to not having it on.
126127
# There is no simple default value, though.

0 commit comments

Comments
 (0)