<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 18, 2014 at 6:34 AM, Hesham Moustafa <span dir="ltr"><<a href="mailto:heshamelmatary@gmail.com" target="_blank">heshamelmatary@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi all,<br>
<br>
Thanks for all your helpful replies. I actually tried all the solution<br>
you mentioned: used printk, low-ticker (from example-v2), disabled<br>
newlib reentrancy (part of low-ticker configuration). I managed to get<br>
<32KB ticker with GCC optimization enabled (-Os), but I got some<br>
exceptions during initialization, however, the same code built without<br>
optimization (-O0) runs OK, but it's about 80KB.<br>
<br>
Marcos and Daniel, it's surprising that you got 9KB RTEMS, how did you<br>
do this (without the application optimizations and stacks) what APIs,<br>
managers, and CPUKIT code did you use, and what others did you give<br>
up?</blockquote><div><br></div><div>My bad, since we were having problems with using RTEMS in an environment with 32kb of RAM but with much more ROM, I though you had the same problem. That size was of the used RAM (data, vector and bss sections) not of the total used space.</div><div>Sorry about that. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> </blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Sebastian, the 32KB is for both code and data. Although there is 32MB<br>
external memory, it's very slow compared with local memories. The idea<br>
of getting rid of workspace appeals to me. Does this include<br>
discarding malloc, heap stuff? And how can this be done?<br>
<br>
Thanks,<br>
Hesham<br>
<div class="HOEnZb"><div class="h5"><br>
On Thu, Dec 18, 2014 at 7:58 AM, Sebastian Huber<br>
<<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br>
> Hello,<br>
><br>
> is this 32KiB for code and data?<br>
><br>
> You should also disable the Newlib reentrancy:<br>
><br>
> #define CONFIGURE_DISABLE_NEWLIB_REENTRANCY<br>
><br>
> Try to add:<br>
><br>
> CFLAGS_OPTIMIZE_V += -ffunction-sections -fdata-sections<br>
><br>
> LDFLAGS = -Wl,--gc-sections<br>
><br>
> to the *.cfg file of the BSP.  You need a proper linker command file to use<br>
> these options.<br>
><br>
> Avoid printf() and instead use printk() or no output.<br>
><br>
> For a really small RTEMS we need the constructor based initialization.  We<br>
> should probably also get rid of the workspace and use static initialization<br>
> only.<br>
><br>
><br>
> On 17/12/14 17:00, Hesham Moustafa wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> I am working on reducing RTEMS size to fit into <32KB as every Epiphay<br>
>> core has only 32KB of local memory. I was able to get hello and<br>
>> minimum samples with aggressive size reduction by manually removing<br>
>> un-needed code. Currently I only use libcsupport, sapi, score, rtems<br>
>> built for cpukit only, and for each, some source code files were<br>
>> removed. No IO, no FS, no barrier, event, managers are included. And I<br>
>> added -Os flag. However when building ticker, the .text area overflows<br>
>> the 32KB local memory by about 8KB.<br>
>><br>
>> The question is, what are the very basic mandatory sources/libraries<br>
>> and/or managers that are enough to build ticker?<br>
>><br>
>> Regards,<br>
>> Hesham<br>
>> _______________________________________________<br>
>> devel mailing list<br>
>> <a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
>> <a href="http://lists.rtems.org/mailman/listinfo/devel" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
><br>
><br>
> --<br>
> Sebastian Huber, embedded brains GmbH<br>
><br>
> Address : Dornierstr. 4, D-82178 Puchheim, Germany<br>
> Phone   : +49 89 189 47 41-16<br>
> Fax     : +49 89 189 47 41-09<br>
> E-Mail  : <a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a><br>
> PGP     : Public key available on request.<br>
><br>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><span><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="font-size:16px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">______________________________</span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><a href="http://www.tallertechnologies.com" target="_blank"><img src="http://www.tallertechnologies.com/templates/tallertechnologies/images/signature.png" width="200" height="78"></a></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><b style="font-weight:normal"><br><span style="font-size:16px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"></span></b></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><font face="verdana, sans-serif" size="4">Marcos Díaz</font></span></p><p dir="ltr" style="margin-top:0pt;margin-bottom:0pt"><font color="#000000" face="verdana, sans-serif"><span style="line-height:17px;white-space:pre-wrap">Software Engineer</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><b style="font-weight:normal"><br><span style="font-size:15px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"></span></b></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif" size="1">San Lorenzo 47, 3rd Floor, Office 5</font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><font face="arial, helvetica, sans-serif" size="1">Córdoba, Argentina </font></span></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><b style="font-weight:normal"><font face="arial, helvetica, sans-serif" size="1"><br><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"></span></font></b></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif" size="1"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Phone:</span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> +54 351 4217888 / +54 351 4218211/ </span><span style="color:rgb(0,0,0);line-height:12px;white-space:pre-wrap">+54 351 7617452</span></font></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"></p><p dir="ltr" style="line-height:1.15;margin-top:0pt;margin-bottom:0pt"><font face="arial, helvetica, sans-serif" size="1"><span style="color:rgb(0,0,0);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Skype:</span><span style="color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"> markdiaz22</span></font></p><div><span style="font-size:11px;font-family:Arial;color:#000000;background-color:transparent;font-weight:normal;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br></span></div></span></div></div>
</div></div>