Cross Compile with FPC for ARM

Overview

edit

These instructions cover cross compiling to Linux on ARM. See arm-wince for instructions on cross-compiling to Windows CE on ARM.

Cross compile with FPC for ARM (e.g. Zaurus)

edit
cd somedir
tar zxvf arm-linux-fpc.i386-linux-20050217.tar.gz
mkdir -p /usr/local/lib/fpc/1.9.7/units
cp -fr lib/fpc/1.9.7/units/arm-linux /usr/local/lib/fpc/1.9.7/units/
cp lib/fpc/1.9.7/ppcarm /usr/local/lib/fpc/1.9.7
ln -sf /usr/local/lib/fpc/1.9.7/ppcarm /usr/local/bin/ppcarm
ppcarm -iV
cd somedir
tar zxvf binutils.tar.gz
cp arm-linux-* /usr/local/bin
echo "program hello; begin writeln('Hello World'); end." > hello.pas
ppcarm -XParm-linux- hello.pas
# ppcarm -XParm-linux- hello.pas
Free Pascal Compiler version 1.9.7 [2005/02/17] for arm
Copyright (c) 1993-2005 by Florian Klaempfl
Target OS: Linux for ARM
Compiling hello.pas
Assembling hello
Linking hello
1 Lines compiled, 0.2 sec
scp hello zaurus:/home/zaurus
./hello
Hello World