This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


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

Re: Embedded PowerPC


Hans - Dulimarta wrote:

> After successfully cross-compiling binutils-2.9.1, gcc-2.95.2, and
> newlib-1.8.2 on my Linux RedHat 6.1, I tried to cross compile a very
> simple C code [main() { int a; }].
>
> Without giving any '-m' option, the linker complained about 'missing
> _start' and several unknown references from eabi.o. [My target of
> cross compilation is powerpc-eabi].
>
> If I put one of '-msim, -mads, -myellowknife' options, the errors were
> gone. However, when I tried to download the code to my PowerPC embedded
> target (MPC555), the code did not seem to run.
>
> Could someone please tell me what is the use of the above '-m....'
> options. I could not find any reference to the ADS, YellowKnife, etc in
> the GCC info page.
>
> Also, how do I write a proper crt0.o for a new embedded target (i.e. what
> instructions are supposed to be written inside crt0.o)?

Check out newlib sources (I think in the libgloss directory).  Copy an existing
crt0.S file and modify it to your liking.  You will not need to modify much as
they are all pretty much standard with only a few board specific setups.

You can create your own -m command eg. -mmyembeddedsystem by altering the specs
file in $prefix/gcc/lib/gcc-lib/$target/$version/specs.  Alternatively you can
just change the defaults for the specs file to be similar to the -mads
specifications.  That is what I did.  Warning!! The specs file is very picky
about extra newlines.  Make sure there is only one empty line between each
statement in the specs file.

Brendan Simon.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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