aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/usrp3/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/usrp3/CMakeLists.txt')
-rw-r--r--firmware/usrp3/CMakeLists.txt14
1 files changed, 14 insertions, 0 deletions
diff --git a/firmware/usrp3/CMakeLists.txt b/firmware/usrp3/CMakeLists.txt
index c25adb68a..f71b79b0c 100644
--- a/firmware/usrp3/CMakeLists.txt
+++ b/firmware/usrp3/CMakeLists.txt
@@ -68,6 +68,20 @@ FIND_PROGRAM(OBJDUMP zpu-elf-objdump)
FIND_PROGRAM(HEXDUMP hexdump)
########################################################################
+# Firmware tracing support
+########################################################################
+# Look at include/trace.h to see what the different trace levels map to.
+SET(TRACE_LEVEL "0" CACHE STRING "Firmware Trace Level") #0 by default
+OPTION(TRACE_LEVEL "Firmware Trace Level" "")
+IF(TRACE_LEVEL)
+ #If TRACE_LEVEL == 0, don't define UHD_FW_TRACE_LEVEL so that the C
+ #code can easily detect if tracing is requested
+ IF(${TRACE_LEVEL} GREATER 0)
+ ADD_DEFINITIONS(-DUHD_FW_TRACE_LEVEL=${TRACE_LEVEL})
+ ENDIF(${TRACE_LEVEL} GREATER 0)
+ENDIF(TRACE_LEVEL)
+
+########################################################################
# helper functions to build output formats
########################################################################
SET(GEN_OUTPUTS_BIN_SIZE "bin_size_not_set") #set before calling