<?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: CW56800E &amp; deadstripping in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138902#M1125</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;No, this pragma is for dead code only.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For instance if you have something like&lt;/DIV&gt;&lt;DIV&gt;while (1) {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; i++;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;foo(i);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Compiler will not generate code for the invocation foo(i) as it comes after a never ending loop.&lt;/DIV&gt;&lt;DIV&gt;That is what I would call dead code. This will not help you to link unused variables to the application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Dec 2006 19:58:14 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2006-12-05T19:58:14Z</dc:date>
    <item>
      <title>CW56800E &amp; deadstripping</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138899#M1122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have some constants in my program. They are not used in program but can be read via CAN. During linking this constants deleted. I tried to edit linker file and use KEEP_SECTION {.const.data} but i does not like this way (need to disable generating linker file in PE).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also i tried to use #pragma opt_dead_code but it does not work - why.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What else can i do?&lt;/SPAN&gt;&lt;P&gt;Message Edited by Alexey on &lt;SPAN class="date_text"&gt;2006-12-04&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:29 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 16:21:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138899#M1122</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2006-12-04T16:21:50Z</dc:date>
    </item>
    <item>
      <title>Re: CW56800E &amp; deadstripping</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138900#M1123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am not an expert in DSP tools, but you may want to try the following.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;According to my understanding, you want to link some symbols even though they are not used within the application, but you do not want to do that in the linker command file. Am I right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In that case you can use the M56800 Linker and enumerate the symbols in the Force Active Symbols edit box.&lt;/DIV&gt;&lt;DIV&gt;As far as I can tell there is no pragma to disable dead stripping.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2006 21:24:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138900#M1123</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-12-04T21:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: CW56800E &amp; deadstripping</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138901#M1124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for response.&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;CrasyCat wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;In that case you can use the M56800 Linker and enumerate the symbols in the Force Active Symbols edit box.&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Yes, you are right. But set of these symbols can be changed during program editing/debugging - old/unneeded constants can be deleted and new ones can be added.&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;CrasyCat wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;As far as I can tell there is no pragma to disable dead stripping.&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;From CW help:&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;56800E BTR/10 Pragmas/Optimization pragmas&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;opt_dead_code&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;Controls the use of dead code optimization.&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;Syntax&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;#pragma opt_dead_code on | off | reset&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;Remarks&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;If you enable this pragma, the compiler removes a statement that other statements never execute or call.&lt;/DIV&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Does this pragma workes?&lt;P&gt;Message Edited by Alexey on &lt;SPAN class="date_text"&gt;2006-12-05&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:58 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 16:57:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138901#M1124</guid>
      <dc:creator>admin</dc:creator>
      <dc:date>2006-12-05T16:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: CW56800E &amp; deadstripping</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138902#M1125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;No, this pragma is for dead code only.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For instance if you have something like&lt;/DIV&gt;&lt;DIV&gt;while (1) {&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; i++;&lt;/DIV&gt;&lt;DIV&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;foo(i);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Compiler will not generate code for the invocation foo(i) as it comes after a never ending loop.&lt;/DIV&gt;&lt;DIV&gt;That is what I would call dead code. This will not help you to link unused variables to the application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Dec 2006 19:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/CW56800E-deadstripping/m-p/138902#M1125</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2006-12-05T19:58:14Z</dc:date>
    </item>
  </channel>
</rss>

