Sign in Join

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

Mailing lists / fpc-pascal / 2014-03

FPC for ARMv4

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Jon

Hi

I have a board running Linux - it reports itself as armv4tl:

uname -a
Linux phidgetsbc 3.1.6 #3 PREEMPT Fri Jan 6 13:05:50 MST 2012 armv4tl GNU/Linux

cat /etc/issue
Debian GNU/Linux 6.0 \n \l

After trying and failing to install a cross-compiler on my Linux x64 system, I want to install FPC directly onto the system.

Can you advise the best procedure. After downloading and installing fpc-2.6.2.arm-linux.tar I get errors:

fpc
An unhandled exception occurred at $0000D210 :
EAccessViolation : Access violation
  $0000D210
  $00008374
  $00008B34

An unhandled exception occurred at $0000D210 :
EAccessViolation : Access violation
  $0000D210
  $000133E0

An unhandled exception occurred at $0000D210 :
EAccessViolation : Access violation
  $0000D210
  $000133E0
  $00014604
  $000133E0

An unhandled exception occurred at $0000D210 :
EAccessViolation : Access violation
  $0000D210
  $000133E0
  $00014604
  $000133E0
  $00014604
  $000133E0

...and so on for ever.

The system can compile with gcc, but I loath it and would dearly love to run FPC on it.

Any suggestions welcome.

Many thanks

Reply by email

Jonas Maebe
to Jon
Jon wrote 15 lines
I have a board running Linux - it reports itself as armv4tl: uname -a Linux phidgetsbc 3.1.6 #3 PREEMPT Fri Jan 6 13:05:50 MST 2012 armv4tl GNU/Linux cat /etc/issue Debian GNU/Linux 6.0 \n \l After trying and failing to install a cross-compiler on my Linux x64 system, I want to install FPC directly onto the system. Can you advise the best procedure. After downloading and installing fpc-2.6.2.arm-linux.tar I get errors:

That compiler is probably built for ARMv6, so it's normal that it doesn't work on your system. Additionally, you first have to determine the ABI in use on your system. To do so, run "objdump -p /bin/ls" and have a look at the "private flags" section near the end.

If it contains "EABI", then you have to build an EABI cross-compiler (compile the ARM compiler with -dFPC_ARMEL in the make OPT parameter), otherwise you have to build an old ABI cross-compiler (compile the ARM compiler with no specific parameters in the make OPT parameter, but add -Cfsoft to CROSSOPT to ensure the created native compiler uses software floating point).

Jonas

Reply by email

Sven Barth
to Jonas Maebe
Jonas Maebe wrote 30 lines
On 05 Mar 2014, at 19:41, Jon wrote: > I have a board running Linux - it reports itself as armv4tl: > > uname -a > Linux phidgetsbc 3.1.6 #3 PREEMPT Fri Jan 6 13:05:50 MST 2012 armv4tl > GNU/Linux > > cat /etc/issue > Debian GNU/Linux 6.0 \n \l > > > After trying and failing to install a cross-compiler on my Linux x64 > system, I want to install FPC directly onto the system. > > Can you advise the best procedure. After downloading and installing > fpc-2.6.2.arm-linux.tar I get errors: That compiler is probably built for ARMv6, so it's normal that it doesn't work on your system. Additionally, you first have to determine the ABI in use on your system. To do so, run "objdump -p /bin/ls" and have a look at the "private flags" section near the end. If it contains "EABI", then you have to build an EABI cross-compiler (compile the ARM compiler with -dFPC_ARMEL in the make OPT parameter), otherwise you have to build an old ABI cross-compiler (compile the ARM compiler with no specific parameters in the make OPT parameter, but add -Cfsoft to CROSSOPT to ensure the created native compiler uses software floating point).

According to fpcdefs.inc the default should be EABI since October 2011 (revision 19562). The old ABI needs "FPC_OARM".

Regards,
Sven

Reply by email

Jonas Maebe
to Sven Barth
Sven Barth wrote 8 lines
> If it contains "EABI", then you have to build an EABI cross- > compiler (compile the ARM compiler with -dFPC_ARMEL in the make OPT > parameter), otherwise you have to build an old ABI cross-compiler > (compile the ARM compiler with no specific parameters in the make > OPT parameter, but add -Cfsoft to CROSSOPT to ensure the created > native compiler uses software floating point). According to fpcdefs.inc the default should be EABI since October 2011 (revision 19562). The old ABI needs "FPC_OARM".

You're right, thanks for the correction.

Jonas

Reply by email

Sven Barth
to Jonas Maebe
Jonas Maebe wrote 13 lines
On 07 Mar 2014, at 14:17, Sven Barth wrote: >> If it contains "EABI", then you have to build an EABI cross-compiler >> (compile the ARM compiler with -dFPC_ARMEL in the make OPT >> parameter), otherwise you have to build an old ABI cross-compiler >> (compile the ARM compiler with no specific parameters in the make >> OPT parameter, but add -Cfsoft to CROSSOPT to ensure the created >> native compiler uses software floating point). > According to fpcdefs.inc the default should be EABI since October > 2011 (revision 19562). The old ABI needs "FPC_OARM". You're right, thanks for the correction.

You're welcome. :)

Regards,
Sven

Reply by email

Jon
to Jonas Maebe: That compiler is probably built for ARMv6, so it's normal that it doesn't work on your…
Show quoted text 36 lines
On Friday, 7 March 2014, 11:04, Jonas Maebe wrote: > On 05 Mar 2014, at 19:41, Jon wrote: >  I have a board running Linux - it reports itself as armv4tl: > >   uname -a >  Linux phidgetsbc 3.1.6 #3 PREEMPT Fri Jan 6 13:05:50 MST 2012  >  armv4tl GNU/Linux > >   cat /etc/issue >  Debian GNU/Linux 6.0 \n \l > > >  After trying and failing to install a cross-compiler on my Linux x64  >  system, I want to install FPC directly onto the system. > >  Can you advise the best procedure. After downloading and installing  >  fpc-2.6.2.arm-linux.tar I get errors: That compiler is probably built for ARMv6, so it's normal that it  doesn't work on your system. Additionally, you first have to determine  the ABI in use on your system. To do so, run "objdump -p /bin/ls" and  have a look at the "private flags" section near the end. If it contains "EABI", then you have to build an EABI cross-compiler  (compile the ARM compiler with -dFPC_ARMEL in the make OPT parameter),  otherwise you have to build an old ABI cross-compiler (compile the ARM  compiler with no specific parameters in the make OPT parameter, but  add -Cfsoft to CROSSOPT to ensure the created native compiler uses  software floating point). Jonas

If I understand you correctly, I don't use the prebuilt package but instead use the source package (fpc-2.6.2.source.tar.gz) and build it on the unit itself? Do I need binutils or anything else?

Cross-compiling has always been very difficult for me, I follow the instructions at http://wiki.freepascal.org/Setup_Cross_Compile_For_ARM but is that the best place?

Thanks

Reply by email