<?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: Absolute addressing for EEPROM variables in MC9S12 in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Absolute-addressing-for-EEPROM-variables-in-MC9S12/m-p/173161#M5949</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Henry,&lt;/DIV&gt;&lt;DIV&gt;I believe that the best thing to do is to declare several eeprom sections and linking objects containing the eeprom variables in those sections. This will let you not only fine tune the .eeprom section but also use .feeprom section and any D-flash.&lt;/DIV&gt;&lt;DIV&gt;For example, imagine that you have partitioned your D-flash so 2 sectors are used as dflash and the rest as EEE.&lt;/DIV&gt;&lt;DIV&gt;Your linker script could be:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x100000 -o0x800 -m0x100 -n.dflash1&amp;nbsp; # 1 block of dflash&lt;/DIV&gt;&lt;DIV&gt;dflash1.obj&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x100100 -o0x900 -m0x100 -n.dflash2&amp;nbsp; # 1 block of dflash&lt;/DIV&gt;&lt;DIV&gt;dflash2.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x13F800 -o0x800 -m0x400 -n.fareee&amp;nbsp;&amp;nbsp; # 1k of paged eee&lt;/DIV&gt;&lt;DIV&gt;fareee.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .eeprom -b0x13FC00 -o0xC00 -m0x300 .nneareee1 # 0.75k non paged eee&lt;/DIV&gt;&lt;DIV&gt;data1.obj&lt;/DIV&gt;&lt;DIV&gt;+seg .eeprom -b0x13FF00 -o0xF00 -m0x100 .nnearee2&amp;nbsp;&amp;nbsp; # 0.25k non paged eee&lt;/DIV&gt;&lt;DIV&gt;data2.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Attention should be paid to the correspondance of the -b global address and the&amp;nbsp;-o&amp;nbsp;for Local address.&lt;/DIV&gt;&lt;DIV&gt;The -m is very useful to detect when you are going out of boundary with the segments. (have a read to the linker document to understand better)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Your object files should contain the Only eeprom data structures. For example&lt;/DIV&gt;&lt;DIV&gt;- Paged :&lt;/DIV&gt;&lt;DIV&gt;dflash1.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;@far @eeprom myVar&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Non paged&lt;/DIV&gt;&lt;DIV&gt;data1.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;@eeprom myOtherVar&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope it helps&lt;/DIV&gt;&lt;DIV&gt;Pedro&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Jul 2008 19:48:10 GMT</pubDate>
    <dc:creator>Pedro_</dc:creator>
    <dc:date>2008-07-30T19:48:10Z</dc:date>
    <item>
      <title>Absolute addressing for EEPROM variables in MC9S12</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Absolute-addressing-for-EEPROM-variables-in-MC9S12/m-p/173160#M5948</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using a cosmic compiler. EEPROM variable declared using @eeprom and are automatically allocated by the compiler. I want more control over what exact address within the eeprom space that a particular variable is to be allocated. Is this possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2008 03:40:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Absolute-addressing-for-EEPROM-variables-in-MC9S12/m-p/173160#M5948</guid>
      <dc:creator>HenryL</dc:creator>
      <dc:date>2008-07-16T03:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Absolute addressing for EEPROM variables in MC9S12</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Absolute-addressing-for-EEPROM-variables-in-MC9S12/m-p/173161#M5949</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Henry,&lt;/DIV&gt;&lt;DIV&gt;I believe that the best thing to do is to declare several eeprom sections and linking objects containing the eeprom variables in those sections. This will let you not only fine tune the .eeprom section but also use .feeprom section and any D-flash.&lt;/DIV&gt;&lt;DIV&gt;For example, imagine that you have partitioned your D-flash so 2 sectors are used as dflash and the rest as EEE.&lt;/DIV&gt;&lt;DIV&gt;Your linker script could be:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x100000 -o0x800 -m0x100 -n.dflash1&amp;nbsp; # 1 block of dflash&lt;/DIV&gt;&lt;DIV&gt;dflash1.obj&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x100100 -o0x900 -m0x100 -n.dflash2&amp;nbsp; # 1 block of dflash&lt;/DIV&gt;&lt;DIV&gt;dflash2.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .feeprom -ds10 -b0x13F800 -o0x800 -m0x400 -n.fareee&amp;nbsp;&amp;nbsp; # 1k of paged eee&lt;/DIV&gt;&lt;DIV&gt;fareee.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;+seg .eeprom -b0x13FC00 -o0xC00 -m0x300 .nneareee1 # 0.75k non paged eee&lt;/DIV&gt;&lt;DIV&gt;data1.obj&lt;/DIV&gt;&lt;DIV&gt;+seg .eeprom -b0x13FF00 -o0xF00 -m0x100 .nnearee2&amp;nbsp;&amp;nbsp; # 0.25k non paged eee&lt;/DIV&gt;&lt;DIV&gt;data2.obj&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Attention should be paid to the correspondance of the -b global address and the&amp;nbsp;-o&amp;nbsp;for Local address.&lt;/DIV&gt;&lt;DIV&gt;The -m is very useful to detect when you are going out of boundary with the segments. (have a read to the linker document to understand better)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Your object files should contain the Only eeprom data structures. For example&lt;/DIV&gt;&lt;DIV&gt;- Paged :&lt;/DIV&gt;&lt;DIV&gt;dflash1.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;@far @eeprom myVar&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Non paged&lt;/DIV&gt;&lt;DIV&gt;data1.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;@eeprom myOtherVar&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope it helps&lt;/DIV&gt;&lt;DIV&gt;Pedro&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;P&gt;&lt;FONT size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Jul 2008 19:48:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Absolute-addressing-for-EEPROM-variables-in-MC9S12/m-p/173161#M5949</guid>
      <dc:creator>Pedro_</dc:creator>
      <dc:date>2008-07-30T19:48:10Z</dc:date>
    </item>
  </channel>
</rss>

