-   Linux - Newbie (
-   -   Trouble with gcc compiler on arm platform (

meda75 03-04-2009 10:04 AM

Trouble with gcc compiler on arm platform
Hello . I am new with linux and of course I have lot questions .
I working on arm based platform .
/home/tools $ uname -a
Linux sbc9261 2.6.24 #28 Thu Dec 25 15:08:43 CST 2008 armv5tejl unknown
Can someone tell me can I install gcc on this ?. I have unpack gcc with
tar -xvjf arm-linux-gcc-3.4.5-glibc-2.3.6-linux.tar.bz2 -C / as it mentioned in manual and I am set PATH to proper value (export PATH=/usr/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux/bin/:$PATH) but wen i try to compile something or just type arm-linux-gcc -v response is something like :
Syntax error: "(" unexpected
Am I need crosstool ? or something else . Help me please :)

ciotog 03-10-2009 11:00 PM

I don't think arm-linux-gcc is what you want, it's used to compile code on an i386 machine that will run on an arm. In other words it's a cross-compiler.

I would recommend using the gcc that's distributed with debian, compiled to run on an arm platform (here, for instance), or use arm-linux-gcc to cross-compile code on another i386 PC and copy the compiled binaries over to the ARM machine.

meda75 03-11-2009 04:03 AM

arm linux gcc
Thanks for answer:) I have already realize that :) Now I Am install arm-linux-gcc on Host PC and share rootfs with my arm controller via NFS ( mounted on Host PC ) . I should compile my source on host machine ( of course with arm compiler ) but he will be placed on controller . For executing I could use telnet ( unfortunately I do not know yet how to configure telnetd to work ) or ssh or rsh .? Debugging will be really hard job but I don't have much choice :)

Suresh Maniyath 03-11-2009 04:21 AM

Don't know you have a serial port on your board. If you have one, then you will be able to get a console over there with hyperterminal, teraterm or minicom etc.


ciotog 03-11-2009 07:06 AM

If you're using NFS to mount the rootfs on the controller, then you would just have to place the binary in the rootfs for the controller to use it. If you want to permanently install it on the controller then it really depends on how it's currently configured.

I presume it's this board?

Or is it this one?

meda75 03-14-2009 09:56 AM

gcc issue
10x again :) my board (from uname -a) is sbc9261 . Weli I Have serial port and i could access to arm ,thats no doubt . Just i want to found best way to develop my own application ( in C ) . Is it to use NFS with mount rfs or just to compile my application on Host PC with arm gcc and make some script to automaticaly trensfer .out to controler ( via wget trough ethernet port for instance ? ) and watch wats happening on minocom ? What's your opinion and expirience ?


ciotog 03-14-2009 11:51 AM

The second field of uname is just the hostname, so you could make it be anything you want. If you have wget available on the board then that's a reasonable thing to use to transfer compiled applications over, although you would need to have a web server on the host. Personally I use scp, but that requires an sshd on the target board that supports scp. I've also used tftp but there are similar limitations as wget (you need a tftpd to transfer the application) although it's usually included in a build of busybox, assuming that's what's on the board.

Anyway there are too many unknowns to really answer your questions easily, without doing a bunch of research into the board you're using. If you provided more direct information about its capabilities then it would be easier to give recommendations.

You would most certainly want to cross-compile on the host. For one thing it will be much faster. You can use something like scratchbox, or use crosstool. Or Wolfgang Denk's ELDK (which uses crosstool).

All times are GMT -5. The time now is 11:46 AM.