<?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 write code in a specific address using C? in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155241#M3963</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks mac, for your fast and well explained answer&lt;/P&gt;&lt;P&gt;tomorrow if everything is Ok i will try your solution.&lt;/P&gt;&lt;P&gt;I will comment you the final result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again and have a good time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Nov 2009 04:11:37 GMT</pubDate>
    <dc:creator>ffogg</dc:creator>
    <dc:date>2009-11-19T04:11:37Z</dc:date>
    <item>
      <title>how to write code in a specific address using C?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155239#M3961</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm programming the MC9S08QG8 chip with Codewarrior v6.2 and using the C compiler.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to program a piece of program above address 0xF600 when the program begins&lt;/P&gt;&lt;P&gt;at address 0xE000 and ends at 0xE430 and now i must add some more routines starting&lt;/P&gt;&lt;P&gt;in&amp;nbsp;0xF600 (a little BIOS) any chance? And of course using 'C'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 08:25:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155239#M3961</guid>
      <dc:creator>ffogg</dc:creator>
      <dc:date>2009-11-18T08:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: how to write code in a specific address using C?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155240#M3962</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would need to modify the PRM file for the project, to create a new segment starting at 0xF600.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;NAMES END&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;SEGMENTS&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z_RAM&amp;nbsp; =&amp;nbsp; READ_WRITE&amp;nbsp;&amp;nbsp; 0x0060 TO 0x00FF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; READ_WRITE&amp;nbsp;&amp;nbsp; 0x0100 TO 0x025F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROM&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xE000 TO &lt;FONT color="#ff0000"&gt;0xF5FF&lt;/FONT&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#ff0000"&gt;HIROM&amp;nbsp; =&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xF600 TO 0xFFAD;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROM1&amp;nbsp;&amp;nbsp; =&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xFFC0 TO 0xFFCF;&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;PLACEMENT&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _DATA_ZEROPAGE,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_ZEROPAGE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; Z_RAM;&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT_RAM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; RAM;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _PRESTART,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* startup code */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STARTUP,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* startup data structures */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROM_VAR,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* constant variables */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; STRINGS,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* string literals */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; VIRTUAL_TABLE_SEGMENT, /* C++ virtual table segment */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DEFAULT_ROM,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; COPY&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; ROM;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT color="#ff0000"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; BIOS_ROM&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO&amp;nbsp; HIROM&lt;/FONT&gt;&lt;BR /&gt;END&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;BR /&gt;STACKSIZE 0x50&lt;BR /&gt;VECTOR 0 _Startup&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then preceeding the functions required for the BIOS, you will need to use an appropriate #pragma so that the linker to places the code within the BIOS_ROM segment, rather than the DEFAULT_ROM segment.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Nov 2009 12:23:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155240#M3962</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-11-18T12:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: how to write code in a specific address using C?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155241#M3963</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks mac, for your fast and well explained answer&lt;/P&gt;&lt;P&gt;tomorrow if everything is Ok i will try your solution.&lt;/P&gt;&lt;P&gt;I will comment you the final result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again and have a good time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 04:11:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155241#M3963</guid>
      <dc:creator>ffogg</dc:creator>
      <dc:date>2009-11-19T04:11:37Z</dc:date>
    </item>
    <item>
      <title>Re: how to write code in a specific address using C?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155242#M3964</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;thanks once more, it worked fine.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Nov 2009 06:09:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/how-to-write-code-in-a-specific-address-using-C/m-p/155242#M3964</guid>
      <dc:creator>ffogg</dc:creator>
      <dc:date>2009-11-23T06:09:14Z</dc:date>
    </item>
  </channel>
</rss>

