public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] building gcc-2.95.1 for eCos 1.2.1
@ 1999-11-03 18:58 Atsumi Hirose
  1999-11-04  6:44 ` Grant Edwards
  0 siblings, 1 reply; 8+ messages in thread
From: Atsumi Hirose @ 1999-11-03 18:58 UTC (permalink / raw)
  To: ecos-discuss

I'm using gcc-2.95.1 as an arm-elf cross compiler on a
Linux host.  I have only run small bits of code to
initialize the hardware, but it seems to be working so
far -- I haven't tried to run the eCos kernel yet.
What exactly are your errors?

Most of the code I've run so far is assembly
language, so I can't verify that there's nothing wrong
with 2.95.1...
 
Grant Edwards


-------------------------


Before I explain what errors I get, let me explain the
different methods I've used to try to get gcc-2.95.1
to work in eCos.  I basically tried 3 different
approaches however I played around with many files and
compiler options on each approach.

The first thing I tried to do was to build gcc-2.95.1
with the header files from an (arm-linux) linux-2.2.12
kernel that I built.  I was able to build the compiler
and glibc OK but the compiled ("hello world") test app
would not load through gdb.  If I remember correctly,
gdb frooze up after I typed "target remote
/dev/ttyS0".  I also tried to compile the file with
that compiler and the libarary and header files from
eCos but it would not compile.

The second approach I took was to build gcc-2.95.1
with both the header files from the (arm-linux) 2.2.12
kernel (asm and linux) folders, and the header files
from the eCos kernel
(/usr/local/ecos-1.2.1/ecos-work/install/include).  I
pretty much got the same results as my first attempt
with only the arm-linux kernel heade files.

In the previous attempt I did not overwrite any files
when merging the header files since the linux header
files were in their own directories (asm and linux). 
The third and last method I used was to follow the
same approach I took earlier, only overwrite any
arm-linux kernel header files with the header files
from the ecos kernel.  For example, the include file I
used for the building of the compiler had the asm and
linux folders from the arm-linux kernel and it also
had  the pkgcong, sys, and cyg header files (along
with others not in a folder) from the eCos kernel.  I
then searched the asm and linux folders for all the
files from the linux kernel include files and replaced
the arm-linux files with the eCos files if there were
duplicates.  I probably replaced about 1/10 of all the
files in the asm or linux include folders.  The
compiler and glibc were built fine.  In fact, I was
even able to get the test app past "target remote
/dev/ttyS0".  Usually, after I type "load" on a file
made in eCos, I get the following diplayed in my
terminal:
(gdb)load
Loading section .rom_vectors, size 0x44 lma 0xc000
Loading section .text, size 0xd818 lma 0xc044
Loading section .rodata, size 0x3e8 lma 0x1985c
Loading section .data, size 57092
Trarnsfer rate: 25374 bits/sec.
I can then type "Continue" or whatnot.  Anyway, after
I typed "load" with the compiler I built with the
previously mentioned method, I get the following
displayed:
(gdb)load
Loading section .interp, size 0x13 lma 0x20000f4
Ingoring packet error, continuing. . .
Loading section .note.ABI-tag, size 0x20 lma 0x2000110
Ignoring packet error, continuing. . .
Loading section .hash, size 0x28 lma 0x2000130
Ignoring packet error, continuing. . .
Loading section .dynsym, size 0x50 lma 0x2000158
Ignoring packet error, continuing. . .
Loading section .dynstr, size 0x43 lma 0x20001a8
Ignoring packet error, continuing. . .
Loading section ..gnu.version, size 0xa lma 0x20001ec
Ignoring packet error, continuing. . .
Loading section .gnu.version_r, size 0x20 lma
0x20001f8
Ignoring packet error, continuing. . .
Loading section .rel.plt, size 0x18 lma 0x2000218
Ignoring packet error, continuing. . .
Among many other smilar messages.

Something else I tried was to build gcc-2.95.1 with
the header files from the eCos kernel but that build
was not even successful.

I shoudl also probably imphasize that during all 3 
"approaches", I used the compiler option to try
compiling the file from both include files and
libraries(ie. the arm-linux include files and the
glibc that I built, or the eCos include and library
file.

I know it sounds like I am just guessing around in the
dark and have no idea what I am doing and that's
because it's true.  Thus, as mentioned before, any
help or advice is welcome.  I have also read the
section in the FAQ about compiler dependencies and am
guessing that is one of my problems.  Is there anyway
around this?


=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [ECOS] building gcc-2.95.1 for eCos 1.2.1
@ 1999-11-04 20:57 Atsumi Hirose
  1999-11-05  5:42 ` Jonathan Larmour
  1999-11-05  6:08 ` Grant Edwards
  0 siblings, 2 replies; 8+ messages in thread
From: Atsumi Hirose @ 1999-11-04 20:57 UTC (permalink / raw)
  To: Grant Edwards; +Cc: ecos-discuss

Let's forget about gcc for a second.  Have you verfied
that you can assemble and link a small program and
then load/run it with gdb? Something trivial that just
loads values into registers, reads/writes a few bytes
of RAM?
------------------------------------
Yes, I built a sample app and it compiles fine using
eCos's arm-elf-gcc.  I was then able to load it to my
ARM evaluation board and run it with arm-elf-gdb
without any problems.
 
-------------------------------------

If you're going to be running an embedded system with
eCOS, then you don't need glibc -- all you need is
gcclib.
-------------------------------------
All the documentation I found on building an ARM-Linux
cross toolchain told me to build glibc.  I read your
recommendations for building gcc as a cross compiler
and am about to try them.

--------------------------------

If you try to build libio, libiberty, or glibc for the
ARM target, you're going to have to have a whole set
of header files configured for the ARM target.  If
you're going to be running eCOS, then you aren't going
to have an OS that supports those libraries -- so
don't try to build them
---------------------------------------
I am guessing that this is the problem.  As I
mentioned before, I have built gcc-2.95.1 and
glibc-2.1.2 for an ARM-Linux target.  The compiler
seemed like it was able to compile alright but the
arm-elf-gdb didn't seem to like the file.

I will try to build the compiler again with only
gcclib.  However, the reason I am building this
compiler is because I want to be able to use gcj, am I
going to come across probelms with libgcj?

Thanks,

Atsumi


=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

^ permalink raw reply	[flat|nested] 8+ messages in thread
* [ECOS] building gcc-2.95.1 for eCos 1.2.1
@ 1999-11-02  4:02 Atsumi Hirose
  1999-11-02  5:48 ` Grant Edwards
  0 siblings, 1 reply; 8+ messages in thread
From: Atsumi Hirose @ 1999-11-02  4:02 UTC (permalink / raw)
  To: ecos-discuss

Hi all,

I want to use gcj with ecos on an ARM processor and it
is turning out to be MUCH more difficult than
anticipated.  I though that all I would have to do is
build gcc-2.95.1 as an arm-linux cross compiler and
then configure/build the compiler for java and build
the java library.  After that I thought I could just
copy the java libraries into the kernel and then play
around with some headers and include files.  I have
thus learned that I was wrong and was wondering if
somebody could tell me just what is involved when
trying to get gcj to run with eCos.  Has anybody been
able to do this?

For starters let me say that I cannot even get the
gcc-2.95.1 arm-linux cross compiler that I built to
run on my ARM board with eCos (C or C++).  Of course
the arm-linux cross compiler that comes with eCos
works just fine.  I can compile a file with my new
2.95.1 toolchain.  It just won't run on the board.  I
can give a bunch of details on some "errors" that I
get but that might not even be relavant.  I have tried
many different methods (ie swithing eCos's and
gcc-2.95.1's header files etc.) but nothing works.

As you can tell, I am not to experienced at developing
GNU tools.  I just imagined that if a file was
compiled successfully for my ARM board, I could use
the other tools in eCos, gdb, the libs and header
files, etc. . . to load the file into the board. 
Ofcourse I would obviously have to change out some
headers and libarary files.  I guess I am just
learning the hard way what it means to "port"
something to eCos.  Just what does that mean?

Anyway, I am grateful for any comments or suggestions.

Atsumi


=====

__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

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

end of thread, other threads:[~1999-11-05  6:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-03 18:58 [ECOS] building gcc-2.95.1 for eCos 1.2.1 Atsumi Hirose
1999-11-04  6:44 ` Grant Edwards
1999-11-04 10:21   ` Grant Edwards
  -- strict thread matches above, loose matches on Subject: below --
1999-11-04 20:57 Atsumi Hirose
1999-11-05  5:42 ` Jonathan Larmour
1999-11-05  6:08 ` Grant Edwards
1999-11-02  4:02 Atsumi Hirose
1999-11-02  5:48 ` Grant Edwards

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