<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Build Date Time for Version Control in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267683#M10085</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ANSI-C provides two macros:&lt;/P&gt;&lt;P&gt;__DATE__&lt;/P&gt;&lt;P&gt;__TIME__&lt;/P&gt;&lt;P&gt;which can be used for this. They get replaced by the compiler with the actual data and time.&lt;/P&gt;&lt;P&gt;I'm using this in my own firmware like this:&lt;/P&gt;&lt;P&gt;byte CLS1_PrintStatus(CLS1_ConstStdIOType *io)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\nSYSTEM STATUS\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStatusStr((const unsigned char*)"Firmware", (const unsigned char*)__DATE__, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)" ", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)__TIME__, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; return ERR_OK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;You can see an example output of this in this blog post (last screenshot):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/08/05/a-shell-for-the-freedom-kl25z-board/" title="http://mcuoneclipse.com/2012/08/05/a-shell-for-the-freedom-kl25z-board/"&gt;A Shell for the Freedom KL25Z Board &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;I hope this helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 May 2013 16:36:16 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2013-05-31T16:36:16Z</dc:date>
    <item>
      <title>Build Date Time for Version Control</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267681#M10083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Hi All &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;I am using CodeWarrior 10.4 for Kinetis. I would like to timestamp my builds with date-time at the build and use this string constant to print at the time of startup of the firmware. Does anyone have the idea of how it can be done in Eclipse/Codewarrior? &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Regards, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Yogendra&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 10:46:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267681#M10083</guid>
      <dc:creator>yanam</dc:creator>
      <dc:date>2013-05-31T10:46:21Z</dc:date>
    </item>
    <item>
      <title>Re: Build Date Time for Version Control</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267682#M10084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Yogendra,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe the macro you are searching for is: __DATE__&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the online help&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 16:19:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267682#M10084</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2013-05-31T16:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: Build Date Time for Version Control</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267683#M10085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ANSI-C provides two macros:&lt;/P&gt;&lt;P&gt;__DATE__&lt;/P&gt;&lt;P&gt;__TIME__&lt;/P&gt;&lt;P&gt;which can be used for this. They get replaced by the compiler with the actual data and time.&lt;/P&gt;&lt;P&gt;I'm using this in my own firmware like this:&lt;/P&gt;&lt;P&gt;byte CLS1_PrintStatus(CLS1_ConstStdIOType *io)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\nSYSTEM STATUS\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)CLS1_DASH_LINE, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStatusStr((const unsigned char*)"Firmware", (const unsigned char*)__DATE__, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)" ", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)__TIME__, io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; CLS1_SendStr((unsigned char*)"\r\n", io-&amp;gt;stdOut);&lt;/P&gt;&lt;P&gt;&amp;nbsp; return ERR_OK;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;You can see an example output of this in this blog post (last screenshot):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2012/08/05/a-shell-for-the-freedom-kl25z-board/" title="http://mcuoneclipse.com/2012/08/05/a-shell-for-the-freedom-kl25z-board/"&gt;A Shell for the Freedom KL25Z Board &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;I hope this helps.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 May 2013 16:36:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Build-Date-Time-for-Version-Control/m-p/267683#M10085</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2013-05-31T16:36:16Z</dc:date>
    </item>
  </channel>
</rss>

