Compiling ZGE for linux ARM / aarch64
Posted: Thu Apr 15, 2021 11:16 pm
Today I was planning to run ZGE on RG351P, which is a great little console running under ARKOS, a linux for ARM. Perfect for emulation and homebrews.
And so I managed to cross compile FPC arm-linux from x86_64-linux. Quite easily in fact. I think I'm getting good at this
I noted everything to make a great tutorial afterwards.
I tested a simple Pascal program to verify it is running on the console, and it is! Everything is running smoothly until now.
Then I started cross compiling ZzDC.dpr using :
/usr/local/lib/fpc/3.3.1/ppcrossarm -al -XXis -O2 -dZZDC_SDL -dMINIMAL -FU./Build/arm-linux/obj/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/pthreads/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/fcl-base/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/paszlib/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/hash/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/rtl-objpas/ -Tlinux -Parm -XParm-linux- -B -Mdelphi -FE./Build/arm-linux ZzDC.dpr
But I'm getting errors with the assembly inside ZExpressions.pas :
ZExpressions.pas(2504,5) Error: Unrecognized opcode call
ZExpressions.pas(2504,10) Error: Assembler syntax error
ZExpressions.pas(2506,16) Error: Unknown identifier "EAX"
ZExpressions.pas(2514,14) Error: Unknown identifier "ESP"
ZExpressions.pas(2529,7) Error: Unrecognized opcode fstp
ZExpressions.pas(2529,12) Error: Assembler syntax error
ZExpressions.pas(2530,7) Error: Unrecognized opcode wait
Maybe a missing lib? Or unreachable code in ZExpressions.pas due to $ifndef ? I'm a bit stuck.
And so I managed to cross compile FPC arm-linux from x86_64-linux. Quite easily in fact. I think I'm getting good at this
I noted everything to make a great tutorial afterwards.
I tested a simple Pascal program to verify it is running on the console, and it is! Everything is running smoothly until now.
Code: Select all
Program test;
uses Crt;
var
i : longint;
begin
ClrScr;
WriteLn('Counting Down');
for i:=10 downto 1 do
begin
WriteLn(i);
Delay(1000);
end;
WriteLn('BOOM!!!');
end.
/usr/local/lib/fpc/3.3.1/ppcrossarm -al -XXis -O2 -dZZDC_SDL -dMINIMAL -FU./Build/arm-linux/obj/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/pthreads/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/fcl-base/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/paszlib/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/hash/ -Fu/usr/local/lib/fpc/3.3.1/units/arm-linux/rtl-objpas/ -Tlinux -Parm -XParm-linux- -B -Mdelphi -FE./Build/arm-linux ZzDC.dpr
But I'm getting errors with the assembly inside ZExpressions.pas :
ZExpressions.pas(2504,5) Error: Unrecognized opcode call
ZExpressions.pas(2504,10) Error: Assembler syntax error
ZExpressions.pas(2506,16) Error: Unknown identifier "EAX"
ZExpressions.pas(2514,14) Error: Unknown identifier "ESP"
ZExpressions.pas(2529,7) Error: Unrecognized opcode fstp
ZExpressions.pas(2529,12) Error: Assembler syntax error
ZExpressions.pas(2530,7) Error: Unrecognized opcode wait
Maybe a missing lib? Or unreachable code in ZExpressions.pas due to $ifndef ? I'm a bit stuck.