<?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>LPCXpresso IDEのトピックRe: Stepping problem</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531829#M2702</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Andrew24 on Fri Mar 26 10:02:15 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the answer. I had the optimisations turned off when i tried this.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This code, for example works perfectly while stepping,and i can see the variable changing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]while[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](1) [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i++ ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (i==10)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I undeststand ,that if there is a some kind of optimisations, the compiler probably will see i++ as unnecesarry action and will skip it, but with -O0 it's strange..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 02:55:23 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T02:55:23Z</dc:date>
    <item>
      <title>Stepping problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531827#M2700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Andrew24 on Fri Mar 26 09:15:42 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;HI. I've bought LPC1343 eval board recently, and already gained some experience writing projects including ADC, timers etc..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but can't undestand simple thing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When i try to step through these lines using F5 or F6, the IDE freezes. Why? (If there is more complex code in the while loop, then everything's ok)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;int main(void) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; volatile unsigned int i = 0 ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; while(1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; i++ ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return 0 ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:55:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531827#M2700</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Stepping problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531828#M2701</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by wrighflyer on Fri Mar 26 09:33:26 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Andrew24&lt;/STRONG&gt;&lt;BR /&gt; the IDE freezes. Why? (If there is more complex code in the while loop, then everything's ok)&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Look at the generated Asm (I'll bet this ws built with something other than -O0). The compiler will have spotted that 'i' is never actually used for anything so won't have bothered to generate any code to modify it. (If you had assigned it to a volatile destination it would have had to modify it though the chances are it would optimize it into register only use and 'i' would never really exist even in that case). Without i the loop is simply "while(1)" - a statement that never ends - the generated code will simply be a "here: jump here" and the single step in the debugger will never come back from this because the statement never actually ends.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Welcome to the world of debugging optimised code. If this bothers you turn the optimiser off (-O0) and accept the truly awful code that the compiler then generates.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:55:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531828#M2701</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Stepping problem</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531829#M2702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Andrew24 on Fri Mar 26 10:02:15 MST 2010&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the answer. I had the optimisations turned off when i tried this.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This code, for example works perfectly while stepping,and i can see the variable changing:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2][LEFT][/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]while[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2](1) [/SIZE]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[SIZE=2]{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i++ ;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE][B][SIZE=2][COLOR=#7f0055][SIZE=2][COLOR=#7f0055]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if[/B][/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2] (i==10)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i=0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }[/LEFT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/SIZE] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I undeststand ,that if there is a some kind of optimisations, the compiler probably will see i++ as unnecesarry action and will skip it, but with -O0 it's strange..&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 02:55:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Stepping-problem/m-p/531829#M2702</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T02:55:23Z</dc:date>
    </item>
  </channel>
</rss>

