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.

strange problem with conditional compilation

Other Parts Discussed in Thread: SIMPLICITI

I have a symbol (SW_TIMER) that is defined in the Project Config File.

This symbol is used in a few files inside the projecct.

In CCS V5, some conditional code based on this symbol is grayed-out ( as if the symbol was not defined ) and yet the debugger runs this code.

In other files, it is the other way around. In some instance, in debug mode, if I over a constant that was based on the SW_TIMER symbol. It shows the value as if the symbol was not defined but when it executes it uses the correct value (the defined value) as opposed to the shown overing value.

In general, I have no clue how to debug macros. I avoid them whenever I can. But I am using the simpliciTI stack for this project so there is no way around.

HELP PLEASE

  • Sometimes the CCS editor greys out lines of code that really are active.  I'm sorry I can't be more precise.  Here is one example I know about.

    As for debugging macros, or preprocessing in general, considering building with --gen_acp_raw and inspecting the resulting .rl file.  Details are in the section titled Generating a Raw Listing File in the compiler user's guide.  You don't say which target you are using, so this link shows you all the compiler manuals.

    Thanks and regards,

    -George