<?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>CodeWarrior for MCU中的主题 Re: Defining a functions location in ROM</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153014#M3769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The @ syntax is not supported for functions as far as I know,&lt;BR /&gt;but the #pragma CODE_SEG should work.&lt;BR /&gt;For a HC12/S12/S12X (not sure about the CPU of the OP), its usually enough to place interrupt handlers anywhere in a non paged region. For this there is already an existing section (I think its called NON_PAGED. but I'm not sure). Also I would add a __NEAR_SEG qualifier for the HC12 to the #prama.&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>Sun, 07 Oct 2007 20:44:54 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-10-07T20:44:54Z</dc:date>
    <item>
      <title>Defining a functions location in ROM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153012#M3767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I have the need to place an interrupt's function body at a predefined address in ROM.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;How would I go about doing this in C?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;- Mike&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 06 Oct 2007 02:27:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153012#M3767</guid>
      <dc:creator>hard_wired</dc:creator>
      <dc:date>2007-10-06T02:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a functions location in ROM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153013#M3768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;Have you tried like for variables ?&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;FONT face="Courier New"&gt;void function(void) @ 0x4500; // prototype&lt;/FONT&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;FONT face="Courier New"&gt;#PRAGMA CODE_SEG SPECROM&lt;BR /&gt;void function(void); // prototype&lt;BR /&gt;#PRAGMA CODE_SEG DEFAULT&lt;BR /&gt;(...)&lt;BR /&gt;&lt;BR /&gt;#PRAGMA CODE_SEG SPECROM&lt;BR /&gt;void function(void) {&lt;BR /&gt;blabla;&lt;BR /&gt;}&lt;BR /&gt;#PRAGMA CODE_SEG DEFAULT&lt;/FONT&gt;&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;with SPECROM declared in your PRM file.&lt;BR /&gt;&lt;BR /&gt;Alfreda&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Oct 2007 04:40:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153013#M3768</guid>
      <dc:creator>Nabla69</dc:creator>
      <dc:date>2007-10-07T04:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a functions location in ROM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153014#M3769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;The @ syntax is not supported for functions as far as I know,&lt;BR /&gt;but the #pragma CODE_SEG should work.&lt;BR /&gt;For a HC12/S12/S12X (not sure about the CPU of the OP), its usually enough to place interrupt handlers anywhere in a non paged region. For this there is already an existing section (I think its called NON_PAGED. but I'm not sure). Also I would add a __NEAR_SEG qualifier for the HC12 to the #prama.&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>Sun, 07 Oct 2007 20:44:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153014#M3769</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-10-07T20:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Defining a functions location in ROM</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153015#M3770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Just to close the loop here.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I agree with CompilerGuru. @ operator is not applicable to functions.&lt;/DIV&gt;&lt;DIV&gt;So you have to place the function in a specific section.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The section NON_BANKED is used&amp;nbsp;is standard project to place code which needs to be allocated in the non-paged ROM area.&lt;/DIV&gt;&lt;DIV&gt;And you need to write the pragma as&lt;/DIV&gt;&lt;DIV&gt;#pragma CODE_SEG __NEAR_SEG NON_BANKED&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I hope this helps.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2007 16:09:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Defining-a-functions-location-in-ROM/m-p/153015#M3770</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-10-08T16:09:35Z</dc:date>
    </item>
  </channel>
</rss>

