<?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>8-bit Microcontrollers中的主题 Constant data to specified ROM address</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209461#M17878</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MC9S08SG32 and trying to write version number to a specified ROM address, how to do that? e.g. at ROM address 0x800, write version number "1.00", and from 0x8004 to store regular code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2009 09:11:41 GMT</pubDate>
    <dc:creator>SZheng</dc:creator>
    <dc:date>2009-08-24T09:11:41Z</dc:date>
    <item>
      <title>Constant data to specified ROM address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209461#M17878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using MC9S08SG32 and trying to write version number to a specified ROM address, how to do that? e.g. at ROM address 0x800, write version number "1.00", and from 0x8004 to store regular code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 09:11:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209461#M17878</guid>
      <dc:creator>SZheng</dc:creator>
      <dc:date>2009-08-24T09:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Constant data to specified ROM address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209462#M17879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assume you are using CodeWarrior for MCU V6.x. Right?&lt;/P&gt;&lt;P&gt;I also assume you want to store the version number as a string (array of char).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also assume there is&amp;nbsp; a typo in your message and string is expected at address 0x8000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You need to remember that in ANSI C every string need to be terminated by a NULL character(0x00). So you need to reserve at least&amp;nbsp;5 bytes for your version number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To allocate the version number at address 0x8000, define following object in one of your C source files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;const char Version[] @0x8000 = "1.00";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then change your .prm file to ensure the linker does not allocate anything over that memory&amp;nbsp;area.&lt;/P&gt;&lt;P&gt;Change&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x8000 TO 0xFFAD;&lt;BR /&gt;into&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;nbsp; READ_ONLY&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x8005 TO 0xFFAD;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Link your application. That should be it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CrasyCat&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 16:36:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209462#M17879</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2009-08-24T16:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: Constant data to specified ROM address</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209463#M17880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;It works well. I appreciate your quick response!&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2009 19:36:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Constant-data-to-specified-ROM-address/m-p/209463#M17880</guid>
      <dc:creator>SZheng</dc:creator>
      <dc:date>2009-08-24T19:36:56Z</dc:date>
    </item>
  </channel>
</rss>

