<?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 constant data into code space in Classic/Legacy CodeWarrior</title>
    <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182511#M4237</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Make your table static const.&lt;BR /&gt;For globals const alone is enough, but for locals you have to make them static (function static) too, otherwise CW will still allocate them on the stack.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Aug 2008 04:48:04 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2008-08-29T04:48:04Z</dc:date>
    <item>
      <title>assigning constant data into code space</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182508#M4234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am porting an application over from the Keil C51 compiler. I am storing some constants in code space and the C51 code is&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;void say(unsigned char word, unsigned char offset)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned long word_address;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // word address high byte table&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; code unsigned char addresstablehi[] = { 0x00,0x00,0x00,0x00,0x01,0x01,0x04,0x07 ,0x08 } ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I perform this in CW.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The address table values are calculated by another program which produces a text file in the correct format so that I can cut and paste into the compiler, so I would hope the CW code would be similar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 20:14:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182508#M4234</guid>
      <dc:creator>stevec</dc:creator>
      <dc:date>2008-08-28T20:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: assigning constant data into code space</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182509#M4235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Doing I quick search on this forum, I found the following &lt;A href="http://forums.freescale.com/freescale/board/message?board.id=CWCOMM&amp;amp;message.id=5608&amp;amp;query.id=123350" target="_blank"&gt;link&lt;/A&gt; which might get you started.&lt;BR /&gt;&lt;BR /&gt;Also, it would probably help if you mentioned what version of CodeWarrior you're using and what MCU you're targeting.&lt;BR /&gt;&lt;BR /&gt;---Tom&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 22:34:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182509#M4235</guid>
      <dc:creator>J2MEJediMaster</dc:creator>
      <dc:date>2008-08-28T22:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: assigning constant data into code space</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182510#M4236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks, I'm using CW 5.7 and using an MC9S08RE16.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2008 22:52:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182510#M4236</guid>
      <dc:creator>stevec</dc:creator>
      <dc:date>2008-08-28T22:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: assigning constant data into code space</title>
      <link>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182511#M4237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Make your table static const.&lt;BR /&gt;For globals const alone is enough, but for locals you have to make them static (function static) too, otherwise CW will still allocate them on the stack.&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2008 04:48:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Classic-Legacy-CodeWarrior/assigning-constant-data-into-code-space/m-p/182511#M4237</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2008-08-29T04:48:04Z</dc:date>
    </item>
  </channel>
</rss>

