<?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>LPC MicrocontrollersのトピックRe: Hello</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584619#M21075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Thu May 14 03:06:36 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is i volatile?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcompiler-optimization" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 20:24:52 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T20:24:52Z</dc:date>
    <item>
      <title>Hello</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584617#M21073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by 010hnoor on Thu May 14 02:59:39 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using the free edition (v7.5.0 build254) and my baby steps at learning this stuff is working well when I do a debug build. However, when I change to release mode the behavior of my code change (verified with scope) and in the disassembler I can see lines of code missing (see attached). For example the following two lines of code are only compiled once, but used several times:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i = 2500;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;while(i) i--;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, in the attached screenshot lines 86, 92, and 99 (my "delays") are not in the disassembly. They are present in a debug build. Any help would be greatly appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:24:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584617#M21073</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hello</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584618#M21074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by lpcxpresso-support on Thu May 14 03:05:42 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;For an explanation of why your code is being removed, please read this FAQ&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcompiler-optimization" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Especially the section on "Optimized code fails to execute correctly".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution is to use "volatile" in your definition of i.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:24:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584618#M21074</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Hello</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584619#M21075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Thu May 14 03:06:36 MST 2015&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Is i volatile?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.lpcware.com%2Fcontent%2Ffaq%2Flpcxpresso%2Fcompiler-optimization" rel="nofollow" target="_blank"&gt;http://www.lpcware.com/content/faq/lpcxpresso/compiler-optimization&lt;/A&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:24:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hello/m-p/584619#M21075</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:24:52Z</dc:date>
    </item>
  </channel>
</rss>

