<?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: disable &amp;quot;Removed dead code&amp;quot; in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171594#M5793</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;Attached a screenshot (JPG) of IDE..&lt;/P&gt;&lt;P&gt;It helps?&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Apr 2009 04:34:18 GMT</pubDate>
    <dc:creator>Ricardo_RauppV</dc:creator>
    <dc:date>2009-04-21T04:34:18Z</dc:date>
    <item>
      <title>disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171588#M5787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;how can i force CodeWarrior to disabling the removal of dead code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the DEMO9S12XDT512 (HCS12) and i must disable this feature!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I read about #pragma implementation, but i don't know which pragma it is for the HCS12!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;nic&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 18:19:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171588#M5787</guid>
      <dc:creator>nic_mcp</dc:creator>
      <dc:date>2007-12-10T18:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171589#M5788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;What kind of "dead code" do you want to keep?&lt;BR /&gt;Code inside of a function which never gets executed (that's what I would call dead code)?&lt;BR /&gt;Or functions or other objects which do not get linked because they are not referenced?&lt;BR /&gt;Normally dead code inside of a function is dead, and I don't really see any reason to ever keep it, there are options in the compiler for that tought, I think.&lt;BR /&gt;But normally the question is asked with the idea of unreferences objects and for that case check the linker manual, more precisly the ENTRIES keywords.&lt;BR /&gt;Basically in the prm file, list all the additional objects in a ENTRIES name0 name1 END block.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2007 22:31:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171589#M5788</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-12-10T22:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171590#M5789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;I have several functions wich in fact are accessed only through pointer to function.&lt;/P&gt;&lt;P&gt;I use it to state machine control.&lt;/P&gt;&lt;P&gt;CW considered these functions as NOT USED, and so my pointer&amp;nbsp;has allways 0x0000.&lt;/P&gt;&lt;P&gt;I´m using CW6.0 Pro , C++.&lt;/P&gt;&lt;P&gt;How can I tell&amp;nbsp;CW to keep these function active, that is, they are really needed although there is not a explicit call...&lt;/P&gt;&lt;P&gt;Use ENTRIES? for each function? for Claases?&lt;/P&gt;&lt;P&gt;Is tehere a global way to make it works, like a checkbox like:&lt;/P&gt;&lt;P&gt;( ) Don´t discard not used objects.&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo Raupp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Apr 2009 23:51:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171590#M5789</guid>
      <dc:creator>Ricardo_RauppV</dc:creator>
      <dc:date>2009-04-20T23:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171591#M5790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;Meanwhile the post before I made:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ENTRIES&lt;BR /&gt;lcd_char_drv.cpp.o:*&lt;BR /&gt;keyboard_drv.cpp.o:*&lt;BR /&gt;buzzer_drv.cpp.o:*&lt;BR /&gt;gpio_drv.cpp.o:*&lt;BR /&gt;END&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and all of my not referenced functions are now allocated in a specific address...&lt;/P&gt;&lt;P&gt;It seems nice..not hard taks, since the whole file can be added into list and not function by function as I thought...&lt;/P&gt;&lt;P&gt;Is it ok?Some side effect?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Ricardo Raupp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 00:24:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171591#M5790</guid>
      <dc:creator>Ricardo_RauppV</dc:creator>
      <dc:date>2009-04-21T00:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171592#M5791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Usages through pointer to functions should be considered too as long as the function pointer on its own is referenced.&lt;/P&gt;&lt;P&gt;Where do you see "and so my pointer&amp;nbsp;has allways 0x0000."?&lt;/P&gt;&lt;P&gt;In the map file or in a target data structure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 02:51:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171592#M5791</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-04-21T02:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171593#M5792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;As I mentioned before, now my functions are allocated on ROM.Ican see their address in the map files.&lt;/P&gt;&lt;P&gt;Before the use of ENTRIES&amp;nbsp;, none of them was there, unless in the NOT USED list...&lt;/P&gt;&lt;P&gt;In the constructor below I tried to catch the address of one function, but it is returning 0x00...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;// general pointer4 to function declaration&lt;BR /&gt;typedef uint8 (*state_handler_t)(void*,Event const*)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Keyboard::Keyboard():&lt;BR /&gt;&amp;nbsp;// Super_class constructor&lt;BR /&gt;&amp;nbsp;Active_object((state_handler_t)&lt;STRONG&gt;&amp;amp;Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_initial&lt;/STRONG&gt;),&amp;nbsp;&amp;nbsp; // default state!!!&lt;BR /&gt;&amp;nbsp;// timer(s) object(s) constructor(s)&lt;BR /&gt;&amp;nbsp;main_timer(EVENT_KEYBOARD_MAIN_TIMER_TIMEOUT)&lt;BR /&gt;{&lt;BR /&gt;state_handler_t far a;&lt;BR /&gt;state_handler_t far d;&lt;BR /&gt;uint16 b;&lt;BR /&gt;uint8 c;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;c=Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_initial(this);&amp;nbsp; &amp;nbsp;// it really runs on_initial() function...&lt;BR /&gt;&amp;nbsp;b=(uint16)&amp;amp;Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_initial;&amp;nbsp; &amp;nbsp;// this result is zero.. ???&lt;BR /&gt;&amp;nbsp;a=(state_handler_t)&amp;amp;(Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_ready); // this result is zero.. ???&lt;BR /&gt;&amp;nbsp;d=(state_handler_t)&amp;amp;(Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_initial);// this result is zero.. ???&lt;BR /&gt;&amp;nbsp;// dummy ...&lt;BR /&gt;&amp;nbsp;if(a)&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;b++;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The map file shows:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Addr&amp;nbsp;&amp;nbsp; hSize&amp;nbsp;&amp;nbsp; dSize&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Ref&amp;nbsp;&amp;nbsp;&amp;nbsp; Section&amp;nbsp;&amp;nbsp; RLIB&lt;/P&gt;&lt;P&gt;&amp;nbsp; on_initial__8KeyboardFP8Keyboard&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3254&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 21&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&amp;nbsp;&amp;nbsp; .text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;on_ready__8KeyboardFP8KeyboardPC5Event&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3269&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 16&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; .text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The function is:&lt;/P&gt;&lt;P&gt;//&lt;BR /&gt;uint8 Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_initial(Keyboard *me)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;(void)me;&lt;BR /&gt;&amp;nbsp;return FSM_NEW_STATE_HANDLER(&amp;amp;Keyboard:&lt;IMG alt=":smileysurprised:" class="emoticon emoticon-smileysurprised" id="smileysurprised" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-surprised.gif" title="Smiley Surprised" /&gt;n_ready);&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is clean for you?&lt;/P&gt;&lt;P&gt;Very thanks for your attention Daniel ...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 03:07:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171593#M5792</guid>
      <dc:creator>Ricardo_RauppV</dc:creator>
      <dc:date>2009-04-21T03:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171594#M5793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;Attached a screenshot (JPG) of IDE..&lt;/P&gt;&lt;P&gt;It helps?&lt;/P&gt;&lt;P&gt;Ricardo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 04:34:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171594#M5793</guid>
      <dc:creator>Ricardo_RauppV</dc:creator>
      <dc:date>2009-04-21T04:34:18Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171595#M5794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange, the first thing which comes to my mind is that the a,b,c, d locals are all unused local variables.&lt;/P&gt;&lt;P&gt;Therefore I wonder if the compiler did not just remove those variables.&lt;/P&gt;&lt;P&gt;Does it change anything if the code actually uses those variables (without ENTRIES) or with ENTRIES, are the seen values different? (without any other changes).&lt;/P&gt;&lt;P&gt;Which addresses does the debugger show when selecting a,b,c,d?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Apr 2009 09:37:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171595#M5794</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2009-04-21T09:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: disable "Removed dead code"</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171596#M5795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;I think this question I solved now ...&lt;/P&gt;&lt;P&gt;I got the right address of those functions AFTER I add "static" in fornt of its declaration in the class.&lt;/P&gt;&lt;P&gt;About those variables a,b,c,d....they worked perfectly after I change the functions to&amp;nbsp;static....&lt;/P&gt;&lt;P&gt;I undesrtood that that only static function can have its address "captured/read" by a var,pointer..whatever....&lt;/P&gt;&lt;P&gt;Is this understanding right?&lt;/P&gt;&lt;P&gt;If yes..so it is finished...&lt;/P&gt;&lt;P&gt;Thanks Daniel ...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ricardo Raupp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Apr 2009 23:53:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/disable-quot-Removed-dead-code-quot/m-p/171596#M5795</guid>
      <dc:creator>Ricardo_RauppV</dc:creator>
      <dc:date>2009-04-22T23:53:53Z</dc:date>
    </item>
  </channel>
</rss>

