What are the different levels of debug in the mesh stacks and how do I enable them?

by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> Silicon_Labs on ‎06-28-2012 06:05 PM - edited on ‎09-13-2017 11:08 PM by <a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero Employee</font></font> </a> zigmaster
Question

 

What are the different levels of debug in the EmberZNet and Silicon Labs Thread stacks, what features are enabled, and how do I access them?




Answer

 

Here is a summary of the three different debug options and how to access them.  

Note: The Packet Trace Interface (PTI) provided on PTI_FRAME and PTI_DATA (also called FRC_DFRAME and FRC_DOUT) pins is a separate peripheral configured in the HAL and isn't affected by the choice of debug levels below.


NO DEBUG: Select this by disabling both the Debug Basic Library and the Debug Extended Library.  This causes the firmware not to use SWDIO or SWO at all for communications at runtime, but the Debug JTAG.  PTI ("Packet" events in Network Analyzer) will still be available if the peripheral is enabled, however.


•BASIC DEBUG:  This is the default behavior for new application configurations. This requires the Debug Basic Library plugin and the Debug JTAG plugin. Basic debug includes the following features:
1.node reset message ("Reset" events) with "ZnetVer" events to track stack version at init time
2.the assert output ("Assert" events)
3.core dump output ("CoreDump" events)
4.virtual UART input and output ("Printf" events) when "serial 0" port is enabled
5.basic node information request and response ("NodeInfo" events)

6.EZSP command and response transactions ("EZSP" events)

FULL DEBUG :  This is a superset of Basic Debug functionality and requires adding the Debug Extended Library plugin to the above prerequisites of Basic Debug.  Added features in this mode include:
1.API call trace output ("APITrace" events)
2.debug error output (some additional "Printf" events)
3.debug printf output ("Debug" events) from emberDebugPrintf()