Reply by Ulf Samuelsson September 11, 20072007-09-11
"Meindert Sprang" <ms@NOJUNKcustomORSPAMware.nl> skrev i meddelandet 
news:46dfe553$0$28845$e4fe514c@dreader26.news.xs4all.nl...
> "Adrian" <adrianbica@yahoo.com> wrote in message > news:1189016361.576512.66130@k79g2000hse.googlegroups.com... >> Can you summarize what where your steps? It is hard to answer without >> knowing what you did. I suspect one step is missing > > The following script is used, which I got from someone who uses this to > rebuild his toolchain and is known to work: >
If you download buildroot from "buildroot.uclibc.org" you can easily create a cross compiler. By doing make menuconfig you get a menu where you can select architecture (arm) gcc (up to 4.2.1) binutils (normally 2.17) Needs to be run under Linux .... -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
Reply by Meindert Sprang September 11, 20072007-09-11
"David Brown" <david@westcontrol.removethisbit.com> wrote in message
news:46e11d96$0$27822$8404b019@news.wineasy.se...
> Otherwise, make sure your steps are: > > 0) Unpack and configure the tarballs > 1) Build and install binutils (and make sure it is on your path!) > 2) Build the bootstrap compiler > 3) Build the library > 4) Build the main compiler > > (The bootstrap step is apparently not needed for newer gcc versions, but > it is certainly part of a 3.2 build.)
Thanks for this David and thanks to all others (especially Adrian for his script) for your tips. I managed to get a working compiler again! Meindert
Reply by CBFalconer September 7, 20072007-09-07
Meindert Sprang wrote:
> "42Bastian Schick" <bastian42@yahoo.com> wrote in message > >> Why don't you use one of the pre-compiled GCC for ARM ? > > Because for some obscure reason, when I compile the code with a > more recent version of GCC (3.4.3 for instance), the application > behaves strange and when it is compiled with 3.2.1, everything > runs ok. But I cannot find a precompiled 3.2.1 version.
Sounds as if you should be looking at the source you are compiling, rather than the compiler. Later gccs are more likely to expose errors. -- Chuck F (cbfalconer at maineline dot net) Available for consulting/temporary embedded and systems. <http://cbfalconer.home.att.net> -- Posted via a free Usenet account from http://www.teranews.com
Reply by David Brown September 7, 20072007-09-07
Meindert Sprang wrote:
> Hi all, > > I am trying to build an ARM-GCC toochain. I followed the instructions from > the gcc.gnu.org site but end up with errors during assembly of > lib1funcs.asm. Already the first line produces an error caused by the > comment character '@'. So I suspect the wrong assembler is called during the > build process. > Any clues how to solve this? > > My native GCC version on the Linux box is 3.4.6 and I'm trying to build a > cross compiler from the 3.2.1 sources. > > Meindert > >
Since you are looking for older versions, you might find a matching binary on the CodeSourcery website - they have been producing ready-to-run binaries for gcc for ARM and ColdFire for years (they are the official maintainers). Their versions don't necessarily match directly with the official FSF gcc tree, however - for any given version the front and middle ends will pretty much match those of the official gcc tree, while the back end will be significantly ahead (since they are the people improving on the back end, and it takes time for those changes to get fully integrated into the FSF tree). http://www.codesourcery.com/gnu_toolchains/arm/releases.html Otherwise, make sure your steps are: 0) Unpack and configure the tarballs 1) Build and install binutils (and make sure it is on your path!) 2) Build the bootstrap compiler 3) Build the library 4) Build the main compiler (The bootstrap step is apparently not needed for newer gcc versions, but it is certainly part of a 3.2 build.) My guess is that you haven't got binutils installed properly, or it is not on your path. mvh., David
Reply by Meindert Sprang September 7, 20072007-09-07
"42Bastian Schick" <bastian42@yahoo.com> wrote in message
news:46e0df58.339475489@news.individual.de...
> Why don't you use one of the pre-compiled GCC for ARM ?
Because for some obscure reason, when I compile the code with a more recent version of GCC (3.4.3 for instance), the application behaves strange and when it is compiled with 3.2.1, everything runs ok. But I cannot find a precompiled 3.2.1 version.
> (Or tell whoever made you into this that the commercial compilers > produce better (tighter) code for ARM.)
I'm afraid it is not an option to switch compiler now. Too much work, too little time. Meindert
Reply by 42Bastian Schick September 7, 20072007-09-07
On Thu, 6 Sep 2007 15:57:22 +0200, "Meindert Sprang"
<ms@NOJUNKcustomORSPAMware.nl> wrote:

