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.

Debugger issue with code composer studio 4

Hi,

I'm working with OMAP L138 EVM.

My application is running under SYS BIOS 6.30.xx.xx in C6748 part of OMAP L138.

The application contains multiple threads (tasks) and one of the thread has,

myfunc()

{

     /*

     ** p1, p2 and p3 are global structures.

      */

      mychildfunc(&p1,&p2, &p3);

     ..............................

}

mychildfunc(struct1 *p1, struct2 *p2,  struct *p3)

{

    struct p;

    ........

     p = *p1;

     if(p->data < 0) {

       /* p->data is a int32 value */

        p->data = - p->data.

      }

   }

I saw in the watch window that the value (p->data > 0) is positive and I also confirmed this with the memory window.

 But, still the piece of code within the condition is getting executed. But, interestingly, the value remains the same(i.e.it's still positive value).

 I did confirmed the execution by putting break point in the dis assembly view.

 If I introduce a print statement in the function the function works fine.

 I also allocated enough amount of stack for the task and using ROV tool I verified that stack never overflown.

 Also, the A10 register which holds the address of P1 is changed at the end of the function.

Is this an expected behaviour?

 Is it  a bug in Code composer studio or my code has some issues?

Thanks & Best regards

Palanivel Guruvareddiar

P.S 1: CCS version is 4.2.1.

P.S 2: My application's .out is generated in a make file environment and I'm loading to the target via CCS.

  • palanivel guruvareddiar said:

        struct p;

        ........

         p = *p1;

         if(p->data < 0) {

    Is that exactly your code?  If so, I don't know how it compiles, since 'p' is not a struct pointer and therefore p->data is not valid.

    Should it be 'p.data'?

    Regards,

    - Rob

     

  • palanivel guruvareddiar said:

    I saw in the watch window that the value (p->data > 0) is positive and I also confirmed this with the memory window.

     But, still the piece of code within the condition is getting executed. But, interestingly, the value remains the same(i.e.it's still positive value).

     I did confirmed the execution by putting break point in the dis assembly view.

    Code generated by the compiler uses a feature of the C6000 devices called conditional operations.  See the Conditional Operations section of the C6700 CPU User's Guide.  An assembly language statement may look like this ...

    [B0] ADD .L1 A1,A2,A3

    Control does pass through the instruction.  But the ADD is carried out only if B0 contains a non-zero number.  In your case, all of the statements in the if block use this feature.  When you single step, control passes through the block.  But none of the instructions in it do anything.

    Thanks and regards,

    -George