<?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: K22F keep version in binary file in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1394845#M62183</link>
    <description>&lt;P&gt;You need to reference your version number information somehow from your application, otherwise it gets removed by the linker.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;static const unsigned char *versionInfo="1.2.2.4";&lt;/P&gt;&lt;P&gt;int main(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (versionInfo[0] == '\0') { /* check just to reference it. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jan 2022 13:48:21 GMT</pubDate>
    <dc:creator>ErichStyger</dc:creator>
    <dc:date>2022-01-05T13:48:21Z</dc:date>
    <item>
      <title>K22F keep version in binary file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1394828#M62181</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I have been trying to insert a version number of my application into its binary. I noticed that the Freedom Bootloader example has this implemented and I have been trying to use something similar with the LED blinky example as a start. However, so far I have not been able to insert the version like the Bootloader example does. I tried porting the property_kinetis source file and the property header file to work with the blinky example as I noticed these are key for the bootloader example but no success so far. What is the best way to approach this and is it possible at all?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 13:22:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1394828#M62181</guid>
      <dc:creator>karamanr</dc:creator>
      <dc:date>2022-01-05T13:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: K22F keep version in binary file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1394845#M62183</link>
      <description>&lt;P&gt;You need to reference your version number information somehow from your application, otherwise it gets removed by the linker.&lt;/P&gt;&lt;P&gt;something like this:&lt;/P&gt;&lt;P&gt;static const unsigned char *versionInfo="1.2.2.4";&lt;/P&gt;&lt;P&gt;int main(void) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; if (versionInfo[0] == '\0') { /* check just to reference it. */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return -1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 13:48:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1394845#M62183</guid>
      <dc:creator>ErichStyger</dc:creator>
      <dc:date>2022-01-05T13:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: K22F keep version in binary file</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1395055#M62187</link>
      <description>&lt;P&gt;Marking with the 'used' attribute, if using GCC, will also prevent the linker from removing what it thinks is unused.&lt;BR /&gt;&lt;BR /&gt;#define ATTR_USED __attribute__ ((used))&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;static const unsigned char *versionInfo="1.2.2.4" ATTR_USED:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jan 2022 20:57:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K22F-keep-version-in-binary-file/m-p/1395055#M62187</guid>
      <dc:creator>bobpaddock</dc:creator>
      <dc:date>2022-01-05T20:57:15Z</dc:date>
    </item>
  </channel>
</rss>

