<?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>CodeWarrior for MCUのトピックDisabling optimization in certain areas</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191167#M6883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using CW for the 9S08AW32 processor.&amp;nbsp; I want copyright information to be part of the executable code as data.&amp;nbsp; So, I have an array of characters for copyright information declared as "const char Copyright[] =&amp;nbsp;{ "Copyright 2008 ... All rights reserved." };&amp;nbsp; The problem comes in when the compiler wants to optimize Copyright out since it is not used.&amp;nbsp; So, to get around the problem, I have a statement in main, "errorcode = Copyright[0];".&amp;nbsp; My question: is there a way to tell the compiler to NOT optimize out the Copyright variable without using the assignment I made above?&amp;nbsp; Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Lou&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Feb 2008 23:19:52 GMT</pubDate>
    <dc:creator>Luigi</dc:creator>
    <dc:date>2008-02-19T23:19:52Z</dc:date>
    <item>
      <title>Disabling optimization in certain areas</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191167#M6883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am using CW for the 9S08AW32 processor.&amp;nbsp; I want copyright information to be part of the executable code as data.&amp;nbsp; So, I have an array of characters for copyright information declared as "const char Copyright[] =&amp;nbsp;{ "Copyright 2008 ... All rights reserved." };&amp;nbsp; The problem comes in when the compiler wants to optimize Copyright out since it is not used.&amp;nbsp; So, to get around the problem, I have a statement in main, "errorcode = Copyright[0];".&amp;nbsp; My question: is there a way to tell the compiler to NOT optimize out the Copyright variable without using the assignment I made above?&amp;nbsp; Thanks.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Lou&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 23:19:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191167#M6883</guid>
      <dc:creator>Luigi</dc:creator>
      <dc:date>2008-02-19T23:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling optimization in certain areas</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191168#M6884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;You can tell the linker to consider your object as "root" when building the dependency information. Add the following snippet to your .prm file to do that:&lt;BR /&gt;&lt;BR /&gt;DEPENDENCY&lt;BR /&gt;&amp;nbsp; ROOT Copyright END&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;Alternatively, you can add an "ENTRIES" block to your .prm file:&lt;BR /&gt;&lt;BR /&gt;ENTRIES&lt;BR /&gt;&amp;nbsp; Copyright&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2008 23:37:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191168#M6884</guid>
      <dc:creator>Navidad</dc:creator>
      <dc:date>2008-02-19T23:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Disabling optimization in certain areas</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191169#M6885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks!&amp;nbsp; I will give those a try.&amp;nbsp; I know it's no big deal to just leave the assignment statement in there, but I thought there must be a cleaner way of doing it.&amp;nbsp; Appreciated.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Lou&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2008 00:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Disabling-optimization-in-certain-areas/m-p/191169#M6885</guid>
      <dc:creator>Luigi</dc:creator>
      <dc:date>2008-02-20T00:58:14Z</dc:date>
    </item>
  </channel>
</rss>

