This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to debug Syslink Apps using ProcMgr_BootMode_Boot

I just had the local TI Rep come in and he setup a conference call to TI Santa Barbara and we got this issue resolved.  Here is the procedure:

1.  Build the DSP app using in the SDK using xdc XDCARGS="profile=debug"

2.  Build the linux-side app with a getchar() after the completion of ProcMgr.  Here is a fragment of my code:

 //Startup Syslink
  SysLink_setup ();

  /* Execute common startup functionality for all sample applications */
  SysLinkSamples_startup ();

  printf("Number of processors = %d\n", MultiProc_getNumProcessors());
 
  ProcManager_startup (DSP_procId, bootMode, DSP_filePath, resetVector);

  //Wait for the Emulator
  printf("Once the emulator is connected, hit return\n");
  getchar();  

At this point the DSP should be loaded and ready to go.

3.  Launch Target Configuration in CCS

4.  Connect to the DSP (leave the ARM alone!) without a GEL file

5.  Load Symbols

6.  Edit the Source Lookup to include the path to both the Bios code and to your DSP source

7.  Set and enable breakpoints and/or watch variables

8.  Hit return on the console to allow the ARM to continue and you're off to the races!

I need to re-evlauate the NoBoot mode.

Update:

It appears that the ProcMgr_BootMode_NoBoot mode does not work.  I use the same DSP code as with Bootmode, but the Linux-side code is changed to move the getchar() to before the ProcMgr stuff.  I was able to see what the DSP is doing however.  This is what I see from Linux:

DSP is loaded from JTAG
Once the emulator is connected, hit return

Entered SysLinkSamples_startup
Assertion at Line no: 302 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm-none-
linux-gnueabi/ti-syslink-02_00_00_68-r3i/syslink_02_00_00_68_beta1/ti/syslink/ut
ils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/IpcDrv.c: (st
atus >= 0) : failed
SysLinkSamples_osStartup
NumberAssertion at Line no: 318 in /swcoe/sdk/cm/netra/arago-tmp/work/dm816x-evm
-none-linux-gnueabi/ti-syslink-02_00_00_68-r3i/syslink_02_00_00_68_beta1/ti/sysl
ink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/hlos/knl/Linux/IpcDrv.
c: (status >= 0) : failed
 of processors = 4
Entered ProcManager_startup Assertion at Line no: 385 in /swcoe/sdk/cm/netra/ara
go-tmp/work/dm816x-evm-none-linux-gnueabi/ti-syslink-02_00_00_68-r3i/syslink_02_
00_00_68_beta1/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/ipc/
hlos/knl/Linux/HeapMemMPDrv.c: (cargs.args.create.handle != NULL) : failed
with reset vector = 7fffffff
ProcMgr_attach status: [0x97d2000]
After attach: ProcMgr_getState
    state [0x4]
Error in Ipc_control Ipc_CONTROLCMD_LOADCALLBACK [0xffffffff]
ProcMgr_close status: [0x97d2000]
Leaving ProcMgrApp_startup

The debug procedure works fine with the following changes:

Move the getchar to before ProcMgr:

 //Wait for the Emulator
  printf("Once the emulator is connected, hit return\n");
  getchar();  

  //Startup Syslink
  SysLink_setup ();

  /* Execute common startup functionality for all sample applications */
  SysLinkSamples_startup ();

  printf("Number of processors = %d\n", MultiProc_getNumProcessors());
 
  ProcManager_startup (DSP_procId, bootMode, DSP_filePath, resetVector);

1.  Use the modified GEL file to first connect to trhe ARM.  The GEL file is altered in the following part:

/* ------------------------------------------------------------------------ *
 *                                                                          *
 *  OnTargetConnect( )                                                      *
 *      Setup PADCTRL, Power, PLLs, DDR, & EMIF                             *
 *                                                                          *
 * ------------------------------------------------------------------------ */
OnTargetConnect( )
{
    GEL_TextOut( "Ok\n\n" );
}

2.  Turn off MMU

3.  Use the GEL script to remove the DSP reset

4.  Connect to the DSP using the Spectrum Digital GEL file

5.  Load program

6.  Edit the Source lookup, if not already done

7.  Set breakpoints and watch variables

8.  Startup the DSP

9. Turn the MMU back on

10.  Startup the ARM

11.  Hit return on the console to let the arm continue

 

Lee Holeva