<?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: CW08 V5.0 Problem with global variable over-writing a global structure</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139830#M2337</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello CrasyCat,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Thanks for your response.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I tried your suggestion, but this did not fix the over-write problem.&amp;nbsp; However, after a bit more experimentation, I did find the apparent cause.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It would seem that, when an absolute address is specified for a variable, such as -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;extern BlockStruct RAMBlock @RAMStart+8;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;the linker suffers amnesia concerning that variable, and ignores its existence (apart from including it in the map file).&amp;nbsp; However, if I declare the same variable without an absolue address, there is now no overlap of variables (as expected), but RAMBlock is in the wrong place, starting at 0x0080.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To fix this problem, I needed to alter the Z_RAM segment in the PRM file to&amp;nbsp;-&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Z_RAM = READ_WRITE&amp;nbsp;&amp;nbsp;0x0088 TO 0x00FF;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The result of this&amp;nbsp;was OK provided that RAMBlock was defined or declared before any other global variable.&amp;nbsp;&amp;nbsp;If I now implement your suggestion, on top of these changes, and the order of variable definition became non-critical.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To make accessible the 8 bytes of RAM, starting at 0x0080, I would need to define a further segment -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Z_RAM0 = READ_WRITE&amp;nbsp; 0x0080 TO 0x0087;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Is this behaviour of the linker, with respect to variables&amp;nbsp;having an absolute address,&amp;nbsp;documented anywhere?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-07-14&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:55 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Jul 2007 21:54:06 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-07-13T21:54:06Z</dc:date>
    <item>
      <title>CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139828#M2335</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Hello,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;I have been attempting to use the ROM based routines ERARNGE (page erase) and PRGRNGE from within my code, to implement non-volatile storage of parameter data within a 908QYx device.&amp;nbsp; The use of these routines requires a data structure to reside at a specific location in RAM.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;The following is an excerpt from the associated header file -&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;#define DATASIZE 2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Data bytes to be stored (up to 32) */&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;#define RAMStart 0x0080&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;typedef struct {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; byte CTRLBYT;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; byte CPUSPD;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; word LADDR;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; byte databuf[DATASIZE];&lt;BR /&gt;}&amp;nbsp; BlockStruct;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;extern BlockStruct RAMBlock @ RAMStart+8;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;It is useful to determine the number of bytes to be stored from within the header file, by defining the value of DATASIZE.&amp;nbsp; The code compiles correctly, and the RAMBlock structure commences at address 0x0088.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;However, if I declare further global variables, as well as the structure,&amp;nbsp;(within main.c) such as -&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 2;"&gt;/* Globals */&lt;BR /&gt;BlockStruct RAMBlock;&lt;BR /&gt;byte var[16];&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;the situation occurs where the var array will commence at address 0x0080, and will consequently over-write RAMBlock.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Is there some way to solve this problem, perhaps using pragmas.&amp;nbsp; I do not necessarily want to create a new section specifically for RAMBlock, within the PRM file, for the following reasons -&lt;/SPAN&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI&gt;&lt;SPAN style="font-size: 2;"&gt;The size of a new section would need to match DATASIZE, that may differ for each application.&amp;nbsp; It would not generally be&amp;nbsp;feasible to always allow for a&amp;nbsp;worst case of 36 bytes, not with&amp;nbsp;a total of 128 bytes of RAM available.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-size: 2;"&gt;It is likely that the 8 bytes of RAM starting at 0x0080 would never be assigned to anything.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Presumably, if I did not need to specify the exact location for RAMBlock, there would not be a problem.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Any suggestions would be welcomed.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Regards,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Mac&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by bigmac on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-07-12&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;10:17 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Jul 2007 19:12:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139828#M2335</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-12T19:12:35Z</dc:date>
    </item>
    <item>
      <title>Re: CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139829#M2336</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 am not sure I have enough information to really help here, so I will make some assumption.&lt;/DIV&gt;&lt;DIV&gt;I assume that:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;The RAM (or Z_:RAM) memory area&amp;nbsp;starts at 0x80 in your .prm file&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;In that case would do the following:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; - Define the variable&amp;nbsp;&amp;nbsp;&lt;FONT face="Courier New"&gt;RAMBlock&lt;/FONT&gt; &lt;FONT face="Arial"&gt;in a user specific data section&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; -&amp;nbsp;Place that section first in the RAM or ZRAM memory area. This way there will be no object&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; overwriting the variable. And variable size will be just what you need.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Example of PRM File&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;SEGMENTS     ROM                      =  READ_ONLY    0xF800 TO 0xFDFF;    Z_RAM                    =  READ_WRITE   0x0080 TO 0x00FF;    ROM1                     =  READ_ONLY    0xFFB0 TO 0xFFBD;    ROM2                     =  READ_ONLY    0xFFC2 TO 0xFFCF;ENDPLACEMENT    DEFAULT_ROM, ROM_VAR, STRINGS       INTO  ROM;     MyRAMBlock, DEFAULT_RAM,    _DATA_ZEROPAGE, MY_ZEROPAGE         INTO  Z_RAM;END&lt;/PRE&gt;&lt;/DIV&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/DIV&gt;&lt;DIV&gt;Does that help?&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>Thu, 12 Jul 2007 20:00:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139829#M2336</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2007-07-12T20:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139830#M2337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello CrasyCat,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Thanks for your response.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I tried your suggestion, but this did not fix the over-write problem.&amp;nbsp; However, after a bit more experimentation, I did find the apparent cause.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It would seem that, when an absolute address is specified for a variable, such as -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;extern BlockStruct RAMBlock @RAMStart+8;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;the linker suffers amnesia concerning that variable, and ignores its existence (apart from including it in the map file).&amp;nbsp; However, if I declare the same variable without an absolue address, there is now no overlap of variables (as expected), but RAMBlock is in the wrong place, starting at 0x0080.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To fix this problem, I needed to alter the Z_RAM segment in the PRM file to&amp;nbsp;-&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Z_RAM = READ_WRITE&amp;nbsp;&amp;nbsp;0x0088 TO 0x00FF;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The result of this&amp;nbsp;was OK provided that RAMBlock was defined or declared before any other global variable.&amp;nbsp;&amp;nbsp;If I now implement your suggestion, on top of these changes, and the order of variable definition became non-critical.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To make accessible the 8 bytes of RAM, starting at 0x0080, I would need to define a further segment -&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT face="Courier New" size="2"&gt;Z_RAM0 = READ_WRITE&amp;nbsp; 0x0080 TO 0x0087;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Is this behaviour of the linker, with respect to variables&amp;nbsp;having an absolute address,&amp;nbsp;documented anywhere?&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by bigmac on &lt;SPAN class="date_text"&gt;2007-07-14&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;12:55 AM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Jul 2007 21:54:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139830#M2337</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-13T21:54:06Z</dc:date>
    </item>
    <item>
      <title>Re: CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139831#M2338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Variables are either places at a specific address (with the @) or they are placed in a section.&lt;BR /&gt;If there is a @, then the current section does not matter, so I guess crazycat's suggestion did include to remove the absolute declaration, well it did include it implicitely &lt;IMG alt="Smiley Wink" class="emoticon emoticon-smileywink" id="smileywink" src="https://community.nxp.com/i/smilies/16x16_smiley-wink.png" title="Smiley Wink" /&gt;.&lt;BR /&gt;&lt;BR /&gt;As far as the linker is concerned, the linker does not place or move objects placed with a @ in anyway, they are actually handled identically to&amp;nbsp; assembly ORG sections. They are also not considered during the placement of relocatable objects into the segments, so the existence of a absolute object does not cause a gap in the relocatable objects.&lt;BR /&gt;Hmm not sure it is documented that what the linker is not doing &lt;IMG alt="Smiley Wink" class="emoticon emoticon-smileywink" id="smileywink" src="https://community.nxp.com/i/smilies/16x16_smiley-wink.png" title="Smiley Wink" /&gt;. In general the idea is if the user is placing the objects at a certain address he knows what he is doing and therefore if they should not overlap then he would exclude the range from the segments in the prm file.&lt;BR /&gt;Surprisingly often I did see that the linker warning for overlapping objects (which does occur for such cases) is explictely disabled, so there are really use cases for overlapping of absolute objects with actual content.&lt;BR /&gt;&lt;BR /&gt;Note that you can place the Z_RAM0 segment just after the Z_RAM one.&lt;BR /&gt;....&lt;BR /&gt;&lt;PRE&gt; _DATA_ZEROPAGE, MY_ZEROPAGE         INTO  Z_RAM,Z_RAM0;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:39:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139831#M2338</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2020-10-29T08:39:53Z</dc:date>
    </item>
    <item>
      <title>Re: CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139832#M2339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Daniel,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Thank you for clarifying the situation.&amp;nbsp; With default settings for the project, I did not actually get any linker warnings.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Jul 2007 00:40:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139832#M2339</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-14T00:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: CW08 V5.0 Problem with global variable over-writing a global structure</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139833#M2340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;I created a project for the HC08 QY8, and then in the linker panel the wizard adds the options&lt;BR /&gt;"-WmsgSd1100 -WmsgSd1912 " which basically shuts up the linker.&lt;BR /&gt;When removing those options, the linker complains:&lt;BR /&gt;L1912: Object _COPCTL overlaps with another (last addr: 0x10000, object addr: 0xFFFF)&lt;BR /&gt;&lt;BR /&gt;Which is not wrong either, _COPCTL:&lt;BR /&gt;&lt;BR /&gt;extern volatile COPCTLSTR _COPCTL @0x0000FFFF;&lt;BR /&gt;&lt;BR /&gt;shares the address with the second byte of the reset vector.&lt;BR /&gt;So the code works fine, but in the end the outcome of this setup is that the linker does not complain for overlappings anymore ;-(.&lt;BR /&gt;&lt;BR /&gt;One solution would be to define _COPCTL as macro, but that's not done in the current headers.&lt;BR /&gt;Anyway, that's why the linker does not issue a warning.&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>Sat, 14 Jul 2007 03:38:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW08-V5-0-Problem-with-global-variable-over-writing-a-global/m-p/139833#M2340</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-07-14T03:38:59Z</dc:date>
    </item>
  </channel>
</rss>

