<?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のトピックRe: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214572#M18592</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Yes Navidad, everything counts when you navigate in solitude !&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;I will wait for your return.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;I appreciate your contribution.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Kind regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Roberto&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jul 2010 22:55:04 GMT</pubDate>
    <dc:creator>BooleanBob</dc:creator>
    <dc:date>2010-07-27T22:55:04Z</dc:date>
    <item>
      <title>MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214564#M18584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello friends.&lt;/P&gt;&lt;P&gt;Can anybody tell me how to declare a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;static const char array[10]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;...in C, for KA2 chip ?&lt;/P&gt;&lt;P&gt;The linker is complaining with an L1023 ... "L1023: Object array spans multiple pages"&lt;/P&gt;&lt;P&gt;I remember this happens also with QE128 when the paged memory boundaries are exceeded.&lt;/P&gt;&lt;P&gt;I don't think that the same sintax could be used for KA2.&lt;/P&gt;&lt;P&gt;Do I also have to add some segment declaractions for the linker .prm file ?&lt;/P&gt;&lt;P&gt;I can't find any C examples for accessing an array this way. The AN3266 gives assembler examples but are not enough.&lt;/P&gt;&lt;P&gt;The online help in&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.freescale.com%2Finfocenter%2FCodewarrior%2Findex.jsp%3Ftopic%3D%2Fcom.freescale.doc.mcu.hcs08_compiler%2F080_ANSI-C_Frontend.Using_the___far_Keyword_for_Pointers.html" rel="nofollow" target="_blank"&gt;http://www.freescale.com/infocenter/Codewarrior/index.jsp?topic=/com.freescale.doc.mcu.hcs08_compiler/080_ANSI-C_Frontend.Using_the___far_Keyword_for_Pointers.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;just gives the definition for far pointers.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jul 2010 04:29:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214564#M18584</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-23T04:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214565#M18585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;First a short answer. You can probably safely ignore the warning, details below. The result is not as efficient as it could be, but works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now the more detailed response &lt;IMG alt="Smiley Happy" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="https://community.nxp.com/i/smilies/16x16_smiley-happy.png" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;P&gt;For the RS08 in extended (meaning non zero page) memory, the compiler supports 2 kind of accesses.&lt;/P&gt;&lt;P&gt;Paged (segment qualifier __SEG_PAGED, pointer qualifier __paged) and far (segment qualifier __FAR_SEG, pointer qualifier __far).&lt;/P&gt;&lt;P&gt;Far accesses/variables can be located anywhere, they may cross page (meaning multiple of 64) boundaries. For __paged accesses the compiler assumes that there is no page boundary inside of an object.&lt;/P&gt;&lt;P&gt;If an object is bigger than the page size (64), then it has to be __far as there is always a page boundary somewhere. For all object objects though using __paged access is MUCH more efficient, therefore I would suggest to use always __paged with the single exception of objects &amp;gt; 64 bytes, where __far is mandatory.&lt;/P&gt;&lt;P&gt;Back to the warning, the warning if for __paged accesses, but as by default there are no paged accesses (default is the safe but slow and huge __far), the code works. Just not as efficient as it could be.&lt;/P&gt;&lt;P&gt;Also the warning cannot be avoided as far as I know for objects &amp;gt; 64 bytes (I personally find the warning a bit unfortunate, well it is as it is).&lt;/P&gt;&lt;P&gt;For using paged, the requirement that nothing must cross a page boundary is best implemented in the prm file by listing&amp;nbsp;&lt;/P&gt;&lt;P&gt;the used flash as 64 byte blocks.&lt;/P&gt;&lt;P&gt;A sample helps I hope:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;#pragma push&lt;FONT color="#008000"&gt;#pragma CONST_SEG __PAGED_SEG MY_PAGED_SEC&lt;/FONT&gt;const int test0[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};const int test1[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};const int test2[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};&lt;FONT color="#008000"&gt;#pragma CONST_SEG __FAR_SEG MY_FAR_SEC&lt;/FONT&gt;const int test_far[100] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16};#pragma popvolatile int sum;void main(void) {  unsigned char i = 0;  for (;;)  {   i++;   i %= sizeof(test0)/sizeof(test0[0]);   sum = test0[i] + test1[i] + test2[i] + test_far[i];   __RESET_WATCHDOG();  }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And here the prm parts (for a ka2, adapt to your chip:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */    TINY_RAM                 =  READ_WRITE   0x0005 TO 0x000D;    RAM                      =  READ_WRITE   0x0020 TO 0x004F;    RESERVED_RAM             =  NO_INIT      0x0000 TO 0x0004; &lt;FONT color="#008000"&gt;   MY_PAGED_SEG0            =  READ_ONLY    0x3800 TO 0x383F;    MY_PAGED_SEG1            =  READ_ONLY    0x3840 TO 0x387F;    MY_PAGED_SEG2            =  READ_ONLY    0x3880 TO 0x38BF;&lt;/FONT&gt;    ROM                      =  READ_ONLY    0x38C0 TO 0x3FF7;ENDPLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */    RESERVED                 INTO RESERVED_RAM;    TINY_RAM_VARS            INTO TINY_RAM;    DIRECT_RAM_VARS          INTO RAM, TINY_RAM;    DEFAULT_RAM              INTO RAM, TINY_RAM;    &lt;FONT color="#008000"&gt;MY_FAR_SEC,&lt;/FONT&gt; DEFAULT_ROM  INTO ROM; &lt;FONT color="#008000"&gt;   MY_PAGED_SEC INTO MY_PAGED_SEG0, MY_PAGED_SEG1, MY_PAGED_SEG2;&lt;/FONT&gt;END&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 12:57:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214565#M18585</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2020-11-02T12:57:21Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214566#M18586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Daniel:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for your explanation and the code examples.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First I would like to make clear that I am perfectly aware that trying to program a tiny chip such as the KA2 using a C compiler could sound rather strange to many colleagues, but I know that there is no reason not for doing it. I have lot of good reasons to do so and you know them well ( consistency, self documentation of the written code, efficiency, math libraries online, portability, etc.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had learn about managing the paged memory code in my projects with QE128, but in this case there are reasonably good documents to read and code examples that comes with the evaluation board of this chip. To my surprise, there is practically no information about KA2 and C language coming with the Softec kit. Yes, this could be the case of a chip that "likes" more assembly language than C. I understand the reasons but I don't agree with this because it should perfectly be done with a good compiler such as CodeWarrior.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are a compiler guru and I don't really know if you probably work for some compiler company as Metrowerks/Freescale, but I would like to ask you how did you get this information ? Could you please be so kind to enlighten me ? Because I have read the documentation of the compiler and linker ( many times ) and it doesn't come clear from there. I was about to declare the segments for the pages in the .PRM file and try to make some weird thing splitting the arrays and some other ugly C destructive practice ( Aghhh ! ) . Did I missed some literature or should I had search some other place ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been using Freescale chips fully programmed in C for years and I think that I have almost everything I need to program the regular S08 chips. But I couldn't find information about C examples for declaring far objects for the KA chips from the RS08 family ( intensive use of Google these days )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again many thanks my friend, I will report results later.&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Greetings from Buenos Aires, Argentina.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Roberto&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 04:15:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214566#M18586</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-27T04:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214567#M18587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Daniel:&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;Here are my .PRM file for the KA2 and a portion of the sample code.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;I have added some page segments.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;The&lt;/FONT&gt; &lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;&lt;/FONT&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;__PAGED_SEG&lt;/FONT&gt; works fine, but the compiler screams with the&lt;/FONT&gt; &lt;FONT color="#333399" face="courier new,courier"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;__FAR_SEG&lt;/FONT&gt; declaration of the array even with an object size that matches the page segment size. Attached is the error output. What am I doing wrong ?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;Thank you again&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;&lt;FONT color="#000000" face="arial,helvetica,sans-serif"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;#pragma push&lt;BR /&gt;#pragma CONST_SEG __PAGED_SEG MY_PAGED_SEC&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;&lt;BR /&gt;const unsigned char simtab[64]&amp;nbsp; = {0,1,2,3,4,5,6,7,8,9};&lt;BR /&gt;const unsigned char simtab1[64] = {0,1,2,3,4,5,6,7,8,9};&lt;BR /&gt;const unsigned char simtab2[64] = {0,1,2,3,4,5,6,7,8,9};&lt;BR /&gt;&lt;BR /&gt;#pragma CONST_SEG __FAR_SEG MY_FAR_SEC&lt;BR /&gt;&lt;BR /&gt;const unsigned char simtab3[64] = {0,1,2,3,4,5,6,7,8,9};&lt;BR /&gt;&lt;BR /&gt;#pragma pop&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;===========================================================&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399" face="courier new,courier"&gt;/* This is a linker parameter file for the mc9rs08ka2 */&lt;BR /&gt;&lt;BR /&gt;NAMES END /* CodeWarrior will pass all the needed files to the linker by command line. But here you may add your own files too. */&lt;BR /&gt;&lt;BR /&gt;SEGMENTS /* Here all RAM/ROM areas of the device are listed. Used in PLACEMENT below. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;TINY_RAM&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_WRITE&amp;nbsp;&amp;nbsp; 0x0005 TO 0x000D;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RAM&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_WRITE&amp;nbsp;&amp;nbsp; 0x0020 TO 0x004F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESERVED_RAM&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; NO_INIT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0000 TO 0x0004;&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG0&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; 0x3800 TO 0x383F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_PAGED_SEG1&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; 0x3840 TO 0x387F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_PAGED_SEG2&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; 0x3880 TO 0x38BF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG3&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; 0x38C0 TO 0x38FF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG4&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; 0x3900 TO 0x393F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_PAGED_SEG5&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; 0x3940 TO 0x397F;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_PAGED_SEG6&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; 0x3980 TO 0x39BF;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG7&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; 0x39C0 TO 0x39FF;&lt;BR /&gt;&lt;BR /&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; 0x3A00 TO 0x3FF7;&lt;BR /&gt;&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;PLACEMENT /* Here all predefined and user segments are placed into the SEGMENTS defined above. */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;RESERVED&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;&amp;nbsp; &amp;nbsp; RESERVED_RAM;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TINY_RAM_VARS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO &amp;nbsp;&amp;nbsp; &amp;nbsp;TINY_RAM;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DIRECT_RAM_VARS&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO &amp;nbsp;&amp;nbsp; &amp;nbsp;RAM, TINY_RAM;&lt;BR /&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;&amp;nbsp; INTO &amp;nbsp;&amp;nbsp; &amp;nbsp;RAM, TINY_RAM;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_FAR_SEC, DEFAULT_ROM INTO &amp;nbsp;&amp;nbsp; &amp;nbsp;ROM;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; MY_PAGED_SEC &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; INTO &amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG0, MY_PAGED_SEG1,&lt;/FONT&gt; &lt;FONT color="#333399" face="courier new,courier"&gt;MY_PAGED_SEG2,MY_PAGED_SEG3,&lt;BR /&gt;&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;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;MY_PAGED_SEG4, MY_PAGED_SEG5, MY_PAGED_SEG6,MY_PAGED_SEG7;&lt;BR /&gt;&lt;BR /&gt;END&lt;BR /&gt;&lt;BR /&gt;STACKSIZE 0x00 /* no stack for RS08 */&lt;BR /&gt;//VECTOR 0 _Startup&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Reset vector: this is the default entry point for an application. */&lt;/FONT&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;FONT color="#000000"&gt;========================================================================&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 05:32:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214567#M18587</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-27T05:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214568#M18588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;&lt;A href="http://forums.freescale.com/t5/user/viewprofilepage/user-id/7363" target="_self"&gt;BooleanBob&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You are not doing anything wrong (but you could have &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;). The linker warns you that one of your objects goes from one page to another, meaning that it is only safe to access it if it is placed in a far segment (or accessed with a far pointer). Of course, you already placed your object is a far segment, but this information is not really available at link time. I know that this may get a bit annoying, but I think it is the type of information that may just save some debugging time since this system of extending ANSI-C for these small MCUs tends to be rather complicated. You can also disable the message if you do not find it useful&amp;nbsp;any more&amp;nbsp;(pass&amp;nbsp;-WmsgSd1023 to the RS08 linker).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 15:07:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214568#M18588</guid>
      <dc:creator>Navidad</dc:creator>
      <dc:date>2010-07-27T15:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214569#M18589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Yes my dear friend, I was tired when I read your first post and skipped something very important. You have explained perfectly well. For some reason I had always read this linker warning as an error &lt;IMG alt=":smileytongue:" class="emoticon emoticon-smileytongue" id="smileytongue" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-tongue.gif" title="Smiley Tongue" /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Understood, I can live with this warning. I will return with confirmation of problem solved.&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Please, I am curious: where is this information stored ?&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Very kind regards !&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Roberto&lt;/FONT&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 22:07:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214569#M18589</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-27T22:07:01Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214570#M18590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Thank you too, Navidad.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;You are right. But I try not to disable any messages, unless they are those that really bother as "Result of function called is not used" or "Asignment in condition".&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;This is why it bothers to have some warning hanging but in this case, no problem.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Kind regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#333399"&gt;Roberto&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 22:12:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214570#M18590</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-27T22:12:00Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214571#M18591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You mean where is all that documented ? Generally speaking it is in the compiler manual. However, I have to agree that it is a bit spread out, you have to put together quite many pieces. Freescale is putting it all together in a brief document (an application note) that targets exactly this subject: accessing RS08 upper memory. This is obviously not of much use to you any more, but for other people out there trying to do the same job I guess it will come handy. I'm not sure yet when this will make it on freescale.com, but I will come back with a link here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 22:21:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214571#M18591</guid>
      <dc:creator>Navidad</dc:creator>
      <dc:date>2010-07-27T22:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214572#M18592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Yes Navidad, everything counts when you navigate in solitude !&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;I will wait for your return.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;I appreciate your contribution.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Kind regards&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;Roberto&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jul 2010 22:55:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214572#M18592</guid>
      <dc:creator>BooleanBob</dc:creator>
      <dc:date>2010-07-27T22:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: MC9RS08KA2 Newbie I need to declare a far array C language CodeWarrior</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214573#M18593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The prm file does not enforce that simtab3 is not allocated across a page boundary, so linker message in this case can be safely ignored. It is similar to the case of a &amp;gt;64 byte far variable, where the warning cannot be avoided as well :smileysad:.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The best location in the manual I saw was the chapter,&lt;/P&gt;&lt;P&gt;CodeWarrior for Microcontrollers V10.0 &amp;gt; HCS08/RS08 for Microcontrollers &amp;gt; RS08 Build Tools Reference Manual &amp;gt; Generating Compact Code - Relocatable Data &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but even in those samples it is not enforced that the paged variables were allocated without crossing a page boundary :smileysad:.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I do know the tools because I worked on the compiler many years ago, but that was before the RS08 came up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Jul 2010 04:59:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9RS08KA2-Newbie-I-need-to-declare-a-far-array-C-language/m-p/214573#M18593</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2010-07-28T04:59:42Z</dc:date>
    </item>
  </channel>
</rss>

