Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Debugging the DSP side of a DSPLink application on OMAP-L137 using CCS

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.

This topic discusses how to debug the DSP-side of a DSPLink application using CCS on an OMAP-L137 EVM using an external emulator or the embedded emulation on the boards.

It assumes that you are familiar with all of the content in the Getting Started Guide, you can navigate around CCS fairly well, and can rebuild the DSP Link examples.

This procedure is an adaptation of the procedure described in this Debugging the DSP side of a DSPLink application on OMAP using CCS page from the OMAP3 to OMAP-L137.

Before you get started

  • Follow the Getting Started Guide for OMAP-L137
  • Install CCS Service Release 12 - it is available for Download at the Update Advisor webpage.
  • Install the appropriate emulation drivers and make sure you can connect to your DSP board.
  • Rebuild the DSPLink message example and verify if it runs without any issue. For details please refer to steps 4 and 5 of this article.

Set the EVM switches

  • Power-off EVM and setup it to boot from SPI0 Flash (assuming that you are using SPI FLASH that is the default boot mode for the EVM)
Pin # 7 2 1 0 3
Position 0 1 0 1 X

For more information, please see the the EVMOMAPL137 Technical Reference.

Modify the DSPLink message example

- In the message example, the modification should be done at /home/user/OMAPL137_arm_1_00_00_10/dsplink-1_61_03-prebuilt/packages/dsplink/dsp/src/samples/message/main.c around line 332.
/* ADD THE LINE BELOW */
volatile Int i=1;
 
#if defined (SWI_MODE)
  /* SWI based application */
  SWIMESSAGE_TransferInfo * info ;
  Int status ;
#else /* if defined (SWI_MODE) */
  /* TSK based application */
  TSK_Handle                tskMessageTask ;
#endif /* if defined (SWI_MODE) */
 
 /* ADD THE LINE BELOW AT THE END OF MAIN*/
while(i);

A rebuild is required and done by typing /home/<useracct>/OMAPL137_arm_1_00_00_10/xdctools_3_10_05_61/gmake -s in the dsp/src/samples/message directory. Please see Step 5: at the page Building_The_OMAP-L137_SDK - DSPLink

Connecting to CCS

This process will depend on the settings of SW2:

  1. Power-off EVM and set it up to boot from SPI0 Flash (assuming that you are using SPI FLASH that is the default boot mode for the EVM)
    Pin # 7 2 1 0 3
    Position 0 1 0 1 X

    For more information, please see the the EVMOMAPL137 Technical Reference.

  2. Power on the board and abort autoboot by hitting any key (Hit any key to stop autoboot: 3) at teraterm
  3. Start Setup Code Composer Studio and for OMAP-L137 and the kind of emulation you are using (embedded or external emulator). Then choose Save and Quit and start Code Composer Studio. Or just click on the EVMOMAP-L137 CCStudio v3.3 icon in your desktop if you have the DSK version of CCS.
  4. If when you open CCS it tries to connect automatically, then cancel/ignore - you are not going to be able to connect to the board at this point.
  5. When the CCS Parallel Debug Manager comes up, right click on TMS320C674XP_0 and select Open. On the left, expand GEL Files and if you configuration has a GEL file associated with it, right click on the file and select Remove. This way the GEL file does not interfere with your configurations.

    DSPLINK DEBUG 1.JPG

  6. Boot Linux by typing boot .
  7. Login as root and create a directory in your file system to be able to put your application, for example:
    target $ mkdir /opt/message
    target $ cd /opt/message
    • This directory should contain:
    • dsplinkk.ko
    You can get dsplinkk.ko at /home/<useracct>/OMAPL137_arm_1_00_00_10/dsplink-1_61_03-prebuilt/packages/dsplink/gpp/export/BIN/Linux/OMAPL1XX/RELEASE
    • message.out
    You can get message.out at /home/user/OMAPL137_arm_1_00_00_10/dsplink-1_61_03-prebuilt/packages/dsplink/dsp/BUILD/OMAPL1XXGEM_0/MESSAGE/BIN/DEBUG
    • messagegpp
    You can get messagegpp at /home/user/OMAPL137_arm_1_00_00_10/dsplink-1_61_03-prebuilt/packages/dsplink/gpp/BUILD/MESSAGE/BIN/DEBUG after you build the example
  8. Load dsplinkk.ko module:
    insmod dsplinkk.ko
    rm -f /dev/dsplink
    mknod /dev/dsplink c 230 0
  9. Call the application
    ./messagegpp message.out 3
    You should see:
    root@xxx.xxx.xxx.xxx:/opt/message# ./messagegpp message.out 3
    ========== Sample Application : MESSAGE ==========
    Entered MESSAGE_Create ()
  10. Go to CCS and connect DSP:

    DSPLINK DEBUG 2.JPG

  11. Open the file <main.c> and other source files to debug in CCS (you might need to copy it to your windows machine where CCS is)
  12. In the CCS DSP Window, select File->Load Symbols->Load Symbols Only, and browse to the <message.out> file (again, you might need to copy it to your windows machine where CCS is).
  13. In the message example, the DSP is stuck in the while(i) loop that was setup previously. To have it continue with the program, right-click on the instruction after the loop and select Set PC to cursor. Now you are able to step through the DSP-side code.

    DSPLINK DEBUG 3.JPG