RES: RES: Some questions about building release / debug versions of a RTEMS application

Fabrício de Novaes Kucinskis fabricio at dea.inpe.br
Mon Jan 23 12:17:21 UTC 2006


Thomas,


Thank you very much for the info. I took a look at the no-xxx.c files in the
RTEMS source code and understood what you said.
Best regards,


Fabrício.


-----Mensagem original-----
De: Thomas Doerfler (nt) [mailto:Thomas.Doerfler at imd-systems.de]
Enviada em: sexta-feira, 20 de janeiro de 2006 16:44
Para: Fabrício de Novaes Kucinskis
Cc: RTEMS - Mailing List
Assunto: Re: RES: Some questions about building release / debug versions
of a RTEMS application


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

about your "MANAGERS" question:

The core code of RTEMS references all the managers (semaphore,
partition, message queue etc...) and this normally would force ALL
managers to be linked to an application, even if the application does
not use some of them. The "no-manager.rel" files are dummy object files,
which contain all relevant symbols of each manager's interface, but they
do not contain the actual functionality. Instead, they throw an error,
whenever they would be called.

So what's the benefit of this? The "no-manager.rel" objects are MUCH
smaller than the real managers. If you link them to your application
instead of the real thing, your executable will therefore be smaller.
You can't call their functions (because they would throw an error), but
at least the linker is satisfied when it looks for the interface
functions of the managers.

So they are small dummy modules.

wkr,
Thomas.


Fabrício de Novaes Kucinskis schrieb:
> Ok, I did my homework!
>
>
> I studied more how the RTEMS executables are created. I'm posting what I
> found here to help when someone else have the same doubts. Please correct
me
> if I'm wrong.
>
> Using a makefile based on the one that comes with hello_world_c, the
> executable will be in a "debug version", with all the debug and relocation
> symbols. To remove this symbols and create a "release" version, it's
> necessary to use bsp-rtems-strip or bsp-rtems-objcopy (see the man pages
> about these programs). In my case, a debug version with 1.1mb turned into
a
> release version with about 125kb.
>
> Concerning my second question, I'm still confused.
>
> If, in the makefile, I inform some managers in "MANAGERS", the only
> difference I notice is that the linker DON'T link a "no-manager.rel" file.
> For example, if I inform "MANAGERS = sem msg", all no-manager.rel files
will
> be linked, except no-sem.rel and no-msg.rel.
>
> So, what's the purpose of the MANAGERS in the makefile? Should I use it or
> not?
> Thanks again,
>
>
> Fabrício.
>
>
>
> -----Mensagem original-----
> De: Fabrício de Novaes Kucinskis [mailto:fabricio at dea.inpe.br]
> Enviada em: quinta-feira, 19 de janeiro de 2006 14:30
> Para: RTEMS - Mailing List
> Assunto: Some questions about building release / debug versions of a
> RTEMS application
>
>
> Hello all,
>
>
> I'm trying to create debug and release versions of an applicaton, but I'm
> having some difficulties. I'm using a makefile based on the
"hello_world_c"
> makefile. With this makefile, any RTEMS executable I build has a size of
> about 1MB.
>
> This exe is a debug version; how to create a release version? Is it
> necessary to create a different RTEMS build and change the
> RTEMS_MAKEFILE_PATH? (but my RTEMS libraries were built using 'make all
> install', not 'make VARIANT=debug')
>
> Or just set some tags in the makefile?
>
> One more question: I'm a little bit confused concerning setting the
managers
> to include. I inform the managers with the MANAGERS variable in the
> makefile, but it doesn't appears to have effect.
>
> In some previous messages here in the list, it's said that this is not
> necessary anymore, and that only referred managers would be included in
the
> resulting exe. Is this correct, and valid to both release and debug
> versions?
>
> Thanks in advance,
>
>
>
> Fabrício.


- --
- --------------------------------------------
IMD Ingenieurbuero fuer Microcomputertechnik
Thomas Doerfler           Herbststrasse 8
D-82178 Puchheim          Germany
email:    Thomas.Doerfler at imd-systems.de
PGP public key available at:
     http://www.imd-systems.de/pgpkey_en.html
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD0S9rwHyg4bDtfjQRAouSAKCUHkacvscW4wthUok0L3Njc1xwGACdEtck
6mDJOgPRt+6jWhe4Gu0P0O0=
=oKyh
-----END PGP SIGNATURE-----




More information about the users mailing list