Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2008-05

FreePascal on ARM Linux ,SoftFloat and EABI issues

9 messages · 7 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Nataraj S Narayan

Hi Florian and other friends

I am involved in porting existing C code to Arm Linux for AT91SAM9263 Ek board with 340x220 display. I need to write lots of console kinda apps.

I am using a "qemu-system-arm" emulated Armel Debian machine on a

Debian x86 Lenny distro for writing code. I installed fpc-2.2.0.arm-linux.tar on the emulated linux.
Which compiling a simple helloworld.pas , i get the classic error of System.o being EABI 0 while target is EABI 4.

I have got the svn download of fpc, and trying to compile it in the emulated machine for ARM for the past 2 days. I have given :-

make clean all ARCH=arm OPT="-CfSoft".

Its compiling for quite long and finally comes to rest endlessly while

compiling system.pp.

Let me remind you that i am dont use a Cross compiler, but an emulated Arm machine.

My boss and colleagues are 'C only' programmers . Doing all kinda harware access for embedded devices using C. They have developed pretty

good & successful apps using pure C without an OS. What i have been trying is to convice them to use Freepascal for the Application part, which is presently console Apps. The next stage is to develop X apps

using Lazarus. But for these I need to get FPC working.

Please help.

regards

Nataraj

Reply by email

Yury Sidorov
to Nataraj S Narayan

From: Nataraj S Narayan

Show quoted text 17 lines
Hi Florian and other friends I am involved in porting existing C code to Arm Linux for AT91SAM9263 Ek board with 340x220 display. I need to write lots of console kinda apps. I am using a "qemu-system-arm" emulated Armel Debian machine on a Debian x86 Lenny distro for writing code. I installed fpc-2.2.0.arm-linux.tar on the emulated linux.Which compiling a simple helloworld.pas , i get the classic error of System.o being EABI 0 while target is EABI 4. I have got the svn download of fpc, and trying to compile it in the emulated machine for ARM for the past 2 days. I have given :-make clean all ARCH=arm OPT="-CfSoft".Its compiling for quite long and finally comes to rest endlessly while compiling system.pp.Let me remind you that i am dont use a Cross compiler, but an emulated Arm machine.

Try to crosscompile fpc 2.2.1 or 2.3.1 compiler binary and then use this binary as starting compiler on arm machine.

Yury.

Reply by email

Luca Olivetti
to Yury Sidorov

En/na Yury Sidorov ha escrit:

Try to crosscompile fpc 2.2.1 or 2.3.1 compiler binary and then use this binary as starting compiler on arm machine.

In my case, before trying to compile using the native 2.2.0, I tried crosscompiling from linux/i386, but:

$ make all install CPU_TARGET=arm
CROSSBINDIR=/scratchbox/compilers/cs2005q3.2-glibc2.5-arm/bin BINUTILSPREFIX=arm-linux- CPU_T CROSSOPT='-CfSOFT -darm -dFPC-ARMEL -gl' Makefile:129: *** Compiler ppcrossarm not found. Stop.

Bye

Luca

Reply by email

Jonas Maebe
to Luca Olivetti
Luca Olivetti wrote 12 lines
En/na Yury Sidorov ha escrit: > Try to crosscompile fpc 2.2.1 or 2.3.1 compiler binary and then use > this binary as starting compiler on arm machine. In my case, before trying to compile using the native 2.2.0, I tried crosscompiling from linux/i386, but: $ make all install CPU_TARGET=arm CROSSBINDIR=/scratchbox/compilers/ cs2005q3.2-glibc2.5-arm/bin BINUTILSPREFIX=arm-linux- CPU_T CROSSOPT='-CfSOFT -darm -dFPC-ARMEL -gl' Makefile:129: *** Compiler ppcrossarm not found. Stop.

Add

FPC=/full/path/to/ppc386-2.2.1 (or 2.3.1, depending on which version you are trying to compiler for ARM; in any case, make sure you use the same version of ppc386 as starting compiler)

Jonas

Reply by email

