FW: Help with crossgcc and an embedded system!

Vincent Rubiolo vincent.rubiolo@st.com
Thu Jun 12 14:38:00 GMT 2003


Linker script and ctr0 pb.
Read on Bill's instructions to reach the FAQ. It is explained inside.
I also think that since you are using embedded systems, you may provide your own linker script to 
fully control what happens.

Good luck in your experiments,

Vincent

murphyn@microsense.co.uk wrote:

> Hi Vincent,
> 
> 	Thanks that done it lovely! I'll have to write myself a script just incase 
> I need to do it again. Just one small problem though
> 
>  Built a simple file, pretty boring really, countGPIO.c
> 
> 
>  But got some problems......
> 
> 
>  I know _start is the first op code(low level) to be executed, this is part 
> of crt0.o I think. __main must be the start of the main executable C 
> program. Any ideas, probably just forgot to include something?
> 
>  Thanks
> 
>  Nigel.
> 
> PS Vincent - I must give you a double thankyou, thanks for your time.
> 
> 
> 
> 
> -----Original Message-----
> From:	Vincent Rubiolo [SMTP:vincent.rubiolo@st.com]
> Sent:	12 June 2003 13:24
> To:	murphyn@microsense.co.uk
> Subject:	Re: FW: Help with crossgcc and an embedded system!
> 
> Yo,
> 
> 
>>Vincent,
>>
>> This is how i done it.
>>
>>cd
>>mkdir build-crossgcc && cd build-crossgcc
>>
>> (I then copied in the tarballs using Xwindows to build-crossgcc 
> 
> directory)
> 
>>mkdir build-binutils
>>mkdir build-gcc
>>mkdir build-newlib
>>export TARGET=i486-none-elf
> 
> A short point. Where did you get that target? If i look at the 
> configuration page in gcc dir, I
> can't find it (gcc-3.3/gcc/doc/configure.html)
> 
> 
>>export PREFIX=/usr/local
>>export PATH=${PERFIX}/bin:${PATH}
>>
>> (I Then decompressed the tarballs in xwindows instead of using 'tar xzvf 
>>....' )
> 
> I suppose you mean with a graphical tool such as fileroller (gnome) or arc 
> (kde)
> 
> 
>>cd build-binutils../binutils-2.13/configure --target=$TARGET
>>--prefix=$PREFIX
>>make all install 2>&1 | tee make.log
>>cd ..
>>cd build-gcc
> 
> BEGIN OF CHANGE 1 (see below)
> 
>>../gcc-3.3/configure --target=$TARGET --prefix=$PREFIX --with-newlib
>>--without-headers --with-gnu-as --with-gnu-ld --disable-shared
>>--enable-languages=c
>>make all-gcc install-gcc 2>&1 | tee make.log
> 
> END OF CHANGE 1
> 
>>cd..
>>cd build-newlib
>>../newlib-1.11.0/configure --target=$TARGET --prefix=$PREFIX
>>make all install 2>&1 | tee make.log
>>cd..
> 
> BEGIN OF CHANGE 2
> 
>>cd build-gcc && rm -rf *
>>../gcc-3.3/configure --target=$TARGET --prefix=$PREFIX --with-gnu-as
>>--with-bnu-ld --enable-languages=c,c++
> 
> Typo     ^          . I supppose you typed right on the command line
>           |
>         here
> 
> END OF CHANGE 2
> 
> 
>>make all install 2>&1 | tee make.log
>>
>> I'll try and find what happen to sed.
>>
>> Nigel.
> 
> 
> Here is my suggestion. Instead of doing a two-pass configure, replace the 
> two change blocks by the
> following (modify PATH_OF_NEWLIB to suit your needs)
> CHANGE 1
>   ../gcc-3.3/configure --target=$TARGET --prefix=$PREFIX --with-newlib
>   --with-headers=PATH_OF_NEWLIB/newlib/libc/include --with-gnu-as 
> --with-gnu-ld --disable-shared
>   --enable-languages=c,c++
>   make all-gcc install-gcc 2>&1 | tee make.log
> END OF CHANGE 1
> 
> CHANGE 2
> cd build-gcc
> make all install 2>&1 | tee make.log
> END OF CHANGE 2
> 
> 
> This copies the headers of newlib in gcc dir and do the build straight 
> ahead. The second pass (with
> no configure) just builds what remains to be built (mainly libraries) after 
> newlib has been set up.
> BE WARNED: this may lead to not-working tools. They do work for me, but I 
> have not tested things
> such as c++ nor run the dejagnu testsuite on it
> 
> This my own recipe, hopes that helps. Tell me if it works for you
> 
> Regards,
> Vincent
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________


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



More information about the crossgcc mailing list