<?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 Unwanted Variable Memory Overlap?! in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179065#M5935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently I'm using CW for MCU 10.2 Eclipse and realize variable memory overlap when using float support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code fragment is used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;for (;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif"&gt;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/A&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;status=I2C1_SendChar(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;status=I2C1_RecvBlock(HMDaten,4,&amp;amp;anzahlEmpfangene);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;tempRohwert = HMDaten[2] &amp;lt;&amp;lt; 6 | ( HMDaten[3] &amp;amp; 0x3f );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;tempMesswert= 165.0 / (2^14) * tempRohwert - 40.0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realized when stepping thru the I2C functions for the second time, the&lt;/P&gt;&lt;P&gt;variable &lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;InpLenM&lt;/STRONG&gt;&lt;/SPAN&gt; (from I2C1.c) gets corrupted (set to nonzero) , which leads &lt;SPAN style="font-family: 'courier new,courier';"&gt;I2C1_Sendchar(0);&lt;/SPAN&gt;&amp;nbsp; to fail because of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;if((InpLenM)||(I2C1_SerFlag&amp;amp;(CHAR_IN_TX|WAIT_RX_CHAR|IN_PROGRES))) { /* Is the bus busy */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ERR_BUSOFF;&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; /* If yes then error */&lt;BR /&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I found that a variable (Kspec form rtsch08.c) from the floating point routines &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;use the same memory position&lt;/SPAN&gt; (0x0083 in my case) as&lt;/STRONG&gt; InpLenM which leads to data modification.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong here? What leads the to that situation? Whats the reason for that unwanted shared memory usage?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideas are very welcome,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;A.Thurm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Jul 2012 17:45:20 GMT</pubDate>
    <dc:creator>ThurmaSan</dc:creator>
    <dc:date>2012-07-12T17:45:20Z</dc:date>
    <item>
      <title>Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179065#M5935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;currently I'm using CW for MCU 10.2 Eclipse and realize variable memory overlap when using float support.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The following code fragment is used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;for (;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif"&gt;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/A&gt; {&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;status=I2C1_SendChar(0);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;status=I2C1_RecvBlock(HMDaten,4,&amp;amp;anzahlEmpfangene);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;tempRohwert = HMDaten[2] &amp;lt;&amp;lt; 6 | ( HMDaten[3] &amp;amp; 0x3f );&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;tempMesswert= 165.0 / (2^14) * tempRohwert - 40.0;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I realized when stepping thru the I2C functions for the second time, the&lt;/P&gt;&lt;P&gt;variable &lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;InpLenM&lt;/STRONG&gt;&lt;/SPAN&gt; (from I2C1.c) gets corrupted (set to nonzero) , which leads &lt;SPAN style="font-family: 'courier new,courier';"&gt;I2C1_Sendchar(0);&lt;/SPAN&gt;&amp;nbsp; to fail because of&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;....&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;if((InpLenM)||(I2C1_SerFlag&amp;amp;(CHAR_IN_TX|WAIT_RX_CHAR|IN_PROGRES))) { /* Is the bus busy */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ERR_BUSOFF;&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; /* If yes then error */&lt;BR /&gt;&amp;nbsp; }&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;I found that a variable (Kspec form rtsch08.c) from the floating point routines &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;use the same memory position&lt;/SPAN&gt; (0x0083 in my case) as&lt;/STRONG&gt; InpLenM which leads to data modification.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong here? What leads the to that situation? Whats the reason for that unwanted shared memory usage?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Ideas are very welcome,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;A.Thurm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style=": ; font-family: 'courier new,courier';"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new,courier';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2012 17:45:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179065#M5935</guid>
      <dc:creator>ThurmaSan</dc:creator>
      <dc:date>2012-07-12T17:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179066#M5936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like a stack size issue.&lt;/P&gt;&lt;P&gt;Search for STACKSIZE in the forum,&lt;/P&gt;&lt;P&gt;for example&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/60395#60395" title="https://community.freescale.com/message/60395#60395"&gt;https://community.freescale.com/message/60395#60395&lt;/A&gt;&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>Fri, 13 Jul 2012 08:36:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179066#M5936</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2012-07-13T08:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179067#M5937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanx Compilerguru for that quick answer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;that works fine for me.&lt;/P&gt;&lt;P&gt;But keeping STACKSIZE in mind leads me to the following question:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How much memory (for "stack" purpose) is used by the float routines?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Knowing this could help sizing STACKSIZE in the future.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 15:01:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179067#M5937</guid>
      <dc:creator>ThurmaSan</dc:creator>
      <dc:date>2012-07-13T15:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179068#M5938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andreas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The measurement of stack usage required by a function, using FCS, is discussed in the following old thread.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/54019#54019" title="https://community.freescale.com/message/54019#54019"&gt;https://community.freescale.com/message/54019#54019&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This thread contains the following post&amp;nbsp;-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;It is possible to ascertain stack usage for a function using full chip simulation.&amp;nbsp; Set up a test project using a much larger device to give sufficient RAM capacity, and then set the remaining unused stack to a known (non-zero) value, just prior to stepping over the trigononmetric function. Then examine the stack contents to determine the lowest address that still contains the known value.&amp;nbsp; Subtract this from the current stack pointer, and you will have the stack usage for the function.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;For initialising the stack contents, the following function might be of use.&amp;nbsp; The first four positions below the current stack pointer are not initialised.&amp;nbsp; The parameter &lt;FONT face="courier new,courier"&gt;lolimit&lt;/FONT&gt; represents the address of&amp;nbsp; the bottom of the stack.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="courier new,courier"&gt;&amp;nbsp;void clr_stack( word lolimit, byte val)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; __asm {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tsx&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lda&amp;nbsp; val&lt;BR /&gt;LOOP:&amp;nbsp;&amp;nbsp; aix&amp;nbsp; #-1&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sta&amp;nbsp; ,x&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cphx (lolimit)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bhs&amp;nbsp; LOOP&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code snippet shown, that uses HLI assembler,&amp;nbsp;is applicable only to a HCS08 device.&amp;nbsp; Perhaps the following thread may also be of interest.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.freescale.com/message/37326#37326" title="https://community.freescale.com/message/37326#37326"&gt;https://community.freescale.com/message/37326#37326&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2012 21:41:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179068#M5938</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-13T21:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179069#M5939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There actually is even a new feature which was not available when that thread took place.&lt;/P&gt;&lt;P&gt;The current MCU 10 linker supports for the S08 to compute the stack size for simple code, it cannot handle recursive code, function pointers. But it does include calls to the runtime support. For example for this app&lt;/P&gt;&lt;PRE&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */#include "derivative.h" /* include peripheral declarations */float a = 1/3.0f;float b = 1/5.0f;float c;void t(void) { c = a/b;}void main(void) {  for(;;) { t();    __RESET_WATCHDOG();  }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;for the S08 QE128, banked memory model, I get the following in the map file if I enable the stack computation:&lt;/P&gt;&lt;PRE&gt;*********************************************************************************************STACK CONSUMPTION COMPUTATION---------------------------------------------------------------------------------------------1)FileName = C:/Users/r1aake/workspace/s08/a/MC9S08QE128/Project_Settings/Startup_Code\start08_c.obj_Startup = 39Maximum Stack Usage is calculated for following path:-----------------------------------------------------_Startup|+-main  |  +-t    |    +-_FDIV      |      +-_FDIV_Common        |        +-_FDIV_K_is_L_div_K&lt;/PRE&gt;&lt;P&gt;For mcu 10.2 it can be enabled in the project properties, C/C++ Build/Settings , int Settings are, select S08 Linker/Output,&lt;/P&gt;&lt;P&gt;check "Enable Stack Consumation Computation (-StackConsumption).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The feature supports to compute the stack of specific functions, for example for t. For details search the online help of MCU10.2 for "STACK_CONSUMPTION".&lt;/P&gt;&lt;P&gt;Also by adding the interrupt handlers separately, one can compute all the stack sizes which might accumulate. Even when a app has recursion, knowing how much stack certain non recursive functions like this t need helps a lot.&lt;/P&gt;&lt;P&gt;Cool nice feature &lt;IMG alt="Smiley Happy" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="https://community.nxp.com/i/smilies/16x16_smiley-happy.png" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:28:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179069#M5939</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2020-10-29T09:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179070#M5940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much CompilerGuru for that information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I make HEAVY usage of function pointers in my current application, so there is no way to step thru the entire code, because calls (even recursive) depend on user interaction. So "Enable Stack Consumation Computation (-StackConsumption)." will maybe lead to insufficent stack size.&lt;/P&gt;&lt;P&gt;(Well you know, dealing with FDIV on devices like S08DZ32 is a potential risk in terms of memory usage:-)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yours,&lt;/P&gt;&lt;P&gt;Andreas&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 22:22:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179070#M5940</guid>
      <dc:creator>ThurmaSan</dc:creator>
      <dc:date>2012-07-19T22:22:27Z</dc:date>
    </item>
    <item>
      <title>Re: Unwanted Variable Memory Overlap?!</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179071#M5941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Andreas,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there remains any doubt whether the chosen stack size will be sufficient, you might wish to dynamically monitor for a stack overflow condition.&amp;nbsp; This assumes that, should overflow be detected, there is a course of action that can be taken to report the issue, and that the overflow does not result in a reset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The idea is to create a small segment immediately below the stack segment, and allocate a variable (say 32-bit) within this segment.&amp;nbsp; Each time the main loop is executed, the variable can be checked for an altered value.&amp;nbsp; If this variable is clobbered by stack overflow, it is very likely that some of your other static/global variables immediately below will also be affected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2012 01:06:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Unwanted-Variable-Memory-Overlap/m-p/179071#M5941</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-20T01:06:32Z</dc:date>
    </item>
  </channel>
</rss>

