summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-01-29 11:24:05 +0700
committerhathach <[email protected]>2021-01-29 11:24:05 +0700
commitba69da1d8f93af91685e691e5441cd3bca5c71b0 (patch)
tree4c06ddb901d0182fea7f1696c53350406dd126a0 /examples/make.mk
parent4fef2ddb4c500f23115781aa87afd1f83b049b9d (diff)
add support for LOG=2
LOGGER=rtt is not tested since jlink doesn't support rp2040 just yet
Diffstat (limited to 'examples/make.mk')
-rw-r--r--examples/make.mk7
1 files changed, 6 insertions, 1 deletions
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)