<?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: Code read protect in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559810#M15580</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 Mar 17 00:45:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you *define* your variable in your header file, then everywhere that you #include the header file will also get a definition of the variable, leading to multiple definition errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to *declare* your variable in the header file (if you want to be able to access it from other code). The, just define it in C module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.cprogramming.com%2Fdeclare_vs_define.html" rel="nofollow" target="_blank"&gt;http://www.cprogramming.com/declare_vs_define.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:36:00 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:36:00Z</dc:date>
    <item>
      <title>Code read protect</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559809#M15579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Mon Mar 16 22:12:45 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I started without CRP, and now I wanted to add it. I enabled it in the Linker settings, and I added:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;__CRP const uint32_t CRP_WORD = CRP_NO_CRP ;&lt;BR /&gt;&lt;/I&gt;&lt;BR /&gt;&lt;SPAN&gt;to my main.h. But now everytime the linker complains:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ' multiple definition of `CRP_WORD'' and wont compile.&lt;BR /&gt;&lt;/I&gt;&lt;BR /&gt;&lt;SPAN&gt;But if I comment out the CRP_WORD constant from my main.h, it complains:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Linker CRP Enabled, but no CRP_WORD provided within application&lt;BR /&gt;&lt;/I&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure the CRP_WORD variabele exists only once in my project.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What can be the reason? The only things that are not standard about my project is that the stack is moved to USB ram and I use LTO optimization.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:35:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559809#M15579</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Code read protect</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559810#M15580</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 Mar 17 00:45:00 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;If you *define* your variable in your header file, then everywhere that you #include the header file will also get a definition of the variable, leading to multiple definition errors.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to *declare* your variable in the header file (if you want to be able to access it from other code). The, just define it in C module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;See&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.cprogramming.com%2Fdeclare_vs_define.html" rel="nofollow" target="_blank"&gt;http://www.cprogramming.com/declare_vs_define.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:36:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559810#M15580</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Code read protect</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559811#M15581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Muis on Tue Mar 17 02:26:40 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I feel very noobish right now, but thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:36:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Code-read-protect/m-p/559811#M15581</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:36:01Z</dc:date>
    </item>
  </channel>
</rss>

