This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc cross compiler for "powerpc-eabi"(with out OS)
- From: Kai Ruottu <kai dot ruottu at wippies dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 04 May 2011 14:24:10 +0300
- Subject: Re: gcc cross compiler for "powerpc-eabi"(with out OS)
- References: <4DC11E1C.2090003@cdotb.ernet.in>
4.5.2011 12:36, Thulasi Ramu J kirjoitti:
We want to use GCC for compiling code to a board based on MPC8260
processor.
The code consists of C and assembly languages to initialize processor
and test
the interfaces in the board. There will not be any OS on the board.
We have done the following by selecting target=powerpc-eabi option.
1) Build binutils (binutils-2.21)
2) Build bootstrap gcc (gcc-4.4.1)
3) Build newlib (newlib-1.19.0)
4) Build full gcc
But, we are stuck with implementing __eabi(), __init() and __fini()
functions.
They are in the '*crt*.o' startups and the 'libgcc.a' GCC-helper
library produced during the GCC build and installed as essential
parts of the produced GCC...
Normally we do the following
1. initilize MPC8260 registers (including r1,Stack pointer)
2. Intialize Memory controller and SIU
3. Finally we call main( in C code)
1. We would like to know what is done in __eabi() function which is
included in the main() by default by the compiler as I was getting
undefined reference to __eabi in main function.
The GCC sources, 'gcc-4.4.1/gcc/config/rs6000/eabi.asm', should tell
this...
2. What is the function of __init() in generally which is called by
__eabi() function?
Again, the GCC sources, should tell this. Where, will be left as
homework... The clues are using 'grep' and expecting all the CPU-
dependent config stuff being in the same directory...
3. Similarly, how to implement these functions for my target ? Any
documents or any clues..
I don't think you needing to reinvent the wheel with these...