<?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: Does the __DATE__ &amp;amp; __TIME__ how to build in the upgrade file? in CodeWarrior Development Tools</title>
    <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/1477612#M8825</link>
    <description>&lt;P&gt;The MONTH definition won't work for June. It will always match January first.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2022 17:05:46 GMT</pubDate>
    <dc:creator>dario200</dc:creator>
    <dc:date>2022-06-21T17:05:46Z</dc:date>
    <item>
      <title>Does the __DATE__ &amp; __TIME__ how to build in the upgrade file?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789392#M6937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;I want to use the MACRO __DATE__ &amp;amp; __TIME__ to judge and select whether upgrade application file or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt;...&lt;BR /&gt; imgheader: org=0x0000C400, len=0x00000400&lt;BR /&gt;...&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GROUP : {&lt;BR /&gt; .imgheader LOAD (ADDR(imgheader)): {&lt;BR /&gt; KEEP(*(.imgheader))&lt;BR /&gt; }&lt;BR /&gt; } &amp;gt; imgheader&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#pragma section RW ".imgheader" ".imgheader" data_mode=far_abs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#define __imgheader __section(.imgheader)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;struct imgheader {&lt;BR /&gt; void *date;&lt;BR /&gt; void *time;&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example1:&lt;/P&gt;&lt;P&gt;__imgheader struct bdl_imgheader bdl_image_header = {&lt;BR /&gt; .date = __DATE__,&lt;BR /&gt; .time = __TIME__,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;example2:&lt;/P&gt;&lt;P&gt;#define YEAR ((((__DATE__ [7] - '0') * 10 + (__DATE__ [8] - '0')) * 10 + (__DATE__ [9] - '0')) * 10 + (__DATE__ [10] - '0'))&lt;BR /&gt; &lt;BR /&gt;#define MONTH (__DATE__ [2] == 'n' ? 0 \&lt;BR /&gt; : __DATE__ [2] == 'b' ? 1 \&lt;BR /&gt; : __DATE__ [2] == 'r' ? (__DATE__ [0] == 'M' ? 2 : 3) \&lt;BR /&gt; : __DATE__ [2] == 'y' ? 4 \&lt;BR /&gt; : __DATE__ [2] == 'n' ? 5 \&lt;BR /&gt; : __DATE__ [2] == 'l' ? 6 \&lt;BR /&gt; : __DATE__ [2] == 'g' ? 7 \&lt;BR /&gt; : __DATE__ [2] == 'p' ? 8 \&lt;BR /&gt; : __DATE__ [2] == 't' ? 9 \&lt;BR /&gt; : __DATE__ [2] == 'v' ? 10 : 11)&lt;BR /&gt; &lt;BR /&gt;#define DAY ((__DATE__ [4] == ' ' ? 0 : __DATE__ [4] - '0') * 10 + (__DATE__ [5] - '0'))&lt;BR /&gt; &lt;BR /&gt;#define VERSION_DATE ((YEAR &amp;lt;&amp;lt; 16) | (MONTH &amp;lt;&amp;lt; 8) | (DAY &amp;lt;&amp;lt; 0))&lt;/P&gt;&lt;P&gt;#define HOUR (((__TIME__ [0]-'0')*16)+(__TIME__ [1]-'0'))&lt;/P&gt;&lt;P&gt;#define MINUTE (((__TIME__ [3]-'0')*16)+(__TIME__ [4]-'0'))&lt;/P&gt;&lt;P&gt;#define SECOND (((__TIME__ [6]-'0')*16)+(__TIME__ [7]-'0'))&lt;/P&gt;&lt;P&gt;#define VERSION_TIME ((HOUR &amp;lt;&amp;lt; 16) | (MINUTE &amp;lt;&amp;lt; 8) | (SECOND &amp;lt;&amp;lt; 0))&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;__imgheader struct bdl_imgheader bdl_image_header = {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.date =&lt;SPAN&gt; VERSION_DATE&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;.time =&lt;SPAN&gt; VERSION_TIME&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;};&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I used example1,&amp;nbsp; the value of &lt;SPAN&gt;bdl_image_header.&lt;/SPAN&gt;date = 0x40004E58 &amp;amp;&amp;nbsp;&lt;SPAN&gt;bdl_image_header.time = 0x40004E64,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if I debug, I can got the timestamp in RAM address and the string value is Aug 15 2018 and 18:04:30.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want to got the value in bin file, then I can check the timestamp for upgrading.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I used example2, &lt;SPAN&gt;the value of&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;bdl_image_header.&lt;/SPAN&gt;&lt;SPAN&gt;date and&amp;nbsp;bdl_image_header.time is equal 0x00000000.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;I doubt that the reason why. Is it because __DATE__ &amp;amp; __TIME__&amp;nbsp;is a variable?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to write a timestamp at a fixed address in the bin file.Can you help me to slove it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2018 10:11:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789392#M6937</guid>
      <dc:creator>maoyuanluo</dc:creator>
      <dc:date>2018-08-15T10:11:56Z</dc:date>
    </item>
    <item>
      <title>Re: Does the __DATE__ &amp; __TIME__ how to build in the upgrade file?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789393#M6938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Maoyuan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you tell us which MCU are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Carlos Mendoza&lt;BR /&gt;Technical Support Engineer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789393#M6938</guid>
      <dc:creator>Carlos_Mendoza</dc:creator>
      <dc:date>2018-08-15T14:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: Does the __DATE__ &amp; __TIME__ how to build in the upgrade file?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789394#M6939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MPC5605B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2018 14:43:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/789394#M6939</guid>
      <dc:creator>maoyuanluo</dc:creator>
      <dc:date>2018-08-15T14:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Does the __DATE__ &amp; __TIME__ how to build in the upgrade file?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/1477612#M8825</link>
      <description>&lt;P&gt;The MONTH definition won't work for June. It will always match January first.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2022 17:05:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-Development-Tools/Does-the-DATE-TIME-how-to-build-in-the-upgrade-file/m-p/1477612#M8825</guid>
      <dc:creator>dario200</dc:creator>
      <dc:date>2022-06-21T17:05:46Z</dc:date>
    </item>
  </channel>
</rss>

