summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-04-22 17:40:14 +0700
committerGitHub <[email protected]>2020-04-22 17:40:14 +0700
commit894a09f2ae7082fd9e850b76febed12dafecdcd4 (patch)
treef611ce0a18301169bae433886de1febcbcb754e4 /examples/make.mk
parente23206821f6b060f384962cfb71f8cbb65b45c0f (diff)
parent7784b9c48f9e77d740ccc7e4929c5e944cdb1afd (diff)
Merge pull request #372 from hathach/add-rtt
Add rtt as logger option
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