<?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: Code functions differently in debug mode versus flash release - how do I find out why? in CodeWarrior for MCU</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Code-functions-differently-in-debug-mode-versus-flash-release/m-p/441781#M11969</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's see Debug and Release in the Desktop case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Desktop World, ‘Debug’ and ‘Release’ builds have following typical meaning:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Debug builds have debugging and symbolic information included. The compiler is not optimizing to make debugging ‘easier’.&lt;/LI&gt;&lt;LI&gt;Release builds have the debugging and symbolic information (Dwarf in ELF/Dwarf files) stripped off. Optimizations are enabled for best performance or code density.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, debug and release mode is the same in CW10. in a MQX project, the difference between debug mode and release mode is optimization level setting.&lt;/P&gt;&lt;P&gt;In debug mode: optimization level is 1.&lt;/P&gt;&lt;P&gt;In release mode: optimization level is 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also refer Erich blog for this topic&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" data-content-finding="Community" href="http://mcuoneclipse.com/2012/06/01/debug-vs-release/" rel="nofollow"&gt;http://mcuoneclipse.com/2012/06/01/debug-vs-release/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can this help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Zhang Jun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 Aug 2015 03:11:22 GMT</pubDate>
    <dc:creator>ZhangJennie</dc:creator>
    <dc:date>2015-08-17T03:11:22Z</dc:date>
    <item>
      <title>Code functions differently in debug mode versus flash release - how do I find out why?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Code-functions-differently-in-debug-mode-versus-flash-release/m-p/441780#M11968</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #333333; font-family: Georgia, 'Times New Roman', Times, serif; background-color: #fffef9;"&gt;I'm currently working on a program for an 8-bit freescale chip (MC9S08QG8) in CodeWarrior v10.3 which uses the timer/ period capture to turn a frequency to an analog voltage.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #333333; font-family: Georgia, 'Times New Roman', Times, serif; background-color: #fffef9;"&gt;I've gotten the thing to work pretty well in debug mode, but I noticed when I just flash the .abs file to the target to test the release build, it behaves as if the timer register is skewed. In other words, a 20ms period will normally turn on a DAC in debug mode (as intended). However, when the file is flashed directly, the DAC turns on at about 17.4ms. Ditto for other other cases; an event that's supposed to happen at 6.64ms happens at 5.75ms.&lt;/P&gt;&lt;P style="margin-bottom: 1em; font-size: 15px; color: #333333; font-family: Georgia, 'Times New Roman', Times, serif; background-color: #fffef9;"&gt;The code is interrupt-based - does anyone know what's different in debug vs direct flash that could cause this? Anything I can disable in debug mode to make it behave like a release build?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Aug 2015 18:27:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Code-functions-differently-in-debug-mode-versus-flash-release/m-p/441780#M11968</guid>
      <dc:creator>gearhead1107</dc:creator>
      <dc:date>2015-08-14T18:27:26Z</dc:date>
    </item>
    <item>
      <title>Re: Code functions differently in debug mode versus flash release - how do I find out why?</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Code-functions-differently-in-debug-mode-versus-flash-release/m-p/441781#M11969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's see Debug and Release in the Desktop case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Desktop World, ‘Debug’ and ‘Release’ builds have following typical meaning:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;Debug builds have debugging and symbolic information included. The compiler is not optimizing to make debugging ‘easier’.&lt;/LI&gt;&lt;LI&gt;Release builds have the debugging and symbolic information (Dwarf in ELF/Dwarf files) stripped off. Optimizations are enabled for best performance or code density.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By default, debug and release mode is the same in CW10. in a MQX project, the difference between debug mode and release mode is optimization level setting.&lt;/P&gt;&lt;P&gt;In debug mode: optimization level is 1.&lt;/P&gt;&lt;P&gt;In release mode: optimization level is 4. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also refer Erich blog for this topic&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" data-content-finding="Community" href="http://mcuoneclipse.com/2012/06/01/debug-vs-release/" rel="nofollow"&gt;http://mcuoneclipse.com/2012/06/01/debug-vs-release/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can this help?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Zhang Jun&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Aug 2015 03:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Code-functions-differently-in-debug-mode-versus-flash-release/m-p/441781#M11969</guid>
      <dc:creator>ZhangJennie</dc:creator>
      <dc:date>2015-08-17T03:11:22Z</dc:date>
    </item>
  </channel>
</rss>

