<?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 Reducing RAM consumption on KL26Z with sensor fusion in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454824#M27082</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started developing with the sensor fusion library on a KL26Z, added just a portion of code but I am already hitting limits in terms of RAM usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By building the example project FSFK_KL26Z, I printed code size information and RAM occupation (data + bss) is 15616 bytes. But the KL26Z limit is 16kB of RAM so that does not leave much space for my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;'Invoking: Cross ARM GNU Print Size'&lt;/P&gt;&lt;P&gt;arm-none-eabi-size --format=berkeley -x --totals "FSFK_KL26Z.elf"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; text&amp;nbsp;&amp;nbsp; data&amp;nbsp;&amp;nbsp;&amp;nbsp; bss&amp;nbsp;&amp;nbsp;&amp;nbsp; dec&amp;nbsp;&amp;nbsp;&amp;nbsp; hex filename&lt;/P&gt;&lt;P&gt;0x1569c&amp;nbsp;&amp;nbsp; 0xa0 0x3c60 103324&amp;nbsp; 1939c FSFK_KL26Z.elf&lt;/P&gt;&lt;P&gt;0x1569c&amp;nbsp;&amp;nbsp; 0xa0 0x3c60 103324&amp;nbsp; 1939c (TOTALS)&lt;/P&gt;&lt;P&gt;'Finished building: FSFK_KL26Z.siz'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any compiler options I can select to drastically reduce RAM consumption ?&lt;/P&gt;&lt;P&gt;Or should I target another processor such as KL46Z instead ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Aug 2015 12:24:27 GMT</pubDate>
    <dc:creator>remibeges</dc:creator>
    <dc:date>2015-08-20T12:24:27Z</dc:date>
    <item>
      <title>Reducing RAM consumption on KL26Z with sensor fusion</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454824#M27082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I started developing with the sensor fusion library on a KL26Z, added just a portion of code but I am already hitting limits in terms of RAM usage.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By building the example project FSFK_KL26Z, I printed code size information and RAM occupation (data + bss) is 15616 bytes. But the KL26Z limit is 16kB of RAM so that does not leave much space for my application.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;'Invoking: Cross ARM GNU Print Size'&lt;/P&gt;&lt;P&gt;arm-none-eabi-size --format=berkeley -x --totals "FSFK_KL26Z.elf"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; text&amp;nbsp;&amp;nbsp; data&amp;nbsp;&amp;nbsp;&amp;nbsp; bss&amp;nbsp;&amp;nbsp;&amp;nbsp; dec&amp;nbsp;&amp;nbsp;&amp;nbsp; hex filename&lt;/P&gt;&lt;P&gt;0x1569c&amp;nbsp;&amp;nbsp; 0xa0 0x3c60 103324&amp;nbsp; 1939c FSFK_KL26Z.elf&lt;/P&gt;&lt;P&gt;0x1569c&amp;nbsp;&amp;nbsp; 0xa0 0x3c60 103324&amp;nbsp; 1939c (TOTALS)&lt;/P&gt;&lt;P&gt;'Finished building: FSFK_KL26Z.siz'&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there any compiler options I can select to drastically reduce RAM consumption ?&lt;/P&gt;&lt;P&gt;Or should I target another processor such as KL46Z instead ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 12:24:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454824#M27082</guid>
      <dc:creator>remibeges</dc:creator>
      <dc:date>2015-08-20T12:24:27Z</dc:date>
    </item>
    <item>
      <title>Re: Reducing RAM consumption on KL26Z with sensor fusion</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454825#M27083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;the question is: what is consuming your memory (more than expected I think)?&lt;/P&gt;&lt;P&gt;What about the heap and stack size allocated in the linker file?&lt;/P&gt;&lt;P&gt;Do you need the heap (or that size)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 12:49:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454825#M27083</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-08-20T12:49:23Z</dc:date>
    </item>
    <item>
      <title>Re: Reducing RAM consumption on KL26Z with sensor fusion</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454826#M27084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, I suppose the sensor fusion algorithms require a bit of RAM, but I need to check exactly how much. This RAM consumption may very well come from somewhere else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not very familiar on this topic yet, but so far I am not using dynamic allocation so heap size should be and is zero&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Generate a link error if heap and stack don't fit into RAM */&lt;BR /&gt;__heap_size = 0x00;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* required amount of heap&amp;nbsp; */&lt;BR /&gt;__stack_size = 0x0400;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* required amount of stack */&lt;/P&gt;&lt;P&gt;MEMORY {&lt;BR /&gt;&amp;nbsp; m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000000C0&lt;BR /&gt;&amp;nbsp; m_text&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX) : ORIGIN = 0x00000410, LENGTH = 0x0001FBF0&lt;BR /&gt;&amp;nbsp; m_data&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000&lt;BR /&gt;&amp;nbsp; m_cfmprotrom&amp;nbsp; (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I remember right, I saw on MCU on eclipse website that you can print specific ram consumption per function. I'll try that to investigate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 15:02:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454826#M27084</guid>
      <dc:creator>remibeges</dc:creator>
      <dc:date>2015-08-20T15:02:47Z</dc:date>
    </item>
    <item>
      <title>Re: Reducing RAM consumption on KL26Z with sensor fusion</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454827#M27085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1 kB (0x400) for the stack might be too much. But that will depend on what you do (e.g. printf() will need a lot of space).&lt;/P&gt;&lt;P&gt;The other thing: are you already using nano-lib? This one is optimized for (code) size.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise you can spot in the .map file (in the DEBUG folder, where the .elf is) the big usage of RAM? Probably some buffers of some size?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Aug 2015 16:24:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Reducing-RAM-consumption-on-KL26Z-with-sensor-fusion/m-p/454827#M27085</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2015-08-20T16:24:21Z</dc:date>
    </item>
  </channel>
</rss>