Michael Schnell
to Nataraj S Narayan: Hi Florian and other friends I am involved in porting existing C code to Arm Linux for…
Let me remind you that i am dont use a Cross compiler, but an emulated Arm machine.

That is "interesting", but is it really useful ? Cross-compiling seems more "standard". In this forum there seem to be several ARM-CE-users, but ARM-Linux seems not to be very common right now. I'm very interested in that as (not before next year) I might be starting a Cross-Linux project.

The next stage is to develop X apps using Lazarus. But for these I need to get FPC working.

Do you really want to run Lazarus on the ARM-system ?

While this _should_ be possible somehow, It might be quite slow compared to what can be done on a PC with cross-compiling.

Moreover I have no idea how well gdb might work in such an environment (gdb-user interface in the ARM target) Using cross-gdb from a PC onto the arm device via Ethernet seems the more user-friendly (and more "standard").

Please let us know how you proceed with this interesting stuff.

-Michael

Reply by email

Luca Olivetti
to Michael Schnell
Michael Schnell wrote 6 lines
> Let me remind you that i am dont use a Cross compiler, but an emulated > Arm machine. > That is "interesting", but is it really useful ? Cross-compiling seems more "standard".

But it has its own set of problems. I'm not really dedicated enough, but I never managed to cross-compile complex projects (by "complex" I mean "with various dependencies on external libraries"). Native is so much easier....once you get the ball rolling (but then the same could be said for cross-compiling)
Anyway, it seems that an emulated arm machine, while slower than cross-compiling, is faster than the real arm hardware.

Bye

Luca

Reply by email

Marco van de Voort
to Luca Olivetti
Show quoted text 16 lines
Michael Schnell escribi?: > >> Let me remind you that i am dont use a Cross compiler, but an emulated >> Arm machine. >> > That is "interesting", but is it really useful ? Cross-compiling seems > more "standard". But it has its own set of problems. I'm not really dedicated enough, but I never managed to cross-compile complex projects (by "complex" I mean "with various dependencies on external libraries"). Native is so much easier....once you get the ball rolling (but then the same could be said for cross-compiling) Anyway, it seems that an emulated arm machine, while slower than cross-compiling, is faster than the real arm hardware.

It is possible, and in the buildfaq there is an example (lazarus from windows to linux).

Note that crosscompiling is not free of problems anyway. Sometimes the binaries simply don't work, I always blamed it on the cross binutils though.

Reply by email

Michael Schnell
to Luca Olivetti: But it has its own set of problems. I'm not really dedicated enough, but I never managed…
Show quoted text 7 lines
But it has its own set of problems. I'm not really dedicated enough, but I never managed to cross-compile complex projects (by "complex" I mean "with various dependencies on external libraries"). Native is so much easier....once you get the ball rolling (but then the same could be said for cross-compiling) Anyway, it seems that an emulated arm machine, while slower than cross-compiling, is faster than the real arm hardware.

I just assume that when trying to make FP and GDB and Lazarus run natively on ARM you are on your own, while cross compiling for ARM-Linux is a supported option on Lazarus and thus the "powers than be" should be interested on helping you top make it work perfectly. It's a mixture of "ARM-CE" (i.e. the compiler, which already seems to work quite well) and native Linux (the libraries, which do work nicely).

-Michael

Reply by email

Mark Morgan Lloyd
to Michael Schnell: That is "interesting", but is it really useful ? Cross-compiling seems more "standard".…
Michael Schnell wrote 6 lines
> The next stage is to develop X apps using Lazarus. But for these I > need to get FPC working. Do you really want to run Lazarus on the ARM-system ? While this _should_ be possible somehow, It might be quite slow compared to what can be done on a PC with cross-compiling.

Lazarus 0.9.27 runs on an ARM system based on Debian "Etch" without significant problems and adequately fast. The key is to use something like FluxBox rather than KDE.

I was tempted to post this using Mozilla running on an ARM system, but hopefully I don't need to go to that extreme to make the point that ARM is a viable development host as well as a target.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email