summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
Diffstat (limited to 'examples/make.mk')
-rw-r--r--examples/make.mk16
1 files changed, 15 insertions, 1 deletions
diff --git a/examples/make.mk b/examples/make.mk
index f2a8b979e..319ceece8 100644
--- a/examples/make.mk
+++ b/examples/make.mk
@@ -75,7 +75,21 @@ 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 or swo
+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
+
+else ifeq ($(LOGGER),swo)
+ CFLAGS += -DLOGGER_SWO
+
+endif