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.

Identify firmware version with build sequences

Hello, 

I am working on MSP430 microcontrollers  with CCSv4 and I  wonder if it's a possible to get the number of build (which is incremental at each build sequence)  and write it into the data flash of the micro targeted. This could be useful to identify different versions.

 

Thank you

  • Hi,

    This should be done manually. There are two compiler macros (__DATE__ and __TIME__) that can be used to provide a timestamp of the build.

    Check section 2.6.1 of the MSP430 Optimizing Compiler User's Guide (link here).

    Hope this helps,

    Rafael

  • Hi Rafael,

     

    Thanks for your short reply.

    I have seen this timestamp function but I expected somethig easier to implement. I don't used to work with macro and I think this doc don't help to.  

     what kind of preprocessor should I use to convert _DATE_ macro into an integer and have something similar  to :

    #define VERSION_FIRMWARE  int(_DATE_)