<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Understanding what&#x27;s in a binary &#x2F; reducing memory footprint]]></title><description><![CDATA[<p dir="auto">While developing M5ez the memory usage jumped up at a few points without me properly understanding why. Can anyone point me to tools to better understand what's in my binary and possibly how to make it smaller?</p>
]]></description><link>https://community.m5stack.com/topic/267/understanding-what-s-in-a-binary-reducing-memory-footprint</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 10:39:48 GMT</lastBuildDate><atom:link href="https://community.m5stack.com/topic/267.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Jul 2018 14:28:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Understanding what&#x27;s in a binary &#x2F; reducing memory footprint on Tue, 24 Jul 2018 07:47:00 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/calin" aria-label="Profile: Calin">@<bdi>Calin</bdi></a> Thanks!</p>
<p dir="auto">I tried PlatformIO and didn't like it, maybe I should have tried longer. But if you're making something to be this easy to use, the Arduino IDE is where the users are, so I would always create for it as the primary way for people to use it.</p>
<p dir="auto">I know the JPGs take up space in flash (but 1 byte per byte, not more than they need, right?) I'd also like to know what the space in the compiled image is used for, can you also list that? There were some weird jumps in how big the image got while I was developing.</p>
]]></description><link>https://community.m5stack.com/post/1313</link><guid isPermaLink="true">https://community.m5stack.com/post/1313</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Tue, 24 Jul 2018 07:47:00 GMT</pubDate></item><item><title><![CDATA[Reply to Understanding what&#x27;s in a binary &#x2F; reducing memory footprint on Tue, 24 Jul 2018 00:21:40 GMT]]></title><description><![CDATA[<ul>
<li>The images  stored as array, take considerable space on the project.</li>
<li>I recommend you to switch to PlatformIO for development.<br />
That IDE will give you a better look over the code objects and tier size. Just check the ".pioenvs" folder on the project.<br />
You can easy convert the code from PlatformIO for Arduino "IDE" .ino if you want to.</li>
<li>avoid using "main" keyword on your code. Beginners may misunderstand that coding practice.</li>
<li>avoid using preprocesor for class instances. Use "M5.Lcd.xxxx" instead "m5.lcd.xxxx".<br />
In some cases, it can save some ram this way (i know... is weird).</li>
</ul>
<p dir="auto">The list of components running on demo project is long... and you don't have control on all of them.<br />
Most of them are from the framework. Arduino on its own is a memory hog:</p>
<p dir="auto"><img src="/assets/uploads/files/1532386070024-components.png" alt="0_1532386067661_components.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">The ez on itself don't use that much memory.<br />
Here are the ez members that always reside in ram:</p>
<p dir="auto"><img src="/assets/uploads/files/1532386094762-esobj.png" alt="0_1532386095560_esobj.PNG" class=" img-fluid img-markdown" /></p>
<p dir="auto">Beside those, there are M5 members, tft_eSPI members, Wifi members (that take a lot of space) and so on...<br />
Those are the components with the most memory usage.</p>
<p dir="auto">Here is a dependency graph for the demo project:</p>
<p dir="auto"><img src="/assets/uploads/files/1532389984067-deps.png" alt="0_1532389982950_deps.PNG" class=" img-fluid img-markdown" /></p>
]]></description><link>https://community.m5stack.com/post/1311</link><guid isPermaLink="true">https://community.m5stack.com/post/1311</guid><dc:creator><![CDATA[Calin]]></dc:creator><pubDate>Tue, 24 Jul 2018 00:21:40 GMT</pubDate></item><item><title><![CDATA[Reply to Understanding what&#x27;s in a binary &#x2F; reducing memory footprint on Mon, 23 Jul 2018 17:35:18 GMT]]></title><description><![CDATA[<p dir="auto">Yes please... I'd love to know what the memory footprint of M5ez, let's say when running the demo program, is made of.</p>
]]></description><link>https://community.m5stack.com/post/1309</link><guid isPermaLink="true">https://community.m5stack.com/post/1309</guid><dc:creator><![CDATA[Rop]]></dc:creator><pubDate>Mon, 23 Jul 2018 17:35:18 GMT</pubDate></item><item><title><![CDATA[Reply to Understanding what&#x27;s in a binary &#x2F; reducing memory footprint on Mon, 23 Jul 2018 16:44:59 GMT]]></title><description><![CDATA[<p dir="auto">I can use a debugger on your code to see what's using the memory...<br />
You can't use a jtag on M5Stack but you can make a setup similar to M5Stack and you can debug the code on that one.</p>
]]></description><link>https://community.m5stack.com/post/1307</link><guid isPermaLink="true">https://community.m5stack.com/post/1307</guid><dc:creator><![CDATA[Calin]]></dc:creator><pubDate>Mon, 23 Jul 2018 16:44:59 GMT</pubDate></item></channel></rss>