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.

Does CCS have some key word to define build data and time?

Hey, I have used __TIME__ and __DATE__ in my projects for making the firmware show exact compile time. Now that I have updated my CCS from 5.1 to 5.3 it throws an error "Symbol '__DATE__' could not be resolved ...Semantic Error". Same project could be compiled with CCS V5.1 withour errors. Anything changed?

  • Matthias Lasch said:

    Hey, I have used __TIME__ and __DATE__ in my projects for making the firmware show exact compile time. Now that I have updated my CCS from 5.1 to 5.3 it throws an error "Symbol '__DATE__' could not be resolved ...Semantic Error". Same project could be compiled with CCS V5.1 withour errors. Anything changed?

    I believe that for some reason the compiler is having difficulty determining what the date & time is on the machine you are using.   The compiler folks may have some thoughts so I will move this post to their forum.

    -Lori

  • Matthias Lasch said:
    "Symbol '__DATE__' could not be resolved

    The __DATE__ preprocessor symbol should be replaced with a constant string like "May 6 2013" (quotes included).  For reasons unknown, this is not happening.  Try add the compiler flag --gen_acp_raw and then inspect the resulting .rl file.  Hopefully, the problem will be obvious at that point.  This is documented in the section named Generating a Raw Listing File in the C2000 compiler manual.

    Thanks and regards,

    -George

  • Please show us the exact text of the error message; cut-and-paste it here if possible, use a screen capture if necessary.

  • Matthias Lasch said:
    Now that I have updated my CCS from 5.1 to 5.3 it throws an error "Symbol '__DATE__' could not be resolved ...Semantic Error".

    Can you confirm if the error you are seeing is a semantic error from CCS (reported by the CDT indexer) or a compiler error? If it is a compiler error, it will be reported in the CCS build console and Problems view. I suspect you are referring to an indexer error. If so, could you try opening a new workspace and import your project into it and see if the error persists?

    Please see thread with a similar semantic error issue: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/188055.aspx

  • My error message shows in the Problems view:

    Description Resource Path Location Type
    Symbol '__DATE__' could not be resolved debug.c  /iNRS-Datenumsetzer line 225  Semantic Error

     

     

    my code is:

     

    debug_txString("\rcreated ");

    debug_txString(__DATE__);

    debug_txByte(SPACE);

    debug_txString(__TIME__);

    debug_txByte(CR);

     

    Thanks for any help.

  • OK, I have activated raw output, as you recommended. BTW, It is the MSP430 compiler I am using. In the raw file I see following output:

    N debug_txString("\rcreated ");

    X usciA3_txString("\rcreated ");

    N debug_txString(__DATE__);

    X usciA3_txString("May  7 2013"); N

     debug_txByte(SPACE);

    X usciA3_txByte(0x20); N

     debug_txString(__TIME__);

    X usciA3_txString("11:34:12");

    N debug_txByte(CR);

    X usciA3_txByte(0x0D);

     

    Why do I get this error message, when __DATE__ and __TIME__ can be resolved?

  • I can see that __DATE__ is getting replaced by a string, as expected.  I have no idea why you are getting a diagnostic.  Please take a screenshot and attach it to your next post.

    Thanks and regards,

    -George

  • Here's a little screenshot:

     

  • Please check that CDT Build Console window.  Do the same diagnostic messages appear there?  If not, then you probably have the issue described in this thread, which means you need to create a new workspace, and import your project into it.

    Thanks and regards,

    -George

  • Yeah, this works great for me! (I was very glad that CCS Project import also took over my svn tags)