<?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: Debugger won't allow breakpoint</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300009#M20583</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ability to place breakpoints can be affected by the optimisation level applied.&amp;nbsp; The HCS08 Compiler will often factor common portions of code which can make placing a breakpoint impossible.&amp;nbsp; In your case it may have factored lines&amp;nbsp; 26/27 and lines 32/33 so cannot set an breakpoint at those lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking the optimisation level and reducing it may be worth trying.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 26 Apr 2014 14:06:23 GMT</pubDate>
    <dc:creator>pgo</dc:creator>
    <dc:date>2014-04-26T14:06:23Z</dc:date>
    <item>
      <title>Debugger won't allow breakpoint</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300007#M20581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I try to set a breakpoint at a certain section of code, the debugger replies with&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Breakpoint could not be set at line 26, moved to line 29."&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This happens only at lines 26 and 27.&amp;nbsp; Any other locations are just fine, and work properly.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the PE USB Multilink, with an MC9S08DZ60.&amp;nbsp; I was having this problem this morning, so I updated CodeWarrior, but it still happens.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied the entire .c file into this post, and typed a red note after each of the two lines that are giving me trouble.&amp;nbsp; I know some of the code might look a little redundant; I've pared it down quite a bit to try and isolate a problem detecting phase currents, and then I ran into the present issue.&amp;nbsp; Any help would be much appreciated.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;#include "derivative.h"&lt;BR /&gt;#include "timers.h"&lt;/P&gt;&lt;P&gt;unsigned int pwmCounter;&lt;BR /&gt;unsigned int delayCounter;&lt;BR /&gt;unsigned int lowCount = 100;&lt;BR /&gt;unsigned int offCount = 5000;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;interrupt 11 void tpm1OvfIsr(void)&lt;BR /&gt;{&lt;BR /&gt; if (pwmCounter &amp;lt; offCount)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; pwmCounter++;&lt;BR /&gt;/*&amp;nbsp; if ((ADCSC1 &amp;amp;&amp;amp; 0x80) != 0)//Check to see if COCO is set&lt;BR /&gt;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (ADCRL &amp;gt;= 13)// 1.28 counts/A&lt;BR /&gt;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PTDD &amp;amp;= ~0x08;//Turn off Phase A&lt;BR /&gt;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;&amp;nbsp;&amp;nbsp; ADCSC1 = 0x20;//Start continuous conversion on Phase A&lt;BR /&gt;&amp;nbsp; }*/&lt;BR /&gt; }&lt;BR /&gt; if (pwmCounter == lowCount)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; PTDD &amp;amp;= ~0x0C;//Turn off D2, D3 (Phases A, B)&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;THIS IS LINE 26&lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp; ADCSC1 = 0x00;//Turn off ADC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;...AND THIS IS LINE 27&lt;/SPAN&gt;&lt;BR /&gt; }&lt;BR /&gt; if (pwmCounter == offCount)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; pwmCounter++;&lt;BR /&gt;&amp;nbsp; PTDD &amp;amp;= ~0x0C;//Turn off D2, D3 (Phases A, B)&lt;BR /&gt;&amp;nbsp; ADCSC1 = 0x00;//Turn off ADC&lt;BR /&gt; }&lt;BR /&gt; TPM1SC &amp;amp;= ~0x80;//Clear OVF Flag&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;interrupt 14 void tpm2OvfIsr(void)&lt;BR /&gt;{&lt;BR /&gt; if (delayCounter &amp;lt; 5000)&lt;BR /&gt; {&lt;BR /&gt;&amp;nbsp; delayCounter++;&lt;BR /&gt; }&lt;BR /&gt; TPM2SC &amp;amp;= ~0x80;//Clear OVF Flag&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void initTimers(void)&lt;BR /&gt;{&lt;BR /&gt;//Timer 1 - 1kHz&lt;BR /&gt; pwmCounter = 0;&lt;BR /&gt; &lt;BR /&gt; TPM1MODH = 0x06;//ModH and ModL set the timer period&lt;BR /&gt; TPM1MODL = 0x40;//An 8MHz clock divided by $0640 gives a 5kHz frequency&lt;BR /&gt; &lt;BR /&gt; TPM2MODH = 0x1F;//ModH and ModL set the timer period&lt;BR /&gt; TPM2MODL = 0x40;//An 8MHz clock divided by $1F40 gives a 1kHz frequency&lt;BR /&gt;&amp;nbsp; &lt;BR /&gt;/* TPM1C0SC = 0x28;//Set MSnB and ELSnB, for edge-aligned, high-true PWM operation&lt;BR /&gt; TPM1C0VH = 0x00;//Sets the duty cycle for Channel 0&lt;BR /&gt; TPM1C0VL = 0x00;//0%&lt;BR /&gt; &lt;BR /&gt; TPM1C1SC = 0x28;//Same for channel 1&lt;BR /&gt; TPM1C1VH = 0x00;&lt;BR /&gt; TPM1C1VL = 0x00;*/&lt;/P&gt;&lt;P&gt; TPM1SC = 0x48;//Set TOIE and CLKSA, for interrupts enabled and bus clock source&lt;BR /&gt; TPM2SC = 0x48;//Set TOIE and CLKSA, for interrupts enabled and bus clock source&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Apr 2014 17:52:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300007#M20581</guid>
      <dc:creator>meiermat</dc:creator>
      <dc:date>2014-04-18T17:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't allow breakpoint</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300008#M20582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without knowing anything about your compiler, have you tried removing the //-comments?&lt;/P&gt;&lt;P&gt;Maybe your compiler doesn't like mixing /* -comments and //-comments...&lt;/P&gt;&lt;P&gt;The error you are getting is usually given in situations were you are trying to put a breakpoint in non-reachable code.&lt;/P&gt;&lt;P&gt;Instead the breakpoint is set in the next "acrtive" codeline. The unreachable code is typically:&lt;/P&gt;&lt;P&gt;1) Commented out&lt;/P&gt;&lt;P&gt;2) #if-ed out&lt;/P&gt;&lt;P&gt;3) Outside any function (due to braces mismatch&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Apr 2014 16:37:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300008#M20582</guid>
      <dc:creator>juhaaaltonen</dc:creator>
      <dc:date>2014-04-22T16:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't allow breakpoint</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300009#M20583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ability to place breakpoints can be affected by the optimisation level applied.&amp;nbsp; The HCS08 Compiler will often factor common portions of code which can make placing a breakpoint impossible.&amp;nbsp; In your case it may have factored lines&amp;nbsp; 26/27 and lines 32/33 so cannot set an breakpoint at those lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Checking the optimisation level and reducing it may be worth trying.,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;bye&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 26 Apr 2014 14:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300009#M20583</guid>
      <dc:creator>pgo</dc:creator>
      <dc:date>2014-04-26T14:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Debugger won't allow breakpoint</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300010#M20584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right!&amp;nbsp; I always forget about the compiler when I'm writing in C.&amp;nbsp; So stupid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a million.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 14:00:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Debugger-won-t-allow-breakpoint/m-p/300010#M20584</guid>
      <dc:creator>meiermat</dc:creator>
      <dc:date>2014-05-08T14:00:52Z</dc:date>
    </item>
  </channel>
</rss>

