<?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 compile information into static array in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547327#M10046</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gonzalo_Sipel on Wed Aug 20 06:48:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I was wondering if there is any way to store or save some code information into my compiled code. I would like to use date of compilation to initialize a constant variable. Is there any macro which allow me to do that? I'm looking for a way to save automatically date of compilation or code version to be able to show it in my LCD device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 00:33:57 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T00:33:57Z</dc:date>
    <item>
      <title>compile information into static array</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547327#M10046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gonzalo_Sipel on Wed Aug 20 06:48:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; I was wondering if there is any way to store or save some code information into my compiled code. I would like to use date of compilation to initialize a constant variable. Is there any macro which allow me to do that? I'm looking for a way to save automatically date of compilation or code version to be able to show it in my LCD device.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:33:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547327#M10046</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: compile information into static array</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547328#M10047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by rocketdawg on Wed Aug 20 11:37:28 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The C language has such a construct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it is called "const"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it is considered good form to declare the type T and then add the modifier "const"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;T const variableName&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned int const LCDVersion = 5;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char const Title[] = "Greatest Application";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;similar to these are the __DATE__, __TIME__, __FUNCTION__, __FILE__, __LINE__, ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;these are pre-processor defines in GCC.&amp;nbsp; If you are using another compiler, you will have to check that they work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;printf("%s\n", __DATE__);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;so something like &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;unsigned char const BuildDate[] = __DATE__;&amp;nbsp; // might work for you, if I have the types correct &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;Dan Saks &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.dansaks.com%2Farticles.htm" rel="nofollow" target="_blank"&gt;http://www.dansaks.com/articles.htm&lt;/A&gt;&lt;SPAN&gt; has some useful articles about const.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;also see &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.embedded.com%2F" rel="nofollow" target="_blank"&gt;http://www.embedded.com/&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:33:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547328#M10047</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:33:58Z</dc:date>
    </item>
    <item>
      <title>Re: compile information into static array</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547329#M10048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Gonzalo_Sipel on Thu Aug 21 04:29:51 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;rocketdawg,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for the information,I found it very useful!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 00:33:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/compile-information-into-static-array/m-p/547329#M10048</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T00:33:59Z</dc:date>
    </item>
  </channel>
</rss>

