building bsp w/o examples
Joel Sherrill <joel@OARcorp.com>
joel.sherrill at OARcorp.com
Sat Sep 24 16:48:27 UTC 2005
stanley jobson wrote:
>>>will this include something like: libnetworking/* (e.g. pppd,
>>>webserver, telnetd ...)
>>>when doing objdump -d image i see a lot of ppp functions which i
>>>really do not need ... but bloats my image :(
>>How are you linking the application? It looks like something is wrong
>>there. RTEMS is a big library and carefully constructed so you do not
>>link in functionality you do not reference directly or by implication.
>>I saw a "LD" in a previous email. Are you using the GNU tools
>>provided with 4.6 or some other toolset?
>>How are you linking? It appears to be wrong.
> here is my LD command:
> LD ../obj/i386/PING/node.img
> i386-rtems-gcc -qnolinkcmds -qrtems -L../src/contrib/embunit/lib
> -B/usr/local/share/i386-rtems/pc386/lib -specs
> /usr/local/share/i386-rtems/pc386/lib/bsp_specs -T
> ../src/sys/i386/sim/startup/linkcmds -o ../obj/i386/PING/node.img
> <all the c object files>
> so i use the gnu toolchain compiled for rtems i guess ...
> i use the bsp_specs provided by rtems for my bsp
> so maybe this is not correct but it looks like a correct linker command
> to me. i should mention too, that i do not use the buildsystem
> (configure, Makefiles) provided or suggested by rtems ...
> i use f.e. no ppp stuff in my app but the rtems examples/tests use it
> (which are also included in the rtems libs) - so maybe this causes the
> linker to include all the ppp stuff (incl libnetworking/ppp) into my
> final binary ?
If you are not using the RTEMS build infrastructure then you are likely
not building a library for RTEMS but a relocatable file (-r).
I would highly recommend using the RTEMS build infrastructure to build
RTEMS and then using whatever technique you want to build your
application. Stick to the known good make structure for RTEMS itself
and you will get two libraries -- one for RTEMS itself and one for the
You have introduced problems by not using the known good build procedure.
> any ideas to my other prob? : the ppp stuff is missing the
> rtems_bsdnet_config var/struct which is definitively defined in one of
> my header files and included by one of my object files ...
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users