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.

Breakpoint not working when set from DSS script - C6657

I am trying to set a breakpoint in order to make the C6657 DSP halt at the beginning of an interrupt service routine. I use Debug Server Scripting and have written a DSS script to extract the address of the ISR name and set a breakpoint using the DSS API.

// Start debug session for Core1
debugSession = debugServer.openSession(“Texas Instruments XDS2xx USB Emulator_0/C66xx_1”);  
debugSession.target.connect(); // Connect to target
debugSession.target.reset(); // Reset the target
debugSession.memory.loadProgram(“absolute path for the .out file”); // Load the .out file

nameFunction = “c_int09”;
addressFunction = debugSession.symbol.getAddress(nameFunction); // Get address of ISR
breakpoint1 = debugSession.breakpoint.add(addressFunction); // add breakpoint at ISR
                                                            // returns the value "9",
                                                            // indicating that breakpoint has been set.

debugSession.target.run(); // run the target
                           // this is where the problem happens and the control never returns to the script

When running the script, everything executes fine till the "run" statement. The script just hangs after that. The control is meant to return to the script after running the DSP code, once it hits the breakpoint. That doesn't happen, hence I am inclined to think that the breakpoint is never hit. However, when using CC Studio to debug the DSP, the breakpoint is hit and the DSP halts at the breakpoint that I have set at the start of the ISR in CCS Debug Perspective. This indicates that the configuration is correct.

Why is that happening? If CCS Debug can detect the breakpoint, the DSS script should be able to as well. Is there another way to set the breakpoint for this DSP? Any help is greatly appreciated.

DSS API Definition for the method to sett the breakpoint: 

public int add(long nAddress) throws ScriptingException
Set a breakpoint at a particular address.

Parameters:
nAddress - the address at which the breakpoint is to be set.

Returns:
The numeric ID of the breakpoint that was set, or -1 on failure.

Throws:
ScriptingException

DSP Code Snippet 

#define PERIOD 50                                          // 1/(20kHz) = 50us
typedef float DefaultType;
DefaultType fTI_ADC1 = 0.0F, fSUM1 = 0.0F, fSUMP1 = 0.0F;

interrupt void c_int09(void)                               // Timer0 interrupt routine
{
  DefaultType fB4, fk2, fk1, fZ1, fVDC2;
  fVDC2 = 2;
  fZ1 = fTI_ADC1;
  fSUM1 = fVDC2 - fZ1;
  fk1 = fSUM1 * 0.4;
  fk2 = fSUM1 * 1000;
  {
    static DefaultType out_A = 0;
    fB4 = out_A + 1.0/20000 * (fk2);
    out_A = fB4;
  }
  fSUMP1 = fk1 + fB4;
  C6657_timer0_clear_eventflag();
}

void main(void)
{
  int_disable();                 // Disabling all interrupt
  C6657_timer0_init(PERIOD);     // Initialization of Timer0 and setting interrupt period
                                 // After the initialization, Timer0 is stopped,
                                 // and Timer0 interrupt is inactive.

  C6657_timer0_init_vector(c_int09, (CSL_IntcVectId)5); // Timer0 interrupt routine definition
  C6657_timer0_start();                                 // Starting of Timer0 counter
  C6657_timer0_enable_int();                            // Enabling Timer0 interrupt
  int_enable();                                         // Enabling all interrupts

  while (1) {}
  /* NOTREACHED */
  return ;
}