<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 12/4/2012 8:29 AM, Luca Cinquepalmi
wrote:<br>
</div>
<blockquote cite="mid:50BE08D8.3090503@planetek.it" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">I don't understand your answer very
well... Can you give me more details?<br>
</div>
</blockquote>
<br>
Gedare is on the right track but missing a subtle point. <br>
<br>
As background, think of how ld works. You have a "main" and<br>
for each undefined symbol (e.g. symbol not in that .o), it tries<br>
to resolve it. It will look in libraries (e.g. .a files). When it
find<br>
a .o in that .a which has the ONE symbol you want, it pulls <br>
in that ENTIRE .o and then continues trying to resolve symbols<br>
but now it has to resolve all the references in that second .o <br>
as well.<br>
<br>
Without looking at code, the rtems++ code is a handful of<br>
.cc files. Most of RTEMS is only one method or very tightly<br>
related functionality per file. Each rtems++ .o file results in<br>
the entire functionality of a manager getting pulled into your<br>
executable.<br>
<br>
rtems++ needs to be a set of smaller .cc files which each wrap<br>
only one directive. This will eliminate a lot of your trouble.<br>
<br>
But Gedare is right in that if timer or interrupt prints --
especially<br>
using C++ methods -- then your object jumps up. printf() adds<br>
~20-30K to an executable. The C++ libraries to do this are likely <br>
even larger.<br>
<br>
Using nm look at the "U" or undefined symbols for each .o<br>
in rtems++. I think you will find a .o that has extremely<br>
"sticky fingers".<br>
<br>
A contribution to drop the application size impact of using<br>
rtems++ would be welcomed.<br>
<br>
<blockquote cite="mid:50BE08D8.3090503@planetek.it" type="cite">
<div class="moz-cite-prefix"> Thanks a lot!<br>
Luca<br>
<br>
On 12/04/2012 03:26 PM, Gedare Bloom wrote:<br>
</div>
<blockquote
cite="mid:CAC82fA1Ehha2LdMRDC6soNPY=T+K6hiupDVWDCXrH1LFdzTnGw@mail.gmail.com"
type="cite">Check if printf is getting included in the new image
and not in the old one. If for some reason those files pull in
printf that can be a lot of extra code.<br>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Tue, Dec 4, 2012 at 3:48 AM, Luca
Cinquepalmi <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:cinquepalmi@planetek.it" target="_blank">cinquepalmi@planetek.it</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Hi all, <br>
I'm trying to compile rtems C++ source code with rtems
provided class.<br>
I compile the following class without any problems:<br>
<br>
rtemsTask.cc<br>
rtemsSeamphore.cc<br>
rtemsMessageQueue.cc<br>
rtemsEvent.cc<br>
rtemsStatusCode.cc<br>
<br>
and the program perfectly works, but when I compile<br>
<br>
<b>rtemsInterrupt.cc</b> or <b>rtemsTimer.cc</b><br>
<br>
the code is well compiled, but it doubles its dimension
and <br>
doesn't work when loaded on my target board (LEON2).<br>
I'm using spar-rtems4.11-gcc as compiler.<br>
Did anyone have the same problem? Thanks!<span
class="HOEnZb"><font color="#888888"><br>
<br>
Luca<br>
</font></span></div>
<br>
_______________________________________________<br>
rtems-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:rtems-users@rtems.org">rtems-users@rtems.org</a><br>
<a moz-do-not-send="true"
href="http://www.rtems.org/mailman/listinfo/rtems-users"
target="_blank">http://www.rtems.org/mailman/listinfo/rtems-users</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Joel Sherrill, Ph.D. Director of Research & Development
<a class="moz-txt-link-abbreviated" href="mailto:joel.sherrill@OARcorp.com">joel.sherrill@OARcorp.com</a> On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985 </pre>
</body>
</html>