>"Meindert Sprang" <ms@NOJUNKcustomORSPAMware.nl> wrote in message >news:46e005ed$0$20418$e4fe514c@dreader25.news.xs4all.nl... >> I thought about that too. But I am not sure. The specified target >directory >> (/usr/local/arm) remained empty so I just ran "make install" in the >binutils >> directory and now I get some files in /usr/local/asm. I'll try and build >the >> compiler again now. > >Great. Now the error messages are gone, but the process stops with an >"internal compiler error"... >These are the moments I really start hating free software for commercial >jobs...This whole excersise has already cost me more time and money that >scheduled for this job.
Why don't you use one of the pre-compiled GCC for ARM ? (Or tell whoever made you into this that the commercial compilers produce better (tighter) code for ARM.) -- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@monlynx.de instead !
Reply by 42Bastian Schick September 7, 20072007-09-07
On Tue, 4 Sep 2007 15:05:07 +0000 (UTC), Guillaume Chevillot
<Guillaume.nospam@chevillot.nospam.net> wrote:

>> I am trying to build an ARM-GCC toochain. I followed the instructions from >> the gcc.gnu.org site but end up with errors during assembly of >> lib1funcs.asm. Already the first line produces an error caused by the >> comment character '@'. So I suspect the wrong assembler is called during the >> build process. >> Any clues how to solve this? >The syntax of assembler file are dependent of the assembler. >For example, in the GNU assembler comments begin by a ';' and not a >'@'
No ";" means end of command. This is valid sequenz with three commands: nop; nop; add r0,r0,r1 BTW: "@" is not always the start of the comment, it depends highly on target cpu. -- 42Bastian Do not email to bastian42@yahoo.com, it's a spam-only account :-) Use <same-name>@monlynx.de instead !
Reply by Anton Erasmus September 6, 20072007-09-06
On Thu, 6 Sep 2007 15:57:22 +0200, "Meindert Sprang"
<ms@NOJUNKcustomORSPAMware.nl> wrote:

>"Meindert Sprang" <ms@NOJUNKcustomORSPAMware.nl> wrote in message >news:46e005ed$0$20418$e4fe514c@dreader25.news.xs4all.nl... >> I thought about that too. But I am not sure. The specified target >directory >> (/usr/local/arm) remained empty so I just ran "make install" in the >binutils >> directory and now I get some files in /usr/local/asm. I'll try and build >the >> compiler again now. > >Great. Now the error messages are gone, but the process stops with an >"internal compiler error"... >These are the moments I really start hating free software for commercial >jobs...This whole excersise has already cost me more time and money that >scheduled for this job.
Look at http://rod.info/ARM7Micro for a very nice script to build arm-elf-gcc. You can also download the particular version and patches for which the script was written from this site. I have used this script to compile gcc 4.2.0 on FC5. Regards Anton Erasmus
Reply by Adrian September 6, 20072007-09-06
On Sep 6, 10:23 am, "Meindert Sprang" <m...@NOJUNKcustomORSPAMware.nl>
wrote:
> "Adrian" <adrianb...@yahoo.com> wrote in message > > news:1189085774.690692.56980@y42g2000hsy.googlegroups.com... > > > ------------------------------------------------------------- > > You should initially build a bootstrap gcc: > > ../gcc-$GCC_VER/configure --target=$TARGET --enable-languages=c --with- > > newlib \ > > --prefix=$PREFIX --with-gnu-as --with-gnu-ld --disable-shared -- > > without-headers \ > > --with-local-prefix=${PREFIX}/${TARGET} > > > make all-gcc install-gcc > > And the above ends with an error message: arm-elf-ar: Command not found. > > Meindert
That should be easy! Do you have the arm-elf-ar file in ${PREFIX}/bin? Do a "ls ${PREFIX}/bin" Does your PATH include ${PREFIX}/bin? (echo ${PATH})
Reply by Meindert Sprang September 6, 20072007-09-06
"Adrian" <adrianbica@yahoo.com> wrote in message
news:1189085774.690692.56980@y42g2000hsy.googlegroups.com...
> ------------------------------------------------------------- > You should initially build a bootstrap gcc: > ../gcc-$GCC_VER/configure --target=$TARGET --enable-languages=c --with- > newlib \ > --prefix=$PREFIX --with-gnu-as --with-gnu-ld --disable-shared -- > without-headers \ > --with-local-prefix=${PREFIX}/${TARGET} > > make all-gcc install-gcc
And the above ends with an error message: arm-elf-ar: Command not found. Meindert