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.

CCS5.3.0.00090



Did you come cross the CCS5 displaying two different registers for the same variable?

I explain: I have written a C code calling a linear assembly. The variables in linear assembly are displayed using the "variables" window, these also show the "location" register which is different than the disassembly window, see attached file.
 
In the picture you will notice the variable "upper" is allocated A5 and B7. in addition to that the CCS5 does not update variables when you step through the code.
 


  • Naim,

    Please post C67x device-specific hardware questions in this C67x Single Core DSP Forum. Questions about the C64x+ simulator may be posted to the Code Composer Forum and questions about the compiler and assembly optimizer may be posted to the TI C/C++ Compiler Forum.

    The linear assembly program will be optimized as you have directed the compiler tools. If the optimizer finds a way to use multiple registers for a single variable, then it will do so. This is common in the C6000 architecture, and is not a surprising result.

    Regards,
    RandyP

  • Naim said:
    Did you come cross the CCS5 displaying two different registers for the same variable?

    It is not unusual for the compiler to allocate a symbol across two registers.  During some instructions, the variable is in one register.  During other instructions, it is in a different register.  This gets exposed more often in linear assembly than C code.  The debugger tries to keep up, but it is not surprising that it may struggle.  Did you notice that it gets it right for lower being in A5?  

    Naim said:
    in addition to that the CCS5 does not update variables when you step through the code.

    If you built the code with optimization (-o2 or higher), then that loop would be software pipelined.  You cannot single step through a loop which has been software pipelined.  On any given cycle, parts of different iterations of the loop are executing all at the same time.  Looking at this picture, though, makes me think you did not build with -o2.  I can only guess that this problem is also due to the debugger struggling to know which variables are in which registers.  If, during that instruction, the debugger has the variable to register mapping wrong, it will appear that the register did not update as expected.  

    Thanks and regards,

    -George