[ECOS] ecos table section

Sergei Gavrikov sergei.gavrikov@gmail.com
Thu Dec 1 18:04:00 GMT 2011


On Thu, 1 Dec 2011, Elad Yosef wrote:

> 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).

All the above things and RedBoot's tables use eCos HAL tables, refer to
hal/common/<version>/include/hal_tables.h. As you can see the tables
define itself in .ecos.tables section which has "aw" flags (allowable and
writable section). So, every ecos HAL table will be placed in .data
segment.

Unfortunately, we have not CYG_HAL_RONLY_TABLE_{BEGIN,END}, etc.  macros
there. Well for some things you would set "x" flag (executable section),
for such RO regions, but, it seems for me that would look like a mess.

> 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?

I guess you talk about  those __remcom{In,Out}Buffer buffers from
hal/common/<version>/src/generic-stub.c. So, just define NUMREGBYTES
value.

HTH

Sergei

> 
> 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
> >
> 
-------------- next part --------------
-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


More information about the Ecos-discuss mailing list