This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Xiaopeng Gong wrote: > > Hello, Hua, Kai and all , > I am trying to build a cross compiler ( host Red Hat Linux 6.2, target > embed powerpc with cpu type 603, embed os MQX ) > > I have successfully built the cross gcc and g++. try to compile the simple > hello world program > > # include <iostream.h> > > int main( int argc, char * argv[] ) > { > cout << "Hello World " << endl; > } > > powerpc-unknown-eabi-g++ -msim hello.cpp can generate executable code > without any complaint. > howerver when I try to generate code for the real target by issuing the > command > powerpc-unknown-eabi-g++ -mcpu=603 hello.cpp, I got the following error > message. What am I missing? I do not have the correct crt0.o? or I did > not link with some OS library? You will need a proper linker script, startup routine and glue library for MQX. I don't know anything about MQX so it is your homework. However the board-support packages in the newlib sources, in 'libgloss/rs6000' for MBX, MVME, ADS and Yellowknife boards, the generic 'crt0.S' there etc. should help a lot. More board-support stuff could be found in the Cygnus/RedHat eCos sources, in the Oarcorp's RTEMS sources (www.oarcorp.com) and in the Cygnus/RedHat EDK (ftp.redhat.com/pub/redhat/edk) sources, and so on... For instance the eCos and EDK bring support for some Cogent PPC-boards like: ----------------------------- clip ---------------------------------------------- /* * init_cma101.S -- Initialization for Cogent Computer Systems CMA286 MPC860/821 Module * * Copyright (c) 1998, 1999 Cygnus Support * * The authors hereby grant permission to use, copy, modify, distribute, * and license this software and its documentation for any purpose, provided * that existing copyright notices are retained in all copies and that this * notice is included verbatim in any distributions. No written agreement, * license, or royalty fee is required for any of the authorized uses. * Modifications to this software may be copyrighted by their authors * and need not follow the licensing terms described here, provided that * the new terms are clearly indicated on the first page of each file where * they apply. */ ----------------------------- clip ---------------------------------------------- and for the IBM EVB 403 board... Basically you should implement the low-level I/O-functions, 'read()', 'write()', 'open()', 'close()', 'lseek()' etc. and some memory-handling routines, 'sbrk()', for the MQX, unless you will find them somewhere already done. Cheers, Kai ------ 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] |