<?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: Changing size of compiled sketches</title>
		<link>http://forums.leaflabs.com/topic.php?id=696</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:18: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=696" rel="self" type="application/rss+xml" />

		<item>
			<title>mbolivar on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-4078</link>
			<pubDate>Mon, 28 Mar 2011 16:27:15 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">4078@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;gbulmer, Stephen,&#60;/p&#62;
&#60;p&#62;There will only be one version of libmaple.  Different boards are handled via the preprocessor.  If you try to e.g. use the DAC on a Maple, you'll get compile errors, as the DAC interface only exists when you compile for the Native.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-4074</link>
			<pubDate>Mon, 28 Mar 2011 11:12:57 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">4074@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;With limited time and resources I also believe the most reliable approach is for LeafLabs to develop a single &#60;code&#62;libmaple&#60;/code&#62;.&#60;/p&#62;
&#60;p&#62;I asked the question partly out of curiosity.  I was afraid the answer might be yes!&#60;/p&#62;
&#60;p&#62;Last year when my Maple Rev 3 arrived I tried to #include &#34;string.h&#34;, but I was surprised by how much the compiled code grew in size.  I will try using sprintf() in my next test sketch.&#60;/p&#62;
&#60;p&#62;Thank!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>gbulmer on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-4023</link>
			<pubDate>Thu, 24 Mar 2011 16:05:10 +0000</pubDate>
			<dc:creator>gbulmer</dc:creator>
			<guid isPermaLink="false">4023@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;I would much prefer LeafLabs to deliver a single common libmaple, as much as practical.&#60;br /&#62;
IMHO it is an end user decision to use particlar facilities, and it is Leafabs task to try to avoid charging extra costs \invisibly and unpredictably.&#60;/p&#62;
&#60;p&#62;There are three reasons:&#60;br /&#62;
1. Development and testing effort is focused on one deliverable, not several.&#60;br /&#62;
2. Easier to migrate between boards.&#60;br /&#62;
3. Predictability - I'd hate to transfer a program from one board to another and get an unpredictable 'charge' for the same program simply because I used a different board. That just makes me nervous.&#60;/p&#62;
&#60;p&#62;Of course, some functionality won't work on every board, digital to analogue conversion for example, but that need not require a different version of libmaple code. It can be handled with a #if and a #error, or something, triggered by the board type.&#60;/p&#62;
&#60;p&#62;Some documentation or hints about functions and classes which consume significant resources would be helpful.&#60;/p&#62;
&#60;p&#62;AFAIK, there is no obstacle to using string handling like sprintf, sscanf now, to get better string formatting.&#60;/p&#62;
&#60;p&#62;A concern with having fancier versions of print is the potential implication that larger buffers need to be allocated. I'd like to have some choice over that. So I'd like fancier string formatting to be factored out of the core I/O. This could be into a separate class, or, as is currently available in sprintf and sscanf. I don't mind which, both are understandable.&#60;/p&#62;
&#60;p&#62;Maybe the C++ string class works too, I haven't checked.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-4013</link>
			<pubDate>Wed, 23 Mar 2011 14:02:47 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">4013@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;mbolivar, thanks for the quick explanation.&#60;/p&#62;
&#60;p&#62;I did the simple testing to investigate the size of compiled sketches, because a sketch which fits into RAM using the February 13, 2011 snapshot suddenly was too large to fit into RAM when tested using the recent March 17, 2011 snapshot.  I am glad the changes will be removed before the next IDE release.&#60;/p&#62;
&#60;p&#62;If the following question is too scary just put it at the bottom of the LeafLabs &#34;to do&#34; list.&#60;/p&#62;
&#60;p&#62;When LeafLabs is selling boards with different amounts of memory (eg. the Maple Native with more FLASH and SRAM) will you offer different versions of the &#60;code&#62;libmaple&#60;/code&#62; code which simplify programming for the end-user?  For example, on the Maple Native it might be nice to have access to improved string formatting.  The extra available memory will easily accommodate a larger Print class.  However, the smaller amount of memory on the Maple and Maple Native will make improved string formatting harder to fit into the Print class.  Does this make sense?&#60;/p&#62;
&#60;p&#62;Thanks again for your time!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>mbolivar on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-4010</link>
			<pubDate>Wed, 23 Mar 2011 12:16:30 +0000</pubDate>
			<dc:creator>mbolivar</dc:creator>
			<guid isPermaLink="false">4010@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hi Stephen,&#60;/p&#62;
&#60;p&#62;The latest snapshot size increases are due to internal usage of snprintf() to do string formatting in the Print class.&#60;/p&#62;
&#60;p&#62;I'll remove those changes before next release; they're too costly in Flash size to justify.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>StephenFromNYC on "Changing size of compiled sketches"</title>
			<link>http://forums.leaflabs.com/topic.php?id=696#post-3992</link>
			<pubDate>Tue, 22 Mar 2011 10:57:57 +0000</pubDate>
			<dc:creator>StephenFromNYC</dc:creator>
			<guid isPermaLink="false">3992@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello-&#60;/p&#62;
&#60;p&#62;I am surprised how much the size of compiled sketches varies using different releases of the Maple IDE.  Here is the sketch along with the sizes of the compiled sketches (created using a Windows XP SP3 system) included as comments:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
// Maple Rev 3 (Windows XP SP3)&#60;br /&#62;
//&#60;br /&#62;
// size of compiled file&#60;br /&#62;
//&#60;br /&#62;
// 11552 bytes using IDE 0.0.6 (RAM)&#60;br /&#62;
//  9552 bytes using IDE 0.0.7 (RAM)&#60;br /&#62;
// 11120 bytes using IDE 0.0.8 (RAM)&#60;br /&#62;
// 10832 bytes using IDE 0.0.9 (RAM)&#60;br /&#62;
// 10696 bytes using 2011-02-13 snapshot (RAM)&#60;br /&#62;
// 12504 bytes using 2011-03-17 snapshot (RAM)&#60;/p&#62;
&#60;p&#62;#include &#38;lt;string.h&#38;gt;&#60;/p&#62;
&#60;p&#62;void setup()&#60;br /&#62;
{&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void loop()&#60;br /&#62;
{&#60;br /&#62;
  delay(1000);&#60;/p&#62;
&#60;p&#62;  if (strcmp(&#34;hello&#34;, &#34;hello&#34;) == 0)&#60;br /&#62;
  {&#60;br /&#62;
    SerialUSB.println(&#34;hello matches&#34;);&#60;br /&#62;
  }&#60;br /&#62;
}
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Should I be surprised by this amount of variation?  A 20% decrease (going from 0.0.6 to 0.0.7) or a 20% increase (going from 0.0.9 to the 2011-03-17 snapshot) seems like a lot to me.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://forums.leaflabs.com/profile.php?id=843&#34;&#62;Stephen from NYC&#60;/a&#62; (full disclosure: I am not a member of the LeafLabs staff)
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
