wrapup problem? moving bsp fro 4.5.0 to 4.6pre1

Ralf Corsepius corsepiu at faw.uni-ulm.de
Mon Mar 3 07:41:48 UTC 2003


Am Mon, 2003-03-03 um 08.00 schrieb Wendell Thompson:
> Ralf,
> 
> Thanks for your response. Please see comments below. I'm still stuck.
> 
> Wendell
> 
> Ralf Corsepius wrote:
> > 
> > You are looking at the wrong place. Your clock.rel seems to be
> > bsp-specific, so it should be contained in librtemsbsp.a.
> > 
> 
> Actually, it's cpu specific. An internal timer.

Well, from your initial mail:
[..]
wentho at linux:/usr/local/rtems-4.6.0pre1/build-rtems-m68k> nm -g 
./m68k-rtems/c/clc5206_am/lib/libbsp/m68k/clc5206_am/clock/o-optimize/clock.rel [..]

This location libbsp/m68k/<bsp>/clock
qualifies it as BSP-specific (Built per BSP).

The wrapup/Makefile.am responsible for merging this clock.rel into RTEMS
is libbsp/m68k/<bsp>/wrapup/Makefile.am

So something along these lines should do what you want (from efi332/Makefile.am):
[..]
BSP_PIECES = startup clock console spurious timer
                                 
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.$(OBJEXT))) \
    $(wildcard ../../../../libcpu/$(RTEMS_CPU)/shared/misc/$(ARCH)/*.$(OBJEXT))
LIB = $(ARCH)/libbsp.a
                                                                                                                   
include $(top_srcdir)/../../../../../../automake/compile.am
include $(top_srcdir)/../../../../../../automake/lib.am
                                                                                                                   
#
# (OPTIONAL) Add local stuff here using +=
#
                                                                                                                   
$(LIB): $(OBJS)
        $(make-library)
[..]

> 
> Doesn't the line:
> CPU_PIECES = clock console timer
> in wrapup/Makefile.am put it into librtemscpu.a?

Basically, yes, but cpukit/wrapup/Makefile.am can not (must not) be
applied to files outside of cpukit. 

> It isn't in either place:
> 
> wentho at linux:/usr/local/rtems-4.6.0pre1/build-rtems-m68k> nm -g 
> ./m68k-rtems/clc5206_am/lib/librtemsbsp.a | grep Clock
> wentho at linux:/usr/local/rtems-4.6.0pre1/build-rtems-m68k> nm -g 
> ./m68k-rtems/clc5206_am/lib/librtemscpu.a | grep Clock
> wentho at linux:/usr/local/rtems-4.6.0pre1/build-rtems-m68k>
Oh, wait - clock.rel and efi332/wrapup/Makefile.am!

The efi332/wrapup/Makefile.am doesn't handle *.rels, it handles
*.$(OBJEXT)s (== *.o's), only.

=> If you really want to use *.rels you'd have to extend the
OBJS-make-variable in libbsp/m68k/<bsp>/wrapup/Makefile.am to consider
*.rels (compare to other BSPs, many do so), or to change your
Makefile.ams to pull-in clock.$(OBJEXT).

> > 
> > You probably also need to adapt your BSP's bsp_specs.
> > 
> > [Background: Since 4.5, librtems.a has been split into librtemscpu.a and
> > librtemsbsp.a, so you need to reflect this change to your bsp_specs,]
> > 
> 
> I figured that out already. Here's my bsp-specs:

Without having looked into all details, it seems to be fine to me.

Ralf






More information about the users mailing list