Trident IoT Zigbee SDK
Loading...
Searching...
No Matches
tr_trace.h File Reference

Trident plugin for enabling ZBOSS trace output. More...

Go to the source code of this file.

Macros

#define TR_TRACE_LEVEL   4
 ZBOSS trace adjustments are defined here.
#define TR_TRACE_MASK

Functions

void tr_trace_init (void)
 Initialize ZBOSS trace functionality.
void tr_trace_deinit (void)
 Should be called before the app shuts down to deinit the trace subsystem.

Detailed Description

Trident plugin for enabling ZBOSS trace output.


How to use this plugin:

  1. Set the DEVICE_TYPE in config.cmake to use the TRACE library.
    • Example: # set(DEVICE_TYPE "ZED_TRACE")
  2. Make sure the build system has the tr_trace plugin files included in the framework build and that TR_TRACE_PLUGIN_ENABLE is passed in to GLOBAL_COMPILE_DEFINITIONS
  3. Use the tr_pre_stack_init_cb and tr_post_stack_shutdown_cb to enable the trace plugin. Example:
    {
    #ifdef TR_TRACE_PLUGIN_ENABLE
    #endif
    }
    {
    #ifdef TR_TRACE_PLUGIN_ENABLE
    #endif
    }
    void tr_trace_init(void)
    Initialize ZBOSS trace functionality.
    void tr_trace_deinit(void)
    Should be called before the app shuts down to deinit the trace subsystem.
    void tr_pre_stack_init_cb(void)
    Callback that fires just before the protocol stack is initialized. This is the first callback that is...
    void tr_post_stack_shutdown_cb(void)
    Callback that fires after the stack scheduler has been stopped. This is the last callback that is hit...
  4. Ensure hal_config.c/h have a UART configuration that can be consumed by trace output. This requires that tr_hal_trace_put_char() is defined and functional.
  5. Navigate to
    thirdparty/zboss_r23/devtools/win_com_dump 
    and read the readme.txt for how to build win_com_dump to start using ZBOSS trace messages.
  6. Example: from the root of thirdparty/zboss_r23, run command:
    • Linux:
      ./devtools/win_com_dump/lin_com_dump -U -br 115200 /dev/ttyUSB0 trace.log dump.log 
    • Windows:
      .\devtools\win_com_dump\win_com_dump.exe -U -br 115200 COM4 trace.log dump.log 
  7. To see the trace output, open or tail the file created at
    thirdparty/zboss_r23/trace.log 

SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com


Macro Definition Documentation

◆ TR_TRACE_LEVEL

#define TR_TRACE_LEVEL   4

ZBOSS trace adjustments are defined here.

All adjustments for this trace plugin can be made in the project's config.cmake by defining with the desired trace level and mask definitions.

See zboss_r23/include/zb_trace.h for helpful macros

◆ TR_TRACE_MASK

#define TR_TRACE_MASK
Value:
TRACE_SUBSYSTEM_NWK | \
TRACE_SUBSYSTEM_APS