<?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: C equivalent of ORG? in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135443#M4016</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks peg and Alban.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I searched at 8 bit CW as peg suggested, and reposted there with my analysis of what Alban suggested.&amp;nbsp; Not much progress with the search, so far.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Jun 2007 02:43:33 GMT</pubDate>
    <dc:creator>DSbob</dc:creator>
    <dc:date>2007-06-02T02:43:33Z</dc:date>
    <item>
      <title>C equivalent of ORG?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135440#M4013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;I've spent years programming HC05 in asm.&amp;nbsp; New to C and Flash, using S08QG8.&amp;nbsp; I need to store a calibration value in flash.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;With help from this forum, I have it written to second to last page, 0xFC00.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Memory write protection starts at last page and works toward lower pages, right?&amp;nbsp; So with a flash writer in my application, I sure want to protect program memory!&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I want to write the calibration value at 0xE000, and make sure the complier/linker&amp;nbsp;starts the application program at 0xE200, the second page of flash.&amp;nbsp; I've studied Segments and Sections in the linker prm file but don't see how to force that.&amp;nbsp; Any suggestions?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Writing this, I've come to realize each debug session will probably overwrite the calibration value through mass erase.&amp;nbsp; I think that can be delt with, have used command files.&amp;nbsp; Will a w(rite bytes, words, etc) post load command actually write to flash, so I can debug normal operation?&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 02:54:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135440#M4013</guid>
      <dc:creator>DSbob</dc:creator>
      <dc:date>2007-06-01T02:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: C equivalent of ORG?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135441#M4014</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi and welcome to the forums,&lt;/DIV&gt;&lt;DIV&gt;It is not the job of C to do this kind of stuff.&lt;/DIV&gt;&lt;DIV&gt;It will be tool specific.&lt;/DIV&gt;&lt;DIV&gt;What compiler are you using?&lt;/DIV&gt;&lt;DIV&gt;If it is Codewarrior then this question would best be put in the 8-bit Codewarrior forum.&lt;/DIV&gt;&lt;DIV&gt;A search in there will also turn up your answer.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 04:52:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135441#M4014</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-06-01T04:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: C equivalent of ORG?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135442#M4015</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;The most clever way I see is to change the PRM file:&lt;BR /&gt;&lt;BR /&gt;- break the exisiting second FlashC000 emplacement into Flash2a C000-DFEF and Flash2b E000-FFFF,&lt;BR /&gt;- change the "INTO" to go to Flash2b instead of Flash C000.&lt;BR /&gt;- create a new INTO: CALIBDATA INTO Flash2a&lt;BR /&gt;- in your software put #pragma CONST_SEG CALIBDATA and #pragma CONST_SEG DEFAULT around the constants declared as CONST you want to be in the Flash2a area.&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Alban.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jun 2007 15:33:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135442#M4015</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-06-01T15:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: C equivalent of ORG?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135443#M4016</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thanks peg and Alban.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I searched at 8 bit CW as peg suggested, and reposted there with my analysis of what Alban suggested.&amp;nbsp; Not much progress with the search, so far.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Jun 2007 02:43:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135443#M4016</guid>
      <dc:creator>DSbob</dc:creator>
      <dc:date>2007-06-02T02:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: C equivalent of ORG?</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135444#M4017</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;I assume you want to define a constant and allocate it at an absolute address.&lt;/DIV&gt;&lt;DIV&gt;Am I right?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are using CodeWarrior compiler you can use the @ operator in this purpose.&lt;/DIV&gt;&lt;DIV&gt;For example following instruction will allocate a 2 byte object at address 0xFFA0 and initialize it with 0x10.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp; const int toto @0xFFA0 = 0x10 ;&lt;BR /&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If you are using another compiler than CodeWarrior, please check with your compiler vendor how you are supposed to solve that.&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, 04 Jun 2007 17:00:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/C-equivalent-of-ORG/m-p/135444#M4017</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-06-04T17:00:26Z</dc:date>
    </item>
  </channel>
</rss>

