<?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>Kinetis Software Development KitのトピックRe: KSDK memory footprint on KL15Z128</title>
    <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464506#M3511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sure, you can use different optimization levels for libraries and for your project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of GCC, please take a look at &lt;A href="http://mcuoneclipse.com/2012/10/02/forcingchecking-kinetis-compiler-optimization-level/" title="http://mcuoneclipse.com/2012/10/02/forcingchecking-kinetis-compiler-optimization-level/"&gt;Forcing/Checking Kinetis Compiler Optimization Level | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;also helpful for you could be &lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html" title="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html"&gt;Optimize Options - Using the GNU Compiler Collection (GCC)&lt;/A&gt; which describes all optimization flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Iva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Jan 2016 13:35:11 GMT</pubDate>
    <dc:creator>ivadorazinova</dc:creator>
    <dc:date>2016-01-05T13:35:11Z</dc:date>
    <item>
      <title>KSDK memory footprint on KL15Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464502#M3507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a working project written under KDS2.0, PE and MQX Lite.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to migrate it to KSDK1.3, KDS3.0 and MQX Lite - trying to get ready for a KW processor.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, when using the Freescale OS abstraction layer and associated drivers, my project no longer fits into the RAM and ROM on the device (it did when I used KDS2.0, PE and MQXLite).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to reduce the memory footprint (code and RAM) of code generated by KSDK3.0?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other ideas?&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Dec 2015 18:07:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464502#M3507</guid>
      <dc:creator>noamziv</dc:creator>
      <dc:date>2015-12-06T18:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK memory footprint on KL15Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464503#M3508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please try to do &lt;STRONG&gt;Optimization&lt;/STRONG&gt; separately for your project and libraries.&lt;/P&gt;&lt;P&gt;You can look here, &lt;A href="http://cache.nxp.com/files/microcontrollers/doc/user_guide/KDSUG.pdf" rel="nofollow noopener noreferrer noopener noreferrer" target="_blank" title="http://cache.nxp.com/files/microcontrollers/doc/user_guide/KDSUG.pdf"&gt;http://cache.nxp.com/files/microcontrollers/doc/user_guide/KDSUG.pdf&lt;/A&gt; page 44&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P data-canvas-width="36.690000000000005" style="font-size: 15px; font-family: sans-serif;"&gt;Specify the optimizations that you want the compiler to apply to the generated object code:&lt;/P&gt;&lt;P data-canvas-width="539.6100000000001" style="font-size: 15px; font-family: sans-serif;"&gt;• &lt;STRONG&gt;None (-O0)&lt;/STRONG&gt; - Disable optimizations. This setting is equivalent to specifying the -&lt;/P&gt;&lt;P data-canvas-width="531.855" style="font-size: 15px; font-family: sans-serif;"&gt;O0 command-line option. The compiler generates unoptimized, linear assembly-&lt;/P&gt;&lt;P data-canvas-width="102.57" style="font-size: 15px; font-family: sans-serif;"&gt;language code.&lt;/P&gt;&lt;P data-canvas-width="513.7500000000002" style="font-size: 15px; font-family: sans-serif;"&gt;• &lt;STRONG&gt;Optimize (-O1)&lt;/STRONG&gt; - The compiler performs all target-independent (that is, non-&lt;/P&gt;&lt;P data-canvas-width="529.38" style="font-size: 15px; font-family: sans-serif;"&gt;parallelized) optimizations, such as function inlining. This setting is equivalent to&lt;/P&gt;&lt;P data-canvas-width="516.0000000000001" style="font-size: 15px; font-family: sans-serif;"&gt;specifying the -O1 command-line option. The compiler omits all target-specific&lt;/P&gt;&lt;P data-canvas-width="403.5149999999999" style="font-size: 15px; font-family: sans-serif;"&gt;optimizations and generates linear assembly-language code.&lt;/P&gt;&lt;P data-canvas-width="464.5199999999999" style="font-size: 15px; font-family: sans-serif;"&gt;• &lt;STRONG&gt;Optimize more (-O2)&lt;/STRONG&gt; - The compiler performs all optimizations (both&lt;/P&gt;&lt;P data-canvas-width="512.745" style="font-size: 15px; font-family: sans-serif;"&gt;targetindependent and target-specific). This setting is equivalent to specifying&lt;/P&gt;&lt;P data-canvas-width="489.3600000000001" style="font-size: 15px; font-family: sans-serif;"&gt;the -O2 command-line option. The compiler outputs optimized, non-linear,&lt;/P&gt;&lt;P data-canvas-width="250.93500000000003" style="font-size: 15px; font-family: sans-serif;"&gt;parallelized assembly-language code.&lt;/P&gt;&lt;P data-canvas-width="534.5700000000002" style="font-size: 15px; font-family: sans-serif;"&gt;• &lt;STRONG&gt;Optimize most (-O3)&lt;/STRONG&gt; - The compiler performs all the level 2 optimizations, then&lt;/P&gt;&lt;P data-canvas-width="529.3200000000002" style="font-size: 15px; font-family: sans-serif;"&gt;the low-level optimizer performs global-algorithm register allocation. This setting&lt;/P&gt;&lt;P data-canvas-width="533.6100000000004" style="font-size: 15px; font-family: sans-serif;"&gt;is equivalent to specifying the that is usually faster than the code generated from&lt;/P&gt;&lt;P data-canvas-width="139.21499999999997" style="font-size: 15px; font-family: sans-serif;"&gt;level 2 optimizations.&lt;/P&gt;&lt;P data-canvas-width="497.0700000000001" style="font-size: 15px; font-family: sans-serif;"&gt;• &lt;STRONG&gt;Optimize size (-Os)&lt;/STRONG&gt; - The compiler optimizes object code at the specified&lt;/P&gt;&lt;P data-canvas-width="512.715" style="font-size: 15px; font-family: sans-serif;"&gt;Optimization Level such that the resulting binary file has a smaller executable&lt;/P&gt;&lt;P data-canvas-width="522.7800000000002" style="font-size: 15px; font-family: sans-serif;"&gt;code size, as opposed to a faster execution speed. This setting is equivalent to&lt;/P&gt;&lt;P data-canvas-width="267.59999999999997" style="font-size: 15px; font-family: sans-serif;"&gt;specifying the -Os command-line option.&lt;/P&gt;&lt;P data-canvas-width="499.60500000000013" style="font-size: 15px; font-family: sans-serif;"&gt;• Optimize for debugging (-Og) - The compiler optimizes object code at the&lt;/P&gt;&lt;P data-canvas-width="488.5500000000001" style="font-size: 15px; font-family: sans-serif;"&gt;specified Optimization Level such that the resulting binary file has a faster&lt;/P&gt;&lt;P data-canvas-width="425.21999999999986" style="font-size: 15px; font-family: sans-serif;"&gt;execution speed, as opposed to a smaller executable code size.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="usb.png"&gt;&lt;IMG alt="usb.png" src="https://community.nxp.com/t5/image/serverpage/image-id/58272iBBAFCFA5883B1584/image-size/large?v=v2&amp;amp;px=999" title="usb.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;After doing that you can print size of the project&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="usb_.png"&gt;&lt;IMG alt="usb_.png" src="https://community.nxp.com/t5/image/serverpage/image-id/58287iC9E447AA73A71F46/image-size/large?v=v2&amp;amp;px=999" title="usb_.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="usb__.png"&gt;&lt;IMG alt="usb__.png" src="https://community.nxp.com/t5/image/serverpage/image-id/58303i91CC88243C923DE7/image-size/large?v=v2&amp;amp;px=999" title="usb__.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my case - I did Optimization for the KSDK demo without optimization &lt;STRONG&gt;None (-O0)&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;before optimization there was result&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="result1.png"&gt;&lt;IMG alt="result1.png" src="https://community.nxp.com/t5/image/serverpage/image-id/58321iC55802781FB12BF0/image-size/large?v=v2&amp;amp;px=999" title="result1.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and after setting optimization for all libraries (building as well) and project with option &lt;STRONG&gt;Optimize size (-Os)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;there was this result&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper" image-alt="result2.png"&gt;&lt;IMG alt="result2.png" src="https://community.nxp.com/t5/image/serverpage/image-id/58352i58489C0F437F5A87/image-size/large?v=v2&amp;amp;px=999" title="result2.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="danger" __jive_macro_name="alert" alert="danger" class="jive_text_macro jive_macro_alert" data-renderedposition="2097.5_8_1231_43"&gt;&lt;STRONG&gt;Be careful and consistently test the functionality of your code&lt;/STRONG&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Nov 2020 13:24:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464503#M3508</guid>
      <dc:creator>ivadorazinova</dc:creator>
      <dc:date>2020-11-02T13:24:03Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK memory footprint on KL15Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464504#M3509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Noam:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides of Iva's good suggestion about optimization, please also check that you add the &lt;STRONG&gt;NDEBUG&lt;/STRONG&gt; macro. See this discussion:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/thread/380058"&gt;Size Project with Processor Expert&lt;/A&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;Jorge Gonzalez&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Dec 2015 21:26:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464504#M3509</guid>
      <dc:creator>Jorge_Gonzalez</dc:creator>
      <dc:date>2015-12-08T21:26:48Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK memory footprint on KL15Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464505#M3510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jorge and Iva,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adding NDEBUG did the trick.&amp;nbsp; I'm back to porting.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as optimization goes:&lt;/P&gt;&lt;P&gt;Is it possible to use different optimization levels for KDSK/libraries generated code and my code?&lt;/P&gt;&lt;P&gt;if so, how would I do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you SO MUCH for your quick and helpful responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Noam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Dec 2015 00:57:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464505#M3510</guid>
      <dc:creator>noamziv</dc:creator>
      <dc:date>2015-12-09T00:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: KSDK memory footprint on KL15Z128</title>
      <link>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464506#M3511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noam,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sure, you can use different optimization levels for libraries and for your project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case of GCC, please take a look at &lt;A href="http://mcuoneclipse.com/2012/10/02/forcingchecking-kinetis-compiler-optimization-level/" title="http://mcuoneclipse.com/2012/10/02/forcingchecking-kinetis-compiler-optimization-level/"&gt;Forcing/Checking Kinetis Compiler Optimization Level | MCU on Eclipse&lt;/A&gt; &lt;/P&gt;&lt;P&gt;also helpful for you could be &lt;A href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html" title="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html"&gt;Optimize Options - Using the GNU Compiler Collection (GCC)&lt;/A&gt; which describes all optimization flags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Iva&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Jan 2016 13:35:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Software-Development-Kit/KSDK-memory-footprint-on-KL15Z128/m-p/464506#M3511</guid>
      <dc:creator>ivadorazinova</dc:creator>
      <dc:date>2016-01-05T13:35:11Z</dc:date>
    </item>
  </channel>
</rss>

