Gcc compiler for linux ARM architecture

If you are looking for a specific 32-bit package and you can't find it in any of the 32-bit repos, please post a request for it here.
Post Reply
crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Gcc compiler for linux ARM architecture

Post#1 by crashman » 21 Oct 2012, 08:59

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 !

User avatar
Hamza
Warlord
Warlord
Posts: 1847
Joined: 28 Dec 2010, 07:41
Distribution: Porteus
Location: France

Re: Gcc compiler for linux ARM architecture

Post#2 by Hamza » 21 Oct 2012, 11:27

Try to compile with an ARM cpu ?
NjVFQzY2Rg==

User avatar
wread
Module Guard
Module Guard
Posts: 1097
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Gcc compiler for linux ARM architecture

Post#3 by wread » 21 Oct 2012, 11:43

The gnuarm toolchain includes a debugger, why don't you use it?
I understand your environment should be 64-bits.....
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: Gcc compiler for linux ARM architecture

Post#4 by crashman » 21 Oct 2012, 15:59

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 ?

User avatar
wread
Module Guard
Module Guard
Posts: 1097
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Gcc compiler for linux ARM architecture

Post#5 by wread » 21 Oct 2012, 16:23

I think gnuarm is for 64-bit architecture; deshalb your segfaults!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Gcc compiler for linux ARM architecture

Post#6 by Ahau » 23 Oct 2012, 19:24

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.
Please take a look at our online documentation, here. Suggestions are welcome!

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Gcc compiler for linux ARM architecture

Post#7 by Ahau » 24 Oct 2012, 06:11

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 :)
Please take a look at our online documentation, here. Suggestions are welcome!

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: Gcc compiler for linux ARM architecture

Post#8 by crashman » 24 Oct 2012, 08:17

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:

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: Gcc compiler for linux ARM architecture

Post#9 by crashman » 25 Oct 2012, 07:41

up

User avatar
Ahau
King of Docs
King of Docs
Posts: 1331
Joined: 28 Dec 2010, 15:18
Distribution: LXDE & Xfce 32/64-bit
Location: USA

Re: Gcc compiler for linux ARM architecture

Post#10 by Ahau » 25 Oct 2012, 17:00

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.
Please take a look at our online documentation, here. Suggestions are welcome!

crashman
Contributor
Contributor
Posts: 118
Joined: 28 Dec 2010, 17:03
Location: Poland

Re: Gcc compiler for linux ARM architecture

Post#11 by crashman » 25 Oct 2012, 22:01

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.

Post Reply