summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-22 17:08:41 +0700
committerhathach <[email protected]>2020-04-22 17:08:41 +0700
commitafc4042375f7fa283cf912f019e832aaf659e314 (patch)
tree34e1f7a3043ff17c375209d9d8bc48c942dbf1f6 /examples/make.mk
parent3aa3c359861ac3e581ef50a0c9ec8c291025673d (diff)
add LOGGER option to use rtt
update example readme for debug log. Update bug template to ask for LOG as well.
Diffstat (limited to 'examples/make.mk')
-rw-r--r--examples/make.mk12
1 files changed, 11 insertions, 1 deletions
diff --git a/examples/make.mk b/examples/make.mk
index f2a8b979e..78581f813 100644
--- a/examples/make.mk
+++ b/examples/make.mk
@@ -75,7 +75,17 @@ else
CFLAGS += -Os
endif
-# TUSB Logging option
+# Log level is mapped to TUSB DEBUG option
ifneq ($(LOG),)
CFLAGS += -DCFG_TUSB_DEBUG=$(LOG)
endif
+
+# Logger: default is UART, can be set to RTT
+ifeq ($(LOGGER),rtt)
+ RTT_SRC = lib/SEGGER_RTT
+
+ CFLAGS += -DLOGGER_RTT
+ INC += $(TOP)/$(RTT_SRC)/RTT
+ SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT_printf.c
+ SRC_C += $(RTT_SRC)/RTT/SEGGER_RTT.c
+endif