Page 1 of 1

Gcc compiler for linux ARM architecture

Posted: 21 Oct 2012, 08:59
by crashman
Hello

I need create application for linux with arm7 procesor and 2.4.21 kernel , i download toolchain from gnuarm.com but all application not work only see segmentation fault :wall:

any Ideas are welcome !

Re: Gcc compiler for linux ARM architecture

Posted: 21 Oct 2012, 11:27
by Hamza
Try to compile with an ARM cpu ?

Re: Gcc compiler for linux ARM architecture

Posted: 21 Oct 2012, 11:43
by wread
The gnuarm toolchain includes a debugger, why don't you use it?
I understand your environment should be 64-bits.....

Re: Gcc compiler for linux ARM architecture

Posted: 21 Oct 2012, 15:59
by crashman
Hamza wrote:Try to compile with an ARM cpu ?
Yes i compile with -mcpu=armv7tdmi flag.

@wread

I don't like debuggers, environment is for 32 bit architecture.

Create it simple application in latest codetyphoon for linux and arm procesors but see the same bug segmentation fault maybe kernel 2.4.21 and glibc 2.2.3 is too old ?

Re: Gcc compiler for linux ARM architecture

Posted: 21 Oct 2012, 16:23
by wread
I think gnuarm is for 64-bit architecture; deshalb your segfaults!

Re: Gcc compiler for linux ARM architecture

Posted: 23 Oct 2012, 19:24
by Ahau
Hi crashman,

Looking over the gnuarm download page, I see toolchains for gcc up to version 4.1 (released in 2006), but porteus 1 uses gcc version 4.5, so perhaps this is part of the issue. If you downloaded binaries that use much older versions of dependencies as well, that could add to the problems.

When I was working on ARM, I used the Codesourcery Codebench toolchain -- I'm not positive this is the appropriate link, but here is one: http://www.mentor.com/embedded-software ... e-edition/

I'm stuck in windows at the moment and my toolchain and instructions for use are on my ext4 partition. I'll grab some more info for you and post it later today or tomorrow. I might even have some useable modules.

Re: Gcc compiler for linux ARM architecture

Posted: 24 Oct 2012, 06:11
by Ahau
Ok -- I am using this file from sourcery codebench lite:
arm-2010q1-188-arm-none-eabi-i686-pc-linux-gnu.tar.bz2

It works for me on Porteus 1.2 32-bit.

You have to sign up on their website and give them your email address, and the package is not GPL compliant, they have proprietary software in there.

go to this link: http://www.mentor.com/embedded-software ... e-edition/

look under 'ARM processors' and then, I'm not sure if it's the 'GNU/Linux' or 'EABI' release, but you'll click on one of those, then you'll have to give them your email address and create a password, then they send you a download link via email and you can sort through the releases. I had trouble with newer releases, which is why I went with the 2010q1-188 version.

I simply extracted that file to a location on my hard disk (/mnt/sdb2/arm/codesourcery), and then ran these commands:

Code: Select all

export PATH=/mnt/sdb2/arm/codesourcery/arm-2010q1/bin:$PATH
export ARCH=arm
export CROSS_COMPILE=/mnt/sdb2/arm/codesourcery/arm-2010q1/bin/arm-none-eabi-
Then I compiled the software as usual.

I hope that helps, let me know if it doesn't :)

Re: Gcc compiler for linux ARM architecture

Posted: 24 Oct 2012, 08:17
by crashman
Hi Ahau

Thanks for the reply I will know if it works!

regards

EDIT://

For this moment downloaded binaries for windows create application run and..."cannot execute binary file"

Machine specyfication:

CPU: ARM7
Memory: 16MB RAM,
8 MB FLASH
Linux with kerrnel 2.4.21
Glibc-2.2.3

Low memory create segmentation fault but i am download other crosscompiler with gcc-2.95.3 and glibc-2.2.3 create apps wih him and show other bug:

Inconsistency detected by ld.so: dynamic-link.h: 62: elf_get_dynamic_info: Assertion `! "bad dynamic tag"' failed!

this is bug with glibc<2.3 and linker ld.so --- you can go crazy :crazy:

Re: Gcc compiler for linux ARM architecture

Posted: 25 Oct 2012, 07:41
by crashman
up

Re: Gcc compiler for linux ARM architecture

Posted: 25 Oct 2012, 17:00
by Ahau
Hi crashman,
"For this moment downloaded binaries for windows create application run and..."cannot execute binary file"
So I understand better -- You downloaded Windows binaries for codesourcery codebench, and got the "cannot execute binary file" error when you tried to run it in Linux?

If you like, since I have a working toolchain on my system (granted, it may not be the right toolchain for what you're trying to do), you could bundle your source code, post it online, and I will download it and try to compile it on my system. If it works, I can send you the binaries back, and also work on getting the toolchain to work the same on your system so you can recompile as needed.

Another option might be to install an older version of Slackware that would have a matching version of glibc and gcc.

Re: Gcc compiler for linux ARM architecture

Posted: 25 Oct 2012, 22:01
by crashman
Ahau wrote: So I understand better -- You downloaded Windows binaries for codesourcery codebench, and got the "cannot execute binary file" error when you tried to run it in Linux?
Yes i downloaded crosscompiler for windows os but target executable file is for ARM machine .
Ahau wrote: Another option might be to install an older version of Slackware that would have a matching version of glibc and gcc.
Is not possible, very incompatible files i testing gzip under remote machine and doesn't work.

Unfortunately, the network but it is difficult to find a ready-made solution for kernel 2.4
Ahau wrote: If you like, since I have a working toolchain on my system (granted, it may not be the right toolchain for what you're trying to do), you could bundle your source code, post it online, and I will download it and try to compile it on my system
I do not know if my client on the go :unknown: let you know if my client agree.

Thank you for help me.