Allow using Segger RTT as debug output (#3052)
Firmware needs to be built with -DDEBUG=YES and -DDEBUG_SEGGER_RTT=YES to use this feature.
This commit is contained in:
@@ -44,6 +44,7 @@ option(RAS "RAS (SWR) enabled" ON)
|
||||
option(TEMPLATES "Model templates menu" OFF)
|
||||
option(TRACE_SIMPGMSPACE "Turn on traces in simpgmspace.cpp" ON)
|
||||
option(TRACE_LUA_INTERNALS "Turn on traces for Lua internals" OFF)
|
||||
option(DEBUG_SEGGER_RTT "Debug output to Segger RTT" OFF)
|
||||
option(DEBUG_WINDOWS "Turn on windows traces" OFF)
|
||||
option(DEBUG_YAML "Turn on YAML traces" OFF)
|
||||
option(DEBUG_LABELS "Turn on Labels traces" OFF)
|
||||
@@ -365,6 +366,11 @@ if(TRACE_LUA_INTERNALS)
|
||||
add_definitions(-DTRACE_LUA_INTERNALS_ENABLED)
|
||||
endif()
|
||||
|
||||
if(DEBUG_SEGGER_RTT)
|
||||
add_definitions(-DDEBUG_SEGGER_RTT)
|
||||
set(SRC ${SRC} ${THIRDPARTY_DIR}/Segger_RTT/RTT/SEGGER_RTT.c)
|
||||
endif()
|
||||
|
||||
if(DEBUG_WINDOWS)
|
||||
add_definitions(-DDEBUG_WINDOWS)
|
||||
endif()
|
||||
@@ -520,7 +526,7 @@ if(NATIVE_BUILD)
|
||||
target_compile_options(radiolib_native PUBLIC -DSIMU)
|
||||
add_dependencies(radiolib_native ${RADIO_DEPENDENCIES})
|
||||
set_property(TARGET radiolib_native PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
|
||||
|
||||
add_subdirectory(targets/simu)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user