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 DSP side using DSPLink NOTIFY module

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]

Several times, it is difficult to debug the DSP-side in GPP-DSP applications using DSP/BIOS Link. For example:

  1. JTAG/CCS is not available
  2. Failure is seen only in very specific condition, such as:
    1. Release build, where source-level debugging is not possible
    2. Race conditions which are not duplicated if emulator is connected
    3. Before execution reaches a place where the emulator can be connected/DSP execution can be stopped.

In such cases, it is very simple to use NOTIFY module as follows. Note that NOTIFY has no dependency on POOL or any other modules within DSPLink, and hence is the simplest to use of all the modules.

Method[edit]

The method to use NOTIFY for DSP-side debugging is:

  • Include notify.h in both the GPP and DSP-side application.
  • Register notification on the GPP-side for a callback function. Only minor code is needed. E.g.:

<syntaxhighlight lang='c'>

  1. if defined (DEBUG_APPLICATION)

NOTIFY_register (ID_PROCESSOR, /* Processor ID to talk with. */

                0,            /* IPS ID to be used */
                5,            /* IPS event number. Choose any unused number */
                myFxnDebug,   /* Callback function for debugging */
                NULL          /* Parameter (if any) for callback function */) ;
  1. endif /* if defined (DEBUG_APPLICATION) */

</syntaxhighlight>

  • Define the callback function:

<syntaxhighlight lang='c'>

  1. if defined (DEBUG_APPLICATION)
  Void myFxnDebug (Uint32 eventNo, Pvoid arg, Pvoid info)
  {
      printf ("In notify callback info %d\n", info) ;
  }
  1. endif /* if defined (DEBUG_APPLICATION) */

</syntaxhighlight>

  • Send notification from DSP-side:

<syntaxhighlight lang='c'> NOTIFY_notify (ID_GPP, /* Processor ID to send notification to. */

              0,      /* IPS ID to be used */
              5,      /* IPS event number. Choose any unused number. */
              info    /* 32-bit information to be sent across */) ;

</syntaxhighlight>

Usage[edit]

The notifications sent from DSP-side will be received as callbacks, and the print will be seen. This mechanism can be used for:

  • Getting information about sequence of operations on the DSP-side: A specific code can be assigned to each possible operation in the sequence on DSP-side. Based on the received callbacks on GPP-side, this can be decoded to get the actual sequence that has occurred.
  • Validity of data structures and any corruption. The 32-bit payload with the NOTIFY_notify() call can be used to send this information.

Other information[edit]

  • NOTIFY API is available in DSPLink v1.40.05 (1.40.03 onwards).
  • The callback will be received even if the NOTIFY_notify() call is made in DSP’s main function. This is because the GPP interrupt is registered in PROC_attach(), so the callback can be received anytime after that (once NOTIFY_register() is called).
  • The only thing to ensure is that NOTIFY_notify() must be used after DSPLINK_init() is called so that the modules have been initialized on DSP-side. Usually they will get initialized before main (e.g. if POOL is used). But if POOL, CHNL and MSGQ are all scaled out, the DSPLINK_init() in main() is the one that actually initializes these modules on DSP-side.
  • If POOL, CHNL and MSGQ are all included in the build, the very first init (i.e. POOL_init()) initializes the modules, so NOTIFY_notify() can be called anytime after this. This enables debugging using NOTIFY very early in the DSP/BIOSTM boot process.
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 DSP side using DSPLink NOTIFY module 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 DSP side using DSPLink NOTIFY module here.

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