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.

arm compiler preprocessor problem



I am having a preprocessor problem with the ARM compiler. Probably something that I didn't specify right, but cannot find out what.

file A.h has a #define X 1 file B.c has an #if X ... #endif which ccsv5 shows in gray, ie not processed even though X has a non-zero value
B.pp shows A.h included before the #if...#endif sequence.
I am baffled by this behavior and have no idea what to try next.

btw: if i set A.h to #define X then I get a syntax error when the compiler processes the #if X ...#endif sequence in B.c; which is expected!
Any insight would be most appreciated. Thanks, Jon

  • I am unable to reproduce this issue.  We need a test case which allows us to reproduce this behavior.  In this case we need to know the version of CCS, the version of compiler, and a project.

    Thanks and regards,

    -George

  • George,

    If you give me a secure place, I will upload the entire workspace and give you more specifics about the problem. It's about 15MB in size.

    Jon

  • The entire workspace is not needed.  Just the project. Please follow these steps:

    • Right-click the project name and choose: Clean Project.  This removes object files etc.
    • Select File -> Export
    • In the next dialog select: General -> Archive File.  From there I think creating a .zip of your project is straightforward.
    • Back here on the forum, click on my name or Avatar
    • In the upper right click on: Start Conversation.  This brings up an interface for sending a private message to me.  You can attach the .zip file to the message.
    Please include the version number of both CCS and the compiler.
    Thanks and regards,
    -George
  • To close this one out ... It turns out the user code has ...

    #if __TMS470__

    in it.  The symbol __TMS470__ is predefined by the compiler.  As already discussed in this thread, CCS does not display code around such preprocessor symbols correctly.

    Thanks and regards,

    -George