Linking application and BSP

Joel Sherrill joel.sherrill at OARcorp.com
Wed Sep 20 19:13:20 UTC 2000


"Michael P. Collins on korat" wrote:
> 
>   I'm trying to determine how I should link my application with my
> BSPs now that they've been updated for 4.5.  All the "tests/samples"
> tasks link successfully[1], which implies that my BSPs are more-or-less
> complete.
> 
>   Using the Makefiles I created for 4.0.0 as a starting point, I've
> gotten the bugs out to the point where the final link step takes place.
> Then I see the problems described below.
> 
>   - The linker complains about "start.o" not being found.  I've
>     tried adding "$INSTALL_POINT/<bsp>/lib/start.o" to the list
>     of linked objects, but this doesn't work.  A symlink from that
>     file to the local directory does work; I haven't been able to
>     determine where the reference to a local "start.o" is coming
>     from.

Did you do a "make install"?  And did you set RTEMS_MAKEFILE_PATH to
point to the install point.  If you are using RPMs, then it would
likely be something like /opt/rtems/MYBSP.

Another possibility is that you built the debug variant of
RTEMS but your bsp_specs does not quite have -qrtems_debug support.
 
>   - With that symlink in place, the linker complains about undefined
>     references to `Configuration' in bootcard.c.  Using the sample
>     tasks as a reference, I don't understand why this error doesn't
>     occur any time the BSP is linked with an application.  Conversely,
>     if there isn't an unresolved reference when linking with a sample
>     application, why do I see one when linking with mine?  Where is
>     this structure supposed to be allocated?  I don't have any
>     references to this structure in any of my application files.
> 
>   - There are undefined references to the following variables:
> 
>     filename                        undefined reference
>     --------                        -------------------
>     c/src/lib/libc/base_fs.c        rtems_filesystem_mount_table_size
>                                     rtems_filesystem_mount_table
> 
>     c/src/lib/libc/libio.c          rtems_libio_number_iops
> 
>   I presume the the last item in the list pertains to the lack of
> filesystem support for my BSP.  How should I go about linking so I
> don't see those errors?

NO problem with your BSP.  You are not using confdefs.h to 
instantiate the configuration information.  Look at the way 
hello uses confdefs.h.
 
>   As always, any suggestions are appreciated.
> 
>                                         -- MC --
> 
> 1. With the exception of paranoia, which is too large to fit in
>    program space for my ROM-based BSP.  I asked if there was an
>    elegant way to omit this task during build last week, but didn't
>    see any replies.  I wrote a script which applies patches to
>    Makefile.in and configure, but would still like to know if
>    there's a better way.

Unfortunately, none that I know of.

> --
> mcollins at wdc.sps.mot.com

-- 
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 mailing list