public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] compilation hello program error
@ 2001-09-04 19:33 Hong Hsu
  2001-09-04 19:43 ` Gary Thomas
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hong Hsu @ 2001-09-04 19:33 UTC (permalink / raw)
  To: ecos-discuss

  As couldn't find FAQs of this eCos discuss,  I send the question to you.

I use Redhat Linux kernel 2.4.2 on Intel Pentuim 4.  For installation of 
eCos,  the 
/opt/ecos/ecos-1.3.1/tools/bin:/tools/H-i686-pc-linux-gnu/bin:$PATH
is added to PATH, but I do not have /tools/h-i686-pc-linux-gnu/bin 
directory.  what is supporse to be replaced by this?

Since I plan to use synthetic target, so I choose
#ecosconfig new linux

at this stage what portion of ecos.ecc should be modified?

then I build tree:
#ecosconfig tree

then I created a directory /root/hong/projects/ecos/ecos-work to hold 
hello source code.
#cd /root/projects/ecos/ecos-work

Copy Makefile and hello.c from /opt/ecos/ecos-1.3.1/examples/ to the 
directory.  In Makefile, Change PKG_INSTALL_DIR to 
/root/hong/projects/ecos/ecos-work/install 
and uncomment XCC = i686-pc-linux-gnu-gcc

[root@cheetah < mailto:root@cheetah > ecos-work]# echo $BASE_DIR
/root/hong/projects/ecos/

build hello generaged an error:

[root@cheetah < mailto:root@cheetah > ecos-work]# gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
/usr/bin/ld: cannot open linker script file target.ld: No such file or directory
collect2: ld returned 1 exit status

I notice that
/root/hong/projects/ecos/ecos-work/install/lib  is empty

What is wrong with my procedure for building a hello program?     Your 
help will be appreciated.

-Hong
honghsu@bellatlantic.net < mailto:honghsu@bellatlantic.net >





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

* Re: [ECOS] compilation hello program error
  2001-09-04 19:33 [ECOS] compilation hello program error Hong Hsu
@ 2001-09-04 19:43 ` Gary Thomas
  2001-09-04 23:48 ` Jesper Skov
  2001-09-05 13:16 ` Hong Hsu
  2 siblings, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2001-09-04 19:43 UTC (permalink / raw)
  To: Hong Hsu; +Cc: ecos-discuss

On 04 Sep 2001 22:36:16 -0400, Hong Hsu wrote:
> 
>   As couldn't find FAQs of this eCos discuss,  I send the question to you.
> 
> I use Redhat Linux kernel 2.4.2 on Intel Pentuim 4.  For installation of 
> eCos,  the 
> /opt/ecos/ecos-1.3.1/tools/bin:/tools/H-i686-pc-linux-gnu/bin:$PATH
> is added to PATH, but I do not have /tools/h-i686-pc-linux-gnu/bin 
> directory.  what is supporse to be replaced by this?
> 
> Since I plan to use synthetic target, so I choose
> #ecosconfig new linux
> 
> at this stage what portion of ecos.ecc should be modified?
> 
> then I build tree:
> #ecosconfig tree
> 
> then I created a directory /root/hong/projects/ecos/ecos-work to hold 
> hello source code.
> #cd /root/projects/ecos/ecos-work
> 
> Copy Makefile and hello.c from /opt/ecos/ecos-1.3.1/examples/ to the 
> directory.  In Makefile, Change PKG_INSTALL_DIR to 
> /root/hong/projects/ecos/ecos-work/install 
> and uncomment XCC = i686-pc-linux-gnu-gcc
> 
> [root@cheetah < mailto:root@cheetah > ecos-work]# echo $BASE_DIR
> /root/hong/projects/ecos/
> 
> build hello generaged an error:
> 
> [root@cheetah < mailto:root@cheetah > ecos-work]# gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
> /usr/bin/ld: cannot open linker script file target.ld: No such file or directory
> collect2: ld returned 1 exit status
> 
> I notice that
> /root/hong/projects/ecos/ecos-work/install/lib  is empty
> 
> What is wrong with my procedure for building a hello program?     Your 
> help will be appreciated.
> 
> -Hong
> honghsu@bellatlantic.net < mailto:honghsu@bellatlantic.net >
> 
> 

Before you can build an application,you need to build the eCos kernel
library.  Do this in the directory you ran 'ecosconfig tree'in.  Simply
run 'make'in that directory.

Then you can try building your application.

Note: you might want to try using the "build_Makefile" script which
should be in the same directory as the sample 'hello.c' file.
> 


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

* Re: [ECOS] compilation hello program error
  2001-09-04 19:33 [ECOS] compilation hello program error Hong Hsu
  2001-09-04 19:43 ` Gary Thomas
@ 2001-09-04 23:48 ` Jesper Skov
  2001-09-05 13:16 ` Hong Hsu
  2 siblings, 0 replies; 4+ messages in thread
From: Jesper Skov @ 2001-09-04 23:48 UTC (permalink / raw)
  To: Hong Hsu; +Cc: ecos-discuss

>>>>> "Hong" == Hong Hsu <honghsu@bellatlantic.net> writes:

Hong>   As couldn't find FAQs of this eCos discuss, I send the
Hong> question to you.

Hong> I use Redhat Linux kernel 2.4.2 on Intel Pentuim 4.  For
Hong> installation of eCos, the
Hong> /opt/ecos/ecos-1.3.1/tools/bin:/tools/H-i686-pc-linux-gnu/bin:$PATH
Hong> is added to PATH, but I do not have
Hong> /tools/h-i686-pc-linux-gnu/bin directory.  what is supporse to
Hong> be replaced by this?

/tools/H-i686-pc-linux-gnu is probably
/opt/ecos/ecos-1.3.1/tools/H-i686-pc-linux-gnu 

Note that eCos 1.3.1 is waaaaaaay old. You'd be better of using the
latest CVS version.

Hong> Since I plan to use synthetic target, so I choose #ecosconfig
Hong> new linux

Hong> at this stage what portion of ecos.ecc should be modified?

Hong> then I build tree: #ecosconfig tree


You need to invoke make here.

Hong> [root@cheetah < mailto:root@cheetah > ecos-work]# gcc -g
Hong> -IBASE_DIR/ecos-work/install/include hello.c
Hong> -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
Hong> /usr/bin/ld: cannot open linker script file target.ld: No such
Hong> file or directory collect2: ld returned 1 exit status

Remember to use $BASE_DIR, not BASE_DIR.

Jesper

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

* Re: [ECOS] compilation hello program error
  2001-09-04 19:33 [ECOS] compilation hello program error Hong Hsu
  2001-09-04 19:43 ` Gary Thomas
  2001-09-04 23:48 ` Jesper Skov
@ 2001-09-05 13:16 ` Hong Hsu
  2 siblings, 0 replies; 4+ messages in thread
From: Hong Hsu @ 2001-09-05 13:16 UTC (permalink / raw)
  To: ecos-discuss; +Cc: Hong Hsu

I wonder which file need to setup i686-pc-linux-gnu-gcc as I got an 
error when compile hello program?  Since there are only two bin and src 
subdirectories in /opt/ecos/ecos-1.3.1/tools/   Is it normal for my 
synthetic target as trying to add /tools/H-i686-pc-linux-gnu/bin to PATH?

make[1]: i686-pc-linux-gnu-gcc: Command not found
make[1]: *** [src/hal_misc.o.d] Error 127

Thanks a lot,
-Hong
honghsu@bellatlantic.net



>Before you can build an application,you need to build the eCos kernel
library.  Do this in the directory you ran 'ecosconfig tree'in.  Simply
run 'make'in that directory.

Then you can try building your application.

Note: you might want to try using the "build_Makefile" script which
should be in the same directory as the sample 'hello.c' file.
> 




Hong Hsu wrote:

> 
>  As couldn't find FAQs of this eCos discuss,  I send the question to you.
> 
> I use Redhat Linux kernel 2.4.2 on Intel Pentuim 4.  For installation 
> of eCos,  the 
> /opt/ecos/ecos-1.3.1/tools/bin:/tools/H-i686-pc-linux-gnu/bin:$PATH
> is added to PATH, but I do not have /tools/h-i686-pc-linux-gnu/bin 
> directory.  what is supporse to be replaced by this?
> 
> Since I plan to use synthetic target, so I choose
> #ecosconfig new linux
> 
> at this stage what portion of ecos.ecc should be modified?
> 
> then I build tree:
> #ecosconfig tree
> 
> then I created a directory /root/hong/projects/ecos/ecos-work to hold 
> hello source code.
> #cd /root/projects/ecos/ecos-work
> 
> Copy Makefile and hello.c from /opt/ecos/ecos-1.3.1/examples/ to the 
> directory.  In Makefile, Change PKG_INSTALL_DIR to 
> /root/hong/projects/ecos/ecos-work/install and uncomment XCC = 
> i686-pc-linux-gnu-gcc
> 
> [root@cheetah < mailto:root@cheetah > ecos-work]# echo $BASE_DIR
> /root/hong/projects/ecos/
> 
> build hello generaged an error:
> 
> [root@cheetah < mailto:root@cheetah > ecos-work]# gcc -g 
> -IBASE_DIR/ecos-work/install/include hello.c 
> -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib
> /usr/bin/ld: cannot open linker script file target.ld: No such file or 
> directory
> collect2: ld returned 1 exit status
> 
> I notice that
> /root/hong/projects/ecos/ecos-work/install/lib  is empty
> 
> What is wrong with my procedure for building a hello program?     Your 
> help will be appreciated.
> 
> -Hong
> honghsu@bellatlantic.net < mailto:honghsu@bellatlantic.net >
> 
> 
> 
> 
> 
> 
> 

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

end of thread, other threads:[~2001-09-05 13:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-04 19:33 [ECOS] compilation hello program error Hong Hsu
2001-09-04 19:43 ` Gary Thomas
2001-09-04 23:48 ` Jesper Skov
2001-09-05 13:16 ` Hong Hsu

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).