public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] make tests compile error for eb40
@ 2002-07-17  7:30 Tim Drury
  2002-07-17  7:37 ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Drury @ 2002-07-17  7:30 UTC (permalink / raw)
  To: ecos-discuss


(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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] make tests compile error for eb40
  2002-07-17  7:30 [ECOS] make tests compile error for eb40 Tim Drury
@ 2002-07-17  7:37 ` Gary Thomas
  2002-07-17  7:58   ` Tim Drury
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2002-07-17  7:37 UTC (permalink / raw)
  To: Tim Drury; +Cc: eCos Discussion

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] make tests compile error for eb40
  2002-07-17  7:37 ` Gary Thomas
@ 2002-07-17  7:58   ` Tim Drury
  2002-07-17  8:13     ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Tim Drury @ 2002-07-17  7:58 UTC (permalink / raw)
  To: eCos Discussion


On Wednesday 17 July 2002 10:37 am, Gary Thomas wrote:
> Don't try to 'make tests' using a RedBoot configuration.  The tests only
> make sense when you are building a more generic eCos environment.

Okay - makes sense.  I noticed my fatal mistake - I was importing
redboot_RAM.ecm which uses the redboot template.  I copied this
ecm file and removed the reboot template and cdl_options for
redboot fis and flash.  Then I re-ran 'make tests' and everything
compiled.  Does this sound like a suitable solution?  I really need
to delve into the cdl guide further.

Also, are the tests self-explanatory (i.e. when run will I know if they
passed?) or is there some docs somewhere that describe the pass/fail
conditions of each test?  The 'Getting Started' guide only described
how to build the tests.

-tim



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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] make tests compile error for eb40
  2002-07-17  7:58   ` Tim Drury
@ 2002-07-17  8:13     ` Gary Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2002-07-17  8:13 UTC (permalink / raw)
  To: Tim Drury; +Cc: eCos Discussion

On Wed, 2002-07-17 at 08:56, Tim Drury wrote:
> 
> On Wednesday 17 July 2002 10:37 am, Gary Thomas wrote:
> > Don't try to 'make tests' using a RedBoot configuration.  The tests only
> > make sense when you are building a more generic eCos environment.
> 
> Okay - makes sense.  I noticed my fatal mistake - I was importing
> redboot_RAM.ecm which uses the redboot template.  I copied this
> ecm file and removed the reboot template and cdl_options for
> redboot fis and flash.  Then I re-ran 'make tests' and everything
> compiled.  Does this sound like a suitable solution?  I really need
> to delve into the cdl guide further.
> 

Alternatively, you can build a simple eCos environment by just:
  % ecosconfig new eb40
  % ecosconfig tree
  % make; make tests

> Also, are the tests self-explanatory (i.e. when run will I know if they
> passed?) or is there some docs somewhere that describe the pass/fail
> conditions of each test?  The 'Getting Started' guide only described
> how to build the tests.

The tests are designed for an automated execution environment.  They
will print messages to the console - either PASS or FAIL, along with
some informative information, as appropriate.


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] make tests compile error for eb40
@ 2002-07-17  8:24 Tim Drury
  0 siblings, 0 replies; 5+ messages in thread
From: Tim Drury @ 2002-07-17  8:24 UTC (permalink / raw)
  To: ecos-discuss


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-07-17 15:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-17  7:30 [ECOS] make tests compile error for eb40 Tim Drury
2002-07-17  7:37 ` Gary Thomas
2002-07-17  7:58   ` Tim Drury
2002-07-17  8:13     ` Gary Thomas
2002-07-17  8:24 Tim Drury

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).