<?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>LPCXpresso IDE中的主题 Re: Add the build release of the source code in the compilation</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573179#M21335</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 16 00:53:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There is nothing in LPCXpresso that will count build numbers, but if you can do this externally and set an environment variable, then you can pass that into LPCXpresso and set a compiler switch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your build number is store in an environment variable call "BUILD_NUM":&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Compiler properties under "Symbols" define symbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
BUILD_NUMBER=${env_var:BUILD_NUM}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then to use it in your source code, you need to do this&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define STR(x)#x
#define STRINGIZE(x)STR(x)

#define VERSION "(Build " STRINGIZE(BUILD_NUMBER) ")"
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:24:43 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:24:43Z</dc:date>
    <item>
      <title>Add the build release of the source code in the compilation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573176#M21332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by camargomarcior on Mon Dec 15 08:25:15 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To better control of the revision of the compiled code I want put in the display the build release of the code, it´s possible in the lpcXpresso ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Marcio&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:24:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573176#M21332</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add the build release of the source code in the compilation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573177#M21333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Mon Dec 15 08:48:36 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry but it is not clear what you are asking.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you want to add a version number string into your application? If so, where is the version number defined?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:24:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573177#M21333</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add the build release of the source code in the compilation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573178#M21334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by camargomarcior on Mon Dec 15 09:34:08 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I´m sorry if I was not clear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Per example, in lpcXpresso the release is LPCXpresso v7.5.0 [Build 254]. I think the value v7.5.0 is the version value and the 254 is the compilation version of the software.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to do the same process in my firmware, do you now if exist a macro or other type of parameter to use to do it ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:24:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573178#M21334</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: Add the build release of the source code in the compilation</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573179#M21335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Tue Dec 16 00:53:19 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;There is nothing in LPCXpresso that will count build numbers, but if you can do this externally and set an environment variable, then you can pass that into LPCXpresso and set a compiler switch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If your build number is store in an environment variable call "BUILD_NUM":&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the Compiler properties under "Symbols" define symbol&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
BUILD_NUMBER=${env_var:BUILD_NUM}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then to use it in your source code, you need to do this&lt;/SPAN&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;
#define STR(x)#x
#define STRINGIZE(x)STR(x)

#define VERSION "(Build " STRINGIZE(BUILD_NUMBER) ")"
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:24:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Add-the-build-release-of-the-source-code-in-the-compilation/m-p/573179#M21335</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:24:43Z</dc:date>
    </item>
  </channel>
</rss>

