NOTICE: The Processors Wiki will End-of-Life in December of 2020. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Enabling trace in DSPLink

From Texas Instruments Wiki
Jump to: navigation, search

END OF LIFE

DSP Link is still available for download, but no further releases or updates are planned. Please see IPC Software Options for details and alternatives.

Overview[edit]

In certain kinds of failures seen in applications, sometimes the system just hangs without a kernel crash dump. Or some Operating Systems do not provide such crash dump. In this case, it is useful to enable trace within DSPLink to give information about the APIs and steps that have resulted in the crash/hang.

Enabling trace[edit]

Run the dsplinkcfg.pl static build configuration script to enable trace

      ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
                 DSP/BIOS(TM) LINK  Configuration Tool
      ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

      Enable debug trace?

      0.   No

      1.   Yes

      ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

      YOUR CHOICE : 1

You can also enable trace when running the dsplinkcfg.pl script from the command line by providing the --trace=1 option.

Disabling trace for user-level prints (from API module)[edit]

User-level print levels cannot be controlled, and hence all user-level prints are automatically enabled. Sometimes this gives too many prints, and it is difficult to identify the exact failures. Also, if user and kernel-level prints are sent to the same console, they most often do not come in order, and it is difficult to identify the exact control flow. In such situations, it may be desirable to disable the user-level prints.

To disable the user-level prints, take the following steps: File: ${DSPLINK}/gpp/src/osal/print.h

Existing code: <syntaxhighlight lang='c'>

  1. if defined (TRACE_USER)

/* ----------------------------------------------------------------------------

*  Extern declaration for printf to avoid compiler warning.
*  ----------------------------------------------------------------------------
*/

extern int printf (const char * format, ...) ;

  1. define PRINT_Printf printf
  2. endif

</syntaxhighlight>

Change to: <syntaxhighlight lang='c'>

  1. if defined (TRACE_USER)

/* ----------------------------------------------------------------------------

*  Extern declaration for printf to avoid compiler warning.
*  ----------------------------------------------------------------------------
*/

extern int printf (const char * format, ...) ;

  1. define PRINT_Printf(...)
  2. endif

</syntaxhighlight>

This disables all user-level prints, so that only special focused kernel level prints can be logged as desired.

Enabling kernel-level prints[edit]

To enable kernel level prints, following additional steps are needed:
File: ${DSPLINK}/gpp/src/pmgr/${GPPOS}/${GPPOSVERSION}/drv_pmgr.c
For example: ${DSPLINK}/gpp/src/pmgr/Linux/2.6/drv_pmgr.c
OR
${DSPLINK}/gpp/src/pmgr/PrOS/drv_pmgr.c
Function: DRV_InitializeModule() (for Linux) OR DRV_PMGR_Initialize() (for PrOS)
Several component trace enables are available but commented out in this function. Enable trace prints for required components by uncommenting specific TRC_ENABLE calls.
Refer to file ${DSPLINK}/gpp/inc/_signature.h for component and sub-component ID definitions.
For example, to enable trace for selective LDRV subcomponents, uncomment some of the following lines as required: <syntaxhighligh lang='c'> /* TRC_ENABLE (ID_LDRV)  ; */ /* TRC_ENABLE (ID_LDRV_PROC)  ; */ /* TRC_ENABLE (ID_LDRV_CHNL)  ; */ /* TRC_ENABLE (ID_LDRV_MSGQ)  ; */ /* TRC_ENABLE (ID_LDRV_CHIRPS)  ; */ /* TRC_ENABLE (ID_LDRV_MPCS)  ; */ /* TRC_ENABLE (ID_LDRV_MPLIST)  ; */ /* TRC_ENABLE (ID_LDRV_RINGIO)  ; */ /* TRC_ENABLE (ID_LDRV_SMM)  ; */ /* TRC_ENABLE (ID_LDRV_DATA_ZCPY)  ; */ /* TRC_ENABLE (ID_LDRV_DRV)  ; */ /* TRC_ENABLE (ID_LDRV_DRV_SHM)  ; */ /* TRC_ENABLE (ID_LDRV_DSP)  ; */ /* TRC_ENABLE (ID_LDRV_HAL_OBJECT) ; */ /* TRC_ENABLE (ID_LDRV_HAL_INTGEN) ; */ /* TRC_ENABLE (ID_LDRV_HAL_PCI)  ; */ /* TRC_ENABLE (ID_LDRV_IPS)  ; */ /* TRC_ENABLE (ID_LDRV_IPS_IPS)  ; */ /* TRC_ENABLE (ID_LDRV_MQT)  ; */ /* TRC_ENABLE (ID_LDRV_MQT_ZCPY)  ; */ /* TRC_ENABLE (ID_LDRV_POOL)  ; */ /* TRC_ENABLE (ID_LDRV_POOL_SMA)  ; */ /* TRC_ENABLE (ID_LDRV_POOL_BUF)  ; */ /* TRC_ENABLE (ID_LDRV_POOL_MPBUF) ; */ </syntaxhighlight>

  • Set desired trace severity level. For example, if all prints are desired, set severity level as TRC_ENTER (default). If only error and specific prints are desired, for example severity could be set at TRC_LEVEL4:

<syntaxhighligh lang='c'> TRC_SET_SEVERITY (TRC_ENTER) ; </syntaxhighlight>

  • Now rebuild DSPLink
  • Rebuild the application
  • Run the application
  • Log the prints
  • Check the log and interpret it to see the cause and backtrace resulting in failure.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Enabling trace in DSPLink here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Enabling trace in DSPLink here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Enabling trace in DSPLink here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Enabling trace in DSPLink here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Enabling trace in DSPLink here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Enabling trace in DSPLink here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Enabling trace in DSPLink here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Enabling trace in DSPLink here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Enabling trace in DSPLink here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity