From ce8fa7e64604e44a3f77cecfd5bc046cf64c9344 Mon Sep 17 00:00:00 2001 From: Christina Quast Date: Fri, 13 Mar 2015 13:09:51 +0100 Subject: [PATCH] Add optional TRACE_*_WP switch --- sam3s_example/Makefile | 2 ++ .../atmel_softpack_libraries/libchip_sam3s/include/trace.h | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/sam3s_example/Makefile b/sam3s_example/Makefile index 27f63e88..c37852da 100644 --- a/sam3s_example/Makefile +++ b/sam3s_example/Makefile @@ -52,6 +52,8 @@ TRACE_LEVEL = 1 #FIXME: Remove this variable NOAUTOCALLBACK=no +#CFLAGS+=-DUSB_NO_DEBUG=1 + # Optimization level, put in comment for debugging OPTIMIZATION = -O0 diff --git a/sam3s_example/atmel_softpack_libraries/libchip_sam3s/include/trace.h b/sam3s_example/atmel_softpack_libraries/libchip_sam3s/include/trace.h index 8149eda7..5ae2f0ec 100644 --- a/sam3s_example/atmel_softpack_libraries/libchip_sam3s/include/trace.h +++ b/sam3s_example/atmel_softpack_libraries/libchip_sam3s/include/trace.h @@ -217,6 +217,13 @@ extern void TRACE_CONFIGURE( uint32_t dwBaudRate, uint32_t dwMCk ) ; #endif +#if defined(USB_NO_DEBUG) + #undef TRACE_DEBUG_WP + #define TRACE_DEBUG(...) { } + + #undef TRACE_INFO_WP + #define TRACE_INFO_WP(...) { } +#endif /** * Exported variables