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]
Other format: [Raw text]

RE: FW: Help with crossgcc and an embedded system!


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
________________________________________________________________________

begin 600 countGPIO.c
M(VEN8VQU9&4@/"]H;VUE+TUU<D8O:6]N;2YH/@II;G0);6%I;BAI;G0@87)G
M8RP@8VAA<BH@87)G=EM=*0I["@H*"6EN= EX.PH):6YT"7H["@H)=VAI;&4@
M*#$I"@E["0H)( H*"0D@9F]R("AX/3 [('@\,'AF9CL@>"LK*0H)"2!["@D)
M"7H]/7HK>#L)"@D)('T*"@H)?0H@(" *(" @(" @("!R971U<FX["GT*"@H*
0"@H*"@H*"@H*"@H*"@H*"@H)
`
end

begin 600 test1.log
M6TUU<D9 ;&]C86QH;W-T(&9L87-H1U!)3SA=)"!I-#@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375R1D!L;V-A;&AO<W0@9FQA<VA'4$E/.%TD"F0@
`
end


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


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