<?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 8-16 bit: using constants in segments? in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/8-16-bit-using-constants-in-segments/m-p/135566#M1725</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to carve out a section of RAM in my *.PRM file. This works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;MY_DATA = READ_WRITE 0x008C SIZE 3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;MY_DATA = READ_WRITE 0x008C SIZE PARAMETERS;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... where &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;PARAMETERS&lt;/SPAN&gt;&lt;SPAN&gt; is defined in my header file as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;#define PARAMETERS 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do the above, putting in a defined constant in the PRM file? I'd prefer this, as sometimes the value of PARAMETERS changes depending on the version of firmware I'm working with.&lt;/SPAN&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;01:23 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Nov 2006 01:27:58 GMT</pubDate>
    <dc:creator>irob</dc:creator>
    <dc:date>2006-11-07T01:27:58Z</dc:date>
    <item>
      <title>8-16 bit: using constants in segments?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/8-16-bit-using-constants-in-segments/m-p/135566#M1725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to carve out a section of RAM in my *.PRM file. This works:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;MY_DATA = READ_WRITE 0x008C SIZE 3;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This does not:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;MY_DATA = READ_WRITE 0x008C SIZE PARAMETERS;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;... where &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;PARAMETERS&lt;/SPAN&gt;&lt;SPAN&gt; is defined in my header file as:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;#define PARAMETERS 3&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do the above, putting in a defined constant in the PRM file? I'd prefer this, as sometimes the value of PARAMETERS changes depending on the version of firmware I'm working with.&lt;/SPAN&gt;&lt;P&gt;Message Edited by CrasyCat on &lt;SPAN class="date_text"&gt;2007-04-13&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;01:23 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 01:27:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/8-16-bit-using-constants-in-segments/m-p/135566#M1725</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2006-11-07T01:27:58Z</dc:date>
    </item>
    <item>
      <title>Re: using constants in segments?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/8-16-bit-using-constants-in-segments/m-p/135567#M1726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Recent versions of CW for HC08/HC12 (out of my memory, I'm not sure since which version, sorry) have a checkbox in the linker preference which does cause that the compiler preprocessor is first run across the prm file.&lt;BR /&gt;&lt;BR /&gt;If possible, I would stay with a simple prm file, and this means to keep the MY_DATA big enough for the content of all your firmwares so you dont have to do this conditional compilation (or macro replacement).&lt;BR /&gt;&lt;BR /&gt;You can also place the variables with the @ operator (int blubs@x08c&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;, then those memory ares should not occur in the prm file at all. And in C, preprocessing is possible, of course.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Nov 2006 09:30:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/8-16-bit-using-constants-in-segments/m-p/135567#M1726</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2006-11-07T09:30:19Z</dc:date>
    </item>
  </channel>
</rss>

