<?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: assigning fixed memory regions to variables that will be modified in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/assigning-fixed-memory-regions-to-variables-that-will-be/m-p/140629#M3132</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;There is a reason it is called CONST_SEG: it only affects constant variables. For non-constant variables, you use DATA_SEG. It works in the same manner in the .prm file.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Dec 2006 21:35:34 GMT</pubDate>
    <dc:creator>Lundin</dc:creator>
    <dc:date>2006-12-19T21:35:34Z</dc:date>
    <item>
      <title>assigning fixed memory regions to variables that will be modified</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/assigning-fixed-memory-regions-to-variables-that-will-be/m-p/140628#M3131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi again,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How can you assign a fixed memory region within RAM to a variable that will be modified i.e. that does not have the qualifier const?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;e.g.&lt;/DIV&gt;&lt;DIV&gt;#pragma CONST_SEG CALIBRATION&lt;/DIV&gt;&lt;DIV&gt;Int16 Sb10_Constant8 ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In this case this variable is not assigned an address in the RAM memory region CALIBRATION. When I add the "const" identifier, then this variable is put in the correct memory region, but I get an error when I try to modify it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#pragma CONST_SEG CALIBRATION&lt;/DIV&gt;&lt;DIV&gt;const Int16 Sb10_Constant8 ;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;=&amp;gt; Sb10_Constant8 is assigned the correct location, but elsewhere in the program the statement below gives me an errror - "modifiable value expected".&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;Sb10_Constant8 = Sb10_Constant8_ROM;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How can I get round this problem?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Raghav&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 19:18:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/assigning-fixed-memory-regions-to-variables-that-will-be/m-p/140628#M3131</guid>
      <dc:creator>raghav_sarma</dc:creator>
      <dc:date>2006-12-19T19:18:28Z</dc:date>
    </item>
    <item>
      <title>Re: assigning fixed memory regions to variables that will be modified</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/assigning-fixed-memory-regions-to-variables-that-will-be/m-p/140629#M3132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;There is a reason it is called CONST_SEG: it only affects constant variables. For non-constant variables, you use DATA_SEG. It works in the same manner in the .prm file.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2006 21:35:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/assigning-fixed-memory-regions-to-variables-that-will-be/m-p/140629#M3132</guid>
      <dc:creator>Lundin</dc:creator>
      <dc:date>2006-12-19T21:35:34Z</dc:date>
    </item>
  </channel>
</rss>

