<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: Trouble shooting program-size issues</title>
		<link>http://forums.leaflabs.com/topic.php?id=3147</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:23:48 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=3147" rel="self" type="application/rss+xml" />

		<item>
			<title>gbulmer on "Trouble shooting program-size issues"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3147#post-14092</link>
			<pubDate>Fri, 14 Sep 2012 18:18:32 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">14092@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;scott &#60;/p&#62;
&#60;p&#62;The .o files are combined with libraries to produce the .elf file. So the .elf contains everything.&#60;/p&#62;
&#60;p&#62;The thing that dictates the size of the program in memory is the size of the sections which contain the compiled code, initialised global/static variables and un-initialised global/static variables, which you can get using &#60;code&#62;arm-none-eabi-size&#60;/code&#62;,  and the amount of space the (automatic) variables on the stack take (which is harder to get).&#60;/p&#62;
&#60;p&#62;.o and elf files contain extra information which has very little bearing on the size of the program in memory.&#60;br /&#62;
So  the files are just containers for all sorts of stuff that doesn't make it into memory. Their size is related to the size of the program, but not well enough to use it to calculate the size of the in-memory program. &#60;/p&#62;
&#60;p&#62;You could decrease the size of the .o files or .elf file, yet the program in memory would be bigger.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>scott on "Trouble shooting program-size issues"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3147#post-13884</link>
			<pubDate>Thu, 13 Sep 2012 18:05:02 +0000</pubDate>
			<dc:creator>scott</dc:creator>
			<guid isPermaLink="false">13884@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Thanks - these are definitely helpful tools, that I'll look into. I guess I wasn't entirely clear in my original post though: what dictates the overall footprint? The elf file? The .o files? a combination of both? other stuff?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Trouble shooting program-size issues"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3147#post-13879</link>
			<pubDate>Thu, 13 Sep 2012 17:09:23 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">13879@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;scott - If you want to reduce the size of the code, try to get a reasonably accurate measurements:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;arm-none-eabi-size&#60;/code&#62; (buried in the distribution) will give the size of each section in object file, and can print the total&#60;br /&#62;
objdump will disassemble the object or elf file into the assembler instructions, along with the instruction offsets, so you'll be able to see exactly how big each function is.&#60;/p&#62;
&#60;p&#62;The documentation collection is called binutuils&#60;/p&#62;
&#60;p&#62;(Full disclosure: I am not a member of Leaflabs staff.)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>scott on "Trouble shooting program-size issues"</title>
			<link>http://forums.leaflabs.com/topic.php?id=3147#post-13878</link>
			<pubDate>Thu, 13 Sep 2012 16:44:45 +0000</pubDate>
			<dc:creator>scott</dc:creator>
			<guid isPermaLink="false">13878@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hey all,&#60;/p&#62;
&#60;p&#62;I don't have much of a background in compilers, so please excuse me.  I'm trying to compile a pretty bulky library (and subsequently work on reducing its footprint), and am getting this error:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;Compiling the sketch...
	Linking...
	Computing sketch size...

..Local\Temp\build28200270679527097.tmp\c21.cpp.bin  :
section    size   addr
.data   13000      0
Total   13000

Binary sketch size is reported above. Check it against a 108000 byte maximum.&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If I go to this folder, I see an elf file (327 kB in this case), a large number of .o files from the library, and my main code. What should I be looking at to determine the actual total program size? Is it the elf file (does this mean my application actually compiled OK, by the way?). Or do I need to look at the size of all the .o files? Or some combination? &#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
