This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: make tests compile error for eb40


Don't try to 'make tests' using a RedBoot configuration.  The tests only
make sense when you are building a more generic eCos environment.

On Wed, 2002-07-17 at 08:29, Tim Drury wrote:
> 
> (sorry if this is a duplicate - the first didn't seem to get posted to the 
> list)
> 
> In trying to release the EB40a port, I'm trying to make and run the tests.
> I can compile/run redboot without a problem, but when I try to 'make tests'
> after the 'ecosconfig tree' command, I get the following error:
> 
> /usr/local/ecos/tests/install/lib/libtarget.a(redboot_main.o): In function
> `do_go':
> /usr/local/ecos/cvs_td_patch/ecos/packages/redboot/current/src/main.c:713:
> undefined reference to `RedBoot_version'
> collect2: ld returned 1 exit status
> 
> The redboot main.c references an extern RedBoot_version variable which
> is declared in version.c in the redboot/src directory, but this file doesn't
> seem to be getting compiled or linked when running 'make tests'.  But
> 'make' after targetting redboot works.  I found this in the redboot cdl
> file:
> 
>         make -priority 320 {
>             <PREFIX>/bin/redboot.elf : $(PREFIX)/lib/target.ld
> $(PREFIX)/lib/vectors.o $(PREFIX)/lib/libtarget.a $(PREFIX)/lib/libextras.a
>                     @sh -c "mkdir -p $(dir $@)"
>                     $(CC) -c $(INCLUDE_PATH) $(CFLAGS) -o
> $(PREFIX)/lib/version.o $(REPOSITORY)/$(PACKAGE)/src/version.c
>                     $(CC) $(LDFLAGS) -L$(PREFIX)/lib -Ttarget.ld -o $@
> $(PREFIX)/lib/version.o
>         }
> 
> So it would seem that when building the redboot.elf, the version.c file
> is compiled and linked here.
> 
> My question:  how do I get version.c to get compiled and linked during
> 'make tests'?  When do those lines in the redboot cdl get invoked?
> Should they be there or should version.c get compiled like all the other
> support source files in redboot/src.  Why is version.c special?
> 
> I can certainly fix this by hacking the makefile for 'make tests', but I want
> to do it the right way.
> 
> -tim drury
> 
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss



-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]