summaryrefslogtreecommitdiff
path: root/examples/make.mk
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-04-22 19:50:23 +0700
committerhathach <[email protected]>2020-04-22 19:50:23 +0700
commit7acdcc2ebcf0d3e5a9949212d26d61357190dd7e (patch)
tree5dc4a6782a6028fab081b88cb6465a2994e19107 /examples/make.mk
parent19181ea11d4058b2b34672731bb650549f592418 (diff)
parente2cd5159fd041240257eb2d200ccee09ce26d08c (diff)
Merge branch 'master' into add-more-example
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