From ba69da1d8f93af91685e691e5441cd3bca5c71b0 Mon Sep 17 00:00:00 2001 From: hathach Date: Fri, 29 Jan 2021 11:24:05 +0700 Subject: add support for LOG=2 LOGGER=rtt is not tested since jlink doesn't support rp2040 just yet --- examples/make.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'examples/make.mk') diff --git a/examples/make.mk b/examples/make.mk index e820989b7..5387a4ec4 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -112,13 +112,18 @@ endif # Log level is mapped to TUSB DEBUG option ifneq ($(LOG),) + CMAKE_DEFSYM += -DLOG=$(LOG) CFLAGS += -DCFG_TUSB_DEBUG=$(LOG) endif # Logger: default is uart, can be set to rtt or swo +ifneq ($(LOGGER),) + CMAKE_DEFSYM += -DLOGGER=$(LOGGER) +endif + ifeq ($(LOGGER),rtt) - RTT_SRC = lib/SEGGER_RTT CFLAGS += -DLOGGER_RTT -DSEGGER_RTT_MODE_DEFAULT=SEGGER_RTT_MODE_BLOCK_IF_FIFO_FULL + RTT_SRC = lib/SEGGER_RTT INC += $(TOP)/$(RTT_SRC)/RTT SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT.c else ifeq ($(LOGGER),swo) -- cgit v1.3.1