NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. 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.

Debugging DSPLink using SET FAILURE REASON prints

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]

When a DSPLink API call fails with error, the error code provides information about the type and cause of failure.

However, sometimes, even though the error code is known, it is not clear why the failure is occurring. For example, a generic failure code is seen DSP_EFAIL, which may be returned from multiple locations within DSPLink. It is not immediately obvious where the failure lies. In this case, the further level of debugging can be used, by just enabling SET_FAILURE_REASON print.

SET_FAILURE_REASON is a technique used within DSPLink to log failure occurring at any location within the source code. By printing the failure reason, it gives immediate information about the file, line number and failure code, which can be used to understand why the failure has occurred. Since DSPLink source code is available for reference, the reason for failure can be identified in most cases.

Enabling SET_FAILURE_REASON prints on user-side[edit]

If TRACE is enabled, in case of any API failure, SET_FAILURE_REASON prints will start coming within the output to the console. For instructions on enabling trace, refer to the Enabling trace in DSPLink article.

Enabling SET_FAILURE_REASON prints on kernel-side[edit]

File: ${DSPLINK}/dsplink/gpp/src/gen/trc.c
Function: TRC_SetReason()
Existing Code:
<syntaxhighlight lang='c'>

  1. if defined(DDSP_DEBUG)
   TRC_3PRINT (TRC_LEVEL7,
               "Failure [0x%x] in [0x%x] at line %d\n",
               status, FileId, Line) ;
  1. endif /* #if defined(DDSP_DEBUG) */

</syntaxhighlight>

Add: <syntaxhighlight lang='c'>

    PRINT_Printf ("Failure [0x%x] in [0x%x] at line %d\n",
                  status, FileId, Line) ;

</syntaxhighlight>

  • Now rebuild the GPP-side of DSPLink in debug build.
  • Run the application
  • Some kernel prints will be seen of the type:
Failure [0x8000800C] in [0x71B] at line 455 

To interpret this:

  • Refer to release source code for the interpretation of the numbers in above statement.
  • File ${DSPLINK}/gpp/inc/_signature.h has the identifiers for all source files.
  • 0x8000800C is the error code. It is DSP_EMEMORY.
  • The 0x71B refers to file identifiers. From the _signature.h file, this corresponds to FID_C_LDRV_POOL source file, i.e. ldrv_pool.c.
  • The line number is 455 within the ldrv_pool.c file. This indicates that the failure DSP_EMEMORY is due to failure in allocation from shared memory, which means that the amount of shared memory specified for the pool cannot fit into the specified memory entry in the configuration.
  • The first SET_FAILURE_REASON print usually indicates the original cause of failure. The subsequent failures usually occur as a result of the first 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 Debugging DSPLink using SET FAILURE REASON prints 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 Debugging DSPLink using SET FAILURE REASON prints here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Debugging DSPLink using SET FAILURE REASON prints 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