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 The site is now set to read only.

Debugging DSP side using DSPLink NOTIFY module

From Texas Instruments Wiki
Jump to: navigation, search


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


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.


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) */


  • 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) */


  • 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 */) ;



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

  • 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.