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.

The statements under IF(condition) is shown as excecuted even if the condition is not met !

Other Parts Discussed in Thread: TMS320F28335

Hi,

i am using sys/bios 5.2 (shipped in CCS 5.2) for my project.And TMS320F28335 DCS for the same.

I CLEAN build my project,and DEBUG it. I reset the CPU ,RESTART, RESUME the excecution.And put a break point in my desired location.Here The statements under IF(condition) is shown as excecuted even if the condition is not met !!.

on that these were the findings i got.....

findings:

       Though the condition was NOT TRUE,the execution statements within that IF were SEEN to be executing.But the good thing is, functionalities were not happening.

For example if a variable is assigned with constant ,it was not assigning,but showing it was been excecuted in IDE. when i look into DISASSEMBLY that also showed me excecuting properly.

Tanks & Regards,

Sunil



  • Sunil,

    I think what you are seeing is that CCS is having difficulty showing the corresponding C code for each assembly step of the CPU.  This can happen when stepping through code that has been optimized by the compiler.  When this happens I usually just watch the disassembly view.  If you want to see fully clean C language stepping I think you’ll need to disable optimizations for the build.

    There are some instructions on this thread for building for debug and turning off optimizations: http://e2e.ti.com/support/embedded/bios/f/355/p/210932/747419.aspx#747419  

    These instructions are for a different processor and application, but you should be able to follow similar steps to get better C-level debug for yours.

    Scott

  • hi,

    sorry for the late reply.

    The optimization is not at all performed for our project. I have the screen shot of the same, which is uploaded.please do have a look.

    Thanks & regards,

    Sunil

  • Sunil,

    Have you set the SYS/BIOS library type to debug as shown in that other thread?

    Also, can you clarify what code you are seeing mismatch in C debug view versus assembly?  Is it your application code, or within SYS/BIOS code?

    Can you include a screenshot showing an example?

    Thanks,
    Scott

  • hi,

    thanks for the reply, i ill forwrd it.

    regards,

    SUNIL