<?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: CW v10.2 Win7 64-bit Compilation Bug</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154894#M3907</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it is the USBDM (to clarify, not the P&amp;amp;E OSBDM)? Can you try it with a P&amp;amp;E cable (if you have one)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 14:05:56 GMT</pubDate>
    <dc:creator>BlackNight</dc:creator>
    <dc:date>2012-04-17T14:05:56Z</dc:date>
    <item>
      <title>CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154888#M3901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm having a rather weird problem. Im orking on a project in a QB8 and when I add any extra line of code in a specific function the compiles generates bad code for another function that has nothing to do with the first one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I leave the first function ( void main_task(void) ) whithout any extra code, the right code for the affected one is:&lt;/P&gt;&lt;P&gt;&lt;A href="http://img3.imageshack.us/img3/3191/correctasm.png"&gt;&lt;IMG alt="Correct ASM" border="0" height="105" src="http://img3.imageshack.us/img3/3191/correctasm.png" width="330" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I add the line "battState = CHARGE_ERROR" to "&lt;SPAN&gt;&amp;nbsp;void main_task(void)&lt;/SPAN&gt;" the compiler now generates code that makes the CPU fly into another reality:&lt;/P&gt;&lt;P&gt;&lt;A href="http://img72.imageshack.us/img72/3286/incorrectasm.png"&gt;&lt;IMG border="0" height="138" src="http://img72.imageshack.us/img72/3286/incorrectasm.png" width="373" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If instead I add the line "msecTimerExample = 1;" now I got:&lt;/P&gt;&lt;P&gt;&lt;A href="http://img31.imageshack.us/img31/356/incorrectasm2.png"&gt;&lt;IMG border="0" height="107" src="http://img31.imageshack.us/img31/356/incorrectasm2.png" width="386" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont know whats happening, the copiler is messing things up. this is a very weird bug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any advice?&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>Tue, 17 Apr 2012 11:20:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154888#M3901</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T11:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154889#M3902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To confirm this bug, I took the a badly compiled *.s19 file, and replaced the incorrect compiled machine code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#888888" size="3"&gt;&lt;STRONG&gt;93535292965657&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to the correct machine code:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="3"&gt;960109C700B781&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using a nice *.s19 record editor which recalculates the line checksums.&lt;/P&gt;&lt;P&gt;&lt;IMG border="0" height="768" src="http://img252.imageshack.us/img252/5907/binarycorrection.png" width="912" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then I burned the patched *.S19 to the QB8 and it works! code runs good ! Even that specific part of the code which is a tiny Modbus Slave Stack !&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Too bad I can't move on with my code if I cannot get to resolve this issue, please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 11:56:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154889#M3902</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T11:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154890#M3903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, that looks weired. What you show is the thing on the target (or in the S19 file). It would be good to see if the problem is in the compiler or in the linker.&lt;/P&gt;&lt;P&gt;Could you try to disassemble that function/module (right click on the source and select 'disassemble').&lt;/P&gt;&lt;P&gt;This will show the code produced by the compiler.&lt;/P&gt;&lt;P&gt;I'm wondering if at this stage it already looks that weired.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:10:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154890#M3903</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-04-17T13:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154891#M3904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What I show is in the fist post is in the target, in the second post is a screenshot of the editor where I edited the S19 file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Clicking disassemble shows me the correct machine code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Decoder V-5.0.27 Build 11346, Dec 13 2011&lt;BR /&gt;Options: -ArgFilemodbusSlave.args -Env"GENPATH=C:/Users/Carlos/workspace/CC-BAT12-G2_QB8_v1.0/Project_Headers;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/device/src;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/lib;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/src;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/device/include;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/include;C:\Freescale\CW MCU v10.2\eclipse\../MCU/lib/hc08c/device/asm_include;C:/Users/Carlos/workspace/CC-BAT12-G2_QB8_v1.0/Generated_Code;C:/Users/Carlos/workspace/CC-BAT12-G2_QB8_v1.0/Sources;C:\Users\Carlos\workspace\CC-BAT12-G2_QB8_v1.0\Sources\components" -EnvOBJPATH=. -EnvTEXTPATH=. -OmodbusSlave.lst -ViewHidden -WmsgFob"%f%e:%l:%k:%d %m\n"&lt;BR /&gt;Decoding File: 'C:\Users\Carlos\workspace\CC-BAT12-G2_QB8_v1.0\Sources\components\modbusSlave.obj'&lt;BR /&gt;File format: ELF/DWARF&lt;/P&gt;&lt;P&gt;DISASSEMBLY OF: '.text' FROM 1572 TO 2018 SIZE 446 (0X1BE)&lt;BR /&gt;Opening source file 'C:\Users\Carlos\workspace\CC-BAT12-G2_QB8_v1.0\Sources\components\modbusSlave.c'&lt;BR /&gt;36: void modbusSlave_setReadRegisters(uint16 const * const registers[], uint8 length)&lt;BR /&gt;modbusSlave_setReadRegisters:&lt;BR /&gt;00000000 960000 STHX readRegisters&lt;BR /&gt;39: readRegistersLen = length;&lt;BR /&gt;00000003 C70000 STA readRegistersLen&lt;BR /&gt;40: }&lt;BR /&gt;00000006 81 RTS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's weird that output file and flashed binaries later become erroneous.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:29:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154891#M3904</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T13:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154892#M3905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Function in question is very simple, hence only needs 7 Bytes of flash:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;void modbusSlave_setReadRegisters(uint16 const * const registers[], uint8 length)&lt;BR /&gt;{&lt;BR /&gt;readRegisters = registers;&lt;BR /&gt;readRegistersLen = length;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I wonder from where does CW takes 0x93535292965657 and replaces the correct machine code: 0x960109C700B781&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:35:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154892#M3905</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T13:35:37Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154893#M3906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Found bug, is the USBDM Eclipse plugin.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When writing to the target, it writes to 0xE31A the contents that should be in 0xF31A,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Interestingly, the *.S19 is 11,004 bytes when not having the extra line and flashes OK,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Adding the lines results in a filesize of 11,000 (guess due optimizations?) and is when flashes badly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 13:53:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154893#M3906</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T13:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154894#M3907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it is the USBDM (to clarify, not the P&amp;amp;E OSBDM)? Can you try it with a P&amp;amp;E cable (if you have one)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:05:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154894#M3907</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-04-17T14:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154895#M3908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes PGO's USBDM v4.9.3 Eclipse's Plugin, I've just installed USBDM v4.9.4b along with Eclipse's plugin and problem is solved. &amp;nbsp;I have a P&amp;amp;E cable but is forgotten somewhere in here &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem was that when flashing within Eclipse, several bytes starting from adress&amp;nbsp;&lt;SPAN&gt;0xF31A were written into&amp;nbsp;&lt;SPAN&gt;0xE31A, thats just the least significant bit of the high adress byte being swapped from 0 to 1, anyway, this USBDM bug was happeining just when adding more code, don't really know what is really triggering it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;Sorry for the false alarm, whats should I change the thread subject to? I don't want to raise false ideas.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:19:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154895#M3908</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T14:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154896#M3909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the moderator will take care (if necessary at all).&lt;/P&gt;&lt;P&gt;What counts is that the problem is solved :smileyhappy:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:29:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154896#M3909</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2012-04-17T14:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: CW v10.2 Win7 64-bit Compilation Bug</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154897#M3910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, thanks. I don't want to scare anyone from a tremendous false bug, the first post could really scare people that don't want to migrate to CW v10, As that Eclipse View (Dissassembly in my Debugger Perspective) gets the flash data via BDM from the target, not from the local files &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt; nice detail ! At least we've learned something else!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And in the second post I was modifying the flash data for a const lookup table which is accessed rarely and I didn't detect any flaw haha!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 14:39:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/CW-v10-2-Win7-64-bit-Compilation-Bug/m-p/154897#M3910</guid>
      <dc:creator>carloscuev</dc:creator>
      <dc:date>2012-04-17T14:39:22Z</dc:date>
    </item>
  </channel>
</rss>

