From afc4042375f7fa283cf912f019e832aaf659e314 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 22 Apr 2020 17:08:41 +0700 Subject: add LOGGER option to use rtt update example readme for debug log. Update bug template to ask for LOG as well. --- examples/make.mk | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'examples/make.mk') 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 -- cgit v1.3.1