<?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: source level debugging with CW HC12 and S12XDP512 in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131619#M1187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm. I still dont exactly understand what you experience.&lt;BR /&gt;Basically you say everything goes as expected until you reach&lt;FONT face="Courier New"&gt;&lt;BR /&gt;" moduleTestMode = MODULE_TEST_MODE;"&lt;BR /&gt;Does that line generate 2 assembly instructions for you? When you are there and press F10, where do you end? After the first assembly instruction still inside of this statement? Then when you step on, you sooner or later do reach the JSR init_mcu (or CALL init_mcu), right? And then when you press F10, do you step inside init_mcp or to the next statement (as it should)?&lt;BR /&gt;When you enable the markes (right context menu over the source window) are they all at statement start positions as they should? Or is this is an issue about debugging in optimized code?&lt;BR /&gt;You said you could once step into&lt;/FONT&gt; &lt;FONT face="Courier New"&gt;init_mcu and now no longer. What does that mean, now you do not reach&lt;/FONT&gt; &lt;FONT face="Courier New"&gt;init_mcu anymore, you always step over it, or do you step into it but it does only do assembly steps?&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;The remark "Do the toolbar buttons behave better/different?"&lt;BR /&gt;was about if this is a keyboard thing or not. When you use the menu or the toolbar to step around, does it behave the same?&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;Anything else which is special in your setup? Can you reproduce it with a newly created project?&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Apr 2007 01:18:18 GMT</pubDate>
    <dc:creator>CompilerGuru</dc:creator>
    <dc:date>2007-04-26T01:18:18Z</dc:date>
    <item>
      <title>source level debugging with CW HC12 and S12XDP512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131616#M1184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN style=": ; font-size: 3; font-family: Arial;"&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I have a little problem with the codewarrior debugger. If I press F10 (step over) the debugger goes one line further on the assembler listing level, not the source level. This should be the case only if I press Ctrl+F10. Has anybody an idea, what the problem could be? At the moment I'm not able to debug on source code level.&lt;BR /&gt;&lt;BR /&gt;CW 30days evaluation version 5.7.0&lt;BR /&gt;Target: MC9S12XDP512 (I don't use XGATE)&lt;BR /&gt;P&amp;amp;E Multilink USB&lt;BR /&gt;&lt;BR /&gt;Thanks, Andy&lt;BR /&gt;&lt;BR /&gt;J2MEJediMaster added required&amp;nbsp; CW type and info to header&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;Message Edited by J2MEJediMaster on &lt;SPAN class="date_text"&gt;2007-04-24&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:06 AM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2007 21:03:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131616#M1184</guid>
      <dc:creator>Andi</dc:creator>
      <dc:date>2007-04-24T21:03:43Z</dc:date>
    </item>
    <item>
      <title>Re: source level debugging with CW HC12 and S12XDP512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131617#M1185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Does it everywhere behave like this, or just at some places?&lt;BR /&gt;You are stepping on plain C code? For (inline) assembly, source statements pretty much correspond to assembly instructions.&lt;BR /&gt;Do you have samples? Does it show the source code?&lt;BR /&gt;Do the toolbar buttons behave better/different?&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 01:13:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131617#M1185</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-04-25T01:13:39Z</dc:date>
    </item>
    <item>
      <title>Re: source level debugging with CW HC12 and S12XDP512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131618#M1186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi Daniel,&lt;BR /&gt;&lt;BR /&gt;When i press the reset button in the debugger, the cursor jumps to the first line of the following code (Cpu.c). These few lines of c-code I can step through with F10 on source code level (even though I think it's pretty much 1:1 to assembler).&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;/* ### MC9S12XDP512_112 "Cpu" init code ... */&lt;BR /&gt;&amp;nbsp;/*&amp;nbsp; PE initialization code after reset */&lt;BR /&gt;&amp;nbsp;/* ECLKCTL: NECLK=0,NCLKX2=1,??=0,??=0,??=0,??=0,EDIV1=0,EDIV0=0 */&lt;BR /&gt;&amp;nbsp;setReg8(ECLKCTL, 64);&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;&lt;BR /&gt;&amp;nbsp;/* MMCCTL1: ??=0,??=0,??=0,??=0,??=0,EROMON=0,ROMHM=0,ROMON=1 */&lt;BR /&gt;&amp;nbsp;setReg8(MMCCTL1, 1);&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;&lt;BR /&gt;&amp;nbsp;/* DIRECT: DP15=0,DP14=0,DP13=0,DP12=0,DP11=0,DP10=0,DP9=0,DP8=0 */&lt;BR /&gt;&amp;nbsp;setReg8(DIRECT, 0);&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;&lt;BR /&gt;&amp;nbsp;/* IVBR: IVB_ADDR=255 */&lt;BR /&gt;&amp;nbsp;setReg8(IVBR, 255);&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;&lt;BR /&gt;&amp;nbsp;/*&amp;nbsp; System clock initialization */&lt;BR /&gt;&amp;nbsp;/* CLKSEL: PLLSEL=0,PSTP=0,??=0,??=0,PLLWAI=0,??=0,RTIWAI=0,COPWAI=0 */&lt;BR /&gt;&amp;nbsp;setReg8(CLKSEL, 0);&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; /* Select clock source from XTAL and set bits in CLKSEL reg. */&lt;BR /&gt;&amp;nbsp;/* PLLCTL: CME=1,PLLON=0,AUTO=1,ACQ=1,FSTWKP=0,PRE=0,PCE=0,SCME=1 */&lt;BR /&gt;&amp;nbsp;setReg8(PLLCTL, 177);&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; /* Disable the PLL */&lt;BR /&gt;&amp;nbsp;/*** End of PE initialization code after reset ***/&lt;BR /&gt;&amp;nbsp;__asm("jmp _Startup");&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; /* Jump to C startup code */&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;/* initialize the stack pointer */&lt;BR /&gt;&amp;nbsp;&amp;nbsp;INIT_SP_FROM_STARTUP_DESC(); /*lint !e522 asm code */ /* HLI macro definition in hidef.h */&lt;BR /&gt;&lt;BR /&gt;#ifndef __ONLY_INIT_SP&lt;BR /&gt;&amp;nbsp;&amp;nbsp;Init(); /* zero out, copy down, call constructors */&lt;BR /&gt;#endif&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Here the main function is entered. The cursoer jumps to the line &lt;FONT face="Courier New"&gt;moduleTestMode = MODULE_TEST_MODE;&lt;/FONT&gt;&lt;BR /&gt;After this instruction I cannot go to init_mcu(); by pressing F10. It always goes line by line in the assembler code.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;void main(void)&amp;nbsp; // firmware&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;uInt08 moduleTestMode;&lt;BR /&gt;&amp;nbsp;uInt32 error;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;// modify the test mode here with the debugger&lt;BR /&gt;&amp;nbsp;moduleTestMode = MODULE_TEST_MODE;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;//Cpu_DisableInt();&lt;BR /&gt;&amp;nbsp;init_mcu();&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;Here the rest of the program code follows....&lt;BR /&gt;&lt;BR /&gt;Yes, it's plain c code, no inline.&lt;BR /&gt;All the source code is shown in the "Source" window on the left side and the assembler code is shown in a separate window on the right hand side.&lt;BR /&gt;&lt;BR /&gt;What do you mean by "Do the toolbar buttons behave better/different?"?&lt;BR /&gt;&lt;BR /&gt;The strange thing is that I could step into the init_mcu() function (initializes ports and other periphery) by F11 and then every single c code line by F10 as expected. This worked exactly once (the first time i started the debugger). Since then I tried to restart the computer, power cycle the target... several times - I'm not able to do it anymore!&lt;BR /&gt;&lt;BR /&gt;Andi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Apr 2007 14:36:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131618#M1186</guid>
      <dc:creator>Andi</dc:creator>
      <dc:date>2007-04-25T14:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: source level debugging with CW HC12 and S12XDP512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131619#M1187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm. I still dont exactly understand what you experience.&lt;BR /&gt;Basically you say everything goes as expected until you reach&lt;FONT face="Courier New"&gt;&lt;BR /&gt;" moduleTestMode = MODULE_TEST_MODE;"&lt;BR /&gt;Does that line generate 2 assembly instructions for you? When you are there and press F10, where do you end? After the first assembly instruction still inside of this statement? Then when you step on, you sooner or later do reach the JSR init_mcu (or CALL init_mcu), right? And then when you press F10, do you step inside init_mcp or to the next statement (as it should)?&lt;BR /&gt;When you enable the markes (right context menu over the source window) are they all at statement start positions as they should? Or is this is an issue about debugging in optimized code?&lt;BR /&gt;You said you could once step into&lt;/FONT&gt; &lt;FONT face="Courier New"&gt;init_mcu and now no longer. What does that mean, now you do not reach&lt;/FONT&gt; &lt;FONT face="Courier New"&gt;init_mcu anymore, you always step over it, or do you step into it but it does only do assembly steps?&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;The remark "Do the toolbar buttons behave better/different?"&lt;BR /&gt;was about if this is a keyboard thing or not. When you use the menu or the toolbar to step around, does it behave the same?&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;Anything else which is special in your setup? Can you reproduce it with a newly created project?&lt;BR /&gt;&lt;BR /&gt;Daniel&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Apr 2007 01:18:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131619#M1187</guid>
      <dc:creator>CompilerGuru</dc:creator>
      <dc:date>2007-04-26T01:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: source level debugging with CW HC12 and S12XDP512</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131620#M1188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;FONT face="Courier New"&gt;Hi Daniel,&lt;BR /&gt;&lt;BR /&gt;I tried again this morning, and couldn't reproduce it! I have no idea, why it didn't work last time. As far as I remember, last time I ended up in the Assembler code with a very large series of BGND commands - I couldn't get out of there anymore.&lt;BR /&gt;&lt;BR /&gt;Yes, the software always behaved the same if I pressed F10 or the Step Over menu button - no difference.&lt;BR /&gt;&lt;BR /&gt;Finally I found the optimization settings - no optimizations are set, so this shouldn't be the problem.&lt;BR /&gt;&lt;BR /&gt;Anyway, I can debug it now.&lt;BR /&gt;Thanks for your suggestions.&lt;BR /&gt;&lt;BR /&gt;Andi&lt;BR /&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Apr 2007 15:21:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/source-level-debugging-with-CW-HC12-and-S12XDP512/m-p/131620#M1188</guid>
      <dc:creator>Andi</dc:creator>
      <dc:date>2007-04-27T15:21:04Z</dc:date>
    </item>
  </channel>
</rss>

