<?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: How to force constants in the banked section in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145321#M3285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Modified previous post.&lt;/DIV&gt;&lt;DIV&gt;Not confuse CODE_SEG with CONST_SEG.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Nothing like a good user manual.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Manual_Compiler_HC08.pdf" pages 301-304&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="6"&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;#pragma CONST_SEG: Constant Data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Segment Definition&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Scope: Next pragma CONST_SEG&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Syntax: "#pragma CONST_SEG” (&amp;lt;Modif&amp;gt; &amp;lt;Name&amp;gt; | “DEFAULT”)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Synonym: CONST_SECTION&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Arguments: &amp;lt;Modif&amp;gt;: Some of the following strings may be used: SHORT, __SHORT_SEG,&amp;nbsp; DIRECT,__DIRECT_SEG,&amp;nbsp; NEAR, __NEAR_SEG, CODE, __CODE_SEG, FAR, __FAR_SEG,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Each modifier has a synonym in the form of “__&amp;lt;modifier&amp;gt;_ SEG”. This reduces clashes with other possible defines in header files, e.g. if NEAR is undefined in another portion of your code.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The segment modifiers are backend-dependent. Refer to the backend chapter to find the supported modifiers and their meaning.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The SHORT modifier specifies a segment which is accessed with - bit addresses.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&amp;lt;Name&amp;gt;: The name of the segment. This name must be used in the link parameter file on the left side of the assignment in the PLACEMENT part. Please refer to the linker manual for details.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Default: DEFAULT&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Description: This pragma allocates constant variables into a segment. The segment is then located in the link parameter file to specific addresses.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The pragma CONST_SEG sets the current const segment. This segment is places all constant variable declarations. The default segment is set with:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;#pragma CONST_SEG DEFAULT”&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Feb 2007 23:16:38 GMT</pubDate>
    <dc:creator>Alban</dc:creator>
    <dc:date>2007-02-16T23:16:38Z</dc:date>
    <item>
      <title>How to force constants in the banked section</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145319#M3283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Can anyone help me force a const unsigned char to a banked section and still be able to access it&amp;gt; I tried #pragam CODE_SEG DEFAULT before the const but that did not work. The compiler is trying to put my font table in non banked section and runs out of code space real fast.. Tim&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 23:01:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145319#M3283</guid>
      <dc:creator>tim_milliken</dc:creator>
      <dc:date>2007-02-16T23:01:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in the banked section</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145320#M3284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Normal, DEFAULT has its default location&amp;nbsp;in unbanked space in general projects.&lt;/DIV&gt;&lt;DIV&gt;Chose a zone from your PRM file which is in Paged memory and replace DEFAULT with that name.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;In "SECTIONS":   /* unbanked FLASH ROM */    ROM_4000 = READ_ONLY  0x4000 TO 0x7FFF;    ROM_C000 = READ_ONLY  0xC000 TO 0xFEFF;    /* banked FLASH ROM */    PAGE_38 = READ_ONLY  0x388000 TO 0x38BFFF;       PAGE_39 = READ_ONLY  0x398000 TO 0x39BFFF;       PAGE_3A = READ_ONLY  0x3A8000 TO 0x3ABFFF;       PAGE_3B = READ_ONLY  0x3B8000 TO 0x3BBFFF;       PAGE_3C = READ_ONLY  0x3C8000 TO 0x3CBFFF;       PAGE_3D = READ_ONLY  0x3D8000 TO 0x3DBFFF;   In "PLACEMENT"   DEFAULT_ROM                 INTO PAGE_38,PAGE_3A,PAGE_3B,PAGE_3C;       pagecodeA                   INTO PAGE_39;In source:   #pragam CONST_SEG pagecodeA                   &lt;/PRE&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-02-16&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:12 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:46:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145320#M3284</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2020-10-29T08:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in the banked section</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145321#M3285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Modified previous post.&lt;/DIV&gt;&lt;DIV&gt;Not confuse CODE_SEG with CONST_SEG.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Nothing like a good user manual.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Manual_Compiler_HC08.pdf" pages 301-304&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="6"&gt;&lt;/FONT&gt;&lt;P align="left"&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;#pragma CONST_SEG: Constant Data&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;FONT size="6"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Segment Definition&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Scope: Next pragma CONST_SEG&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Syntax: "#pragma CONST_SEG” (&amp;lt;Modif&amp;gt; &amp;lt;Name&amp;gt; | “DEFAULT”)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Synonym: CONST_SECTION&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Arguments: &amp;lt;Modif&amp;gt;: Some of the following strings may be used: SHORT, __SHORT_SEG,&amp;nbsp; DIRECT,__DIRECT_SEG,&amp;nbsp; NEAR, __NEAR_SEG, CODE, __CODE_SEG, FAR, __FAR_SEG,&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Each modifier has a synonym in the form of “__&amp;lt;modifier&amp;gt;_ SEG”. This reduces clashes with other possible defines in header files, e.g. if NEAR is undefined in another portion of your code.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The segment modifiers are backend-dependent. Refer to the backend chapter to find the supported modifiers and their meaning.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The SHORT modifier specifies a segment which is accessed with - bit addresses.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;&amp;lt;Name&amp;gt;: The name of the segment. This name must be used in the link parameter file on the left side of the assignment in the PLACEMENT part. Please refer to the linker manual for details.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Default: DEFAULT&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;Description: This pragma allocates constant variables into a segment. The segment is then located in the link parameter file to specific addresses.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;The pragma CONST_SEG sets the current const segment. This segment is places all constant variable declarations. The default segment is set with:&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P align="left"&gt;&lt;STRONG&gt;&lt;FONT size="2"&gt;#pragma CONST_SEG DEFAULT”&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Feb 2007 23:16:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145321#M3285</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-16T23:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to force constants in the banked section</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145322#M3286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks for the help, nothing like the HC08 manuals, tehy seem to bo more complete than the 565 manuals. Or atleast easier to read. &lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;&lt;/DIV&gt;&lt;DIV&gt;Tim&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Feb 2007 07:07:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/How-to-force-constants-in-the-banked-section/m-p/145322#M3286</guid>
      <dc:creator>tim_milliken</dc:creator>
      <dc:date>2007-02-19T07:07:33Z</dc:date>
    </item>
  </channel>
</rss>

