<?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: global data in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/global-data/m-p/206321#M8383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know Cosmic, but it seems that the problem could be related to static initialization. If you declare a variable as const it will likely end up in flash, and if ou don't declare it as const, it will likely end up in RAM. And then, if you pick a minimal non-standard startup code as is custom with most embedded compilers, the variable won't be initialized and contain garbage values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 May 2011 18:01:19 GMT</pubDate>
    <dc:creator>Lundin</dc:creator>
    <dc:date>2011-05-16T18:01:19Z</dc:date>
    <item>
      <title>global data</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/global-data/m-p/206320#M8382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using the MC9S12Xeq512 processor as a new user. I had a problem when a c file had a global variable of type struct&amp;nbsp;is declared. The program built ok&amp;nbsp;using Cosmic but the app did not run.&amp;nbsp;I changed the global to static const and all was well. The funny thing is that the global was&amp;nbsp;only used by functions inside the file. Any ideas for this behavior.&amp;nbsp;With this paged memory, are there rules of thumb for&amp;nbsp;treating global and file scope variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 May 2011 09:05:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/global-data/m-p/206320#M8382</guid>
      <dc:creator>bones</dc:creator>
      <dc:date>2011-05-14T09:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: global data</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/global-data/m-p/206321#M8383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't know Cosmic, but it seems that the problem could be related to static initialization. If you declare a variable as const it will likely end up in flash, and if ou don't declare it as const, it will likely end up in RAM. And then, if you pick a minimal non-standard startup code as is custom with most embedded compilers, the variable won't be initialized and contain garbage values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 May 2011 18:01:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/global-data/m-p/206321#M8383</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2011-05-16T18:01:19Z</dc:date>
    </item>
  </channel>
</rss>

