This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: ecos table section
- From: Elad Yosef <elad dot yosef at gmail dot com>
- To: Sergei Gavrikov <sergei dot gavrikov at gmail dot com>, ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 1 Dec 2011 08:48:11 +0200
- Subject: Re: [ECOS] ecos table section
- References: <CAOFa9c0i-HuhjdQN6Bse6vMH-iWTdows+JM_DZ+ZcSZkCds9hQ@mail.gmail.com> <alpine.DEB.2.00.1111291825010.9225@vostro> <alpine.DEB.2.00.1111291830190.15248@vostro> <CAOFa9c0NFdB9giR7fxdizfjcb9THLTe8NCRw=LBSo=vpVe0OyA@mail.gmail.com> <alpine.DEB.2.00.1111302005380.1915@vostro>
I agree that moving the commands entries would save 24 bytes per command.
But since the entries are static, I suggest to allocate it by default as rodata.
What about the IO functions DEV_## ?
for example the atlas serial driver has 3 data structures that are all static:
- atlas_serial_channel0
- atlas_serial_funs
- atlas_serial_info0
All the 3 are constants and linked into the RAM, instead into rodata.
(same for tty and ethernet).
I also want to ask about remComInBuffer/remComOutBuffer.
I'm using MIPS32 4Kec on my target and I see that each buffer is 2KB!!!
Is there a place for minimizing it? what are the effects?
Thanks
Elad
On Wed, Nov 30, 2011 at 7:29 PM, Sergei Gavrikov
<sergei.gavrikov@gmail.com> wrote:
> Please keep your replies on the list so that all may benefit.
>
> On Wed, 30 Nov 2011, Elad Yosef wrote:
>
>> Hi,
>> I did all the above and reached foot print of ~42KB.
>
> Is that for RedBoot's .data/.bss? What your target is? ?(What are its
> ROM, RAM ratios?)
>
>> And I'm trying to minimize more.
>
> Well, with your request you would save about 0.5K only. The command
> table entry is the six pointers only (for the most platform that's 24
> bytes), so, the table's room is 24 x N (commands), i.e. for 20 commands
> 480 bytes only. As I said if you will continue to look for a few free
> bytes that it does not seem that to use RedBoot as debug environment is
> right choice for your target.
>
> Sergei
>
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss