[ECOS] building gcc-2.95.1 for eCos 1.2.1

Atsumi Hirose atsumi99@yahoo.com
Wed Nov 3 18:58:00 GMT 1999


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


More information about the Ecos-discuss mailing list