Hi guys,
I use Lazarus until long times and it works perfectly on my Linux i386 desktop
My computer : a Linux NetRunner i386 (similar to Kubuntu Quantal)
My device : a Nexus 7 with (K)Ubuntu 12.10 for ARMHF
Lazarus / FPC : the last version of FPC 2.7.1 and Lazarus 1.1
I have followed this wiki
http://wiki.lazarus.freepascal.org/Setup_Cross_Compile_For_ARM
After long try, failure linking, cross librairies missing, I succeed !!
On my Linux desktop i386, I can cross-compile application between i386 and ARM HF.
I succeed also to cross-compile the LCL (GTK2 ...with QT it does'nt works)
1 ) first program I wrote the small application in the tuto
program test;
begin
writeln('DATE ',{$i %DATE%});
writeln('FPCTARGET ',{$i %FPCTARGET%});
writeln('FPCTARGETCPU ',{$i %FPCTARGETCPU%});
writeln('FPCTARGETOS ',{$i %FPCTARGETOS%});
writeln('FPCVERSION ',{$i %FPCVERSION%});
end.
on a terminal on my i386 computer, I wrote : fpc -Tlinux -Parm test.pas
the output :
Free Pascal Compiler version 2.7.1 [2013/05/08] for arm
Copyright (c) 1993-2013 by Florian Klaempfl and others
Target OS: Linux for ARMHF
Compiling test.pas
Assembling test
Linking test
8 lines compiled, 0.2 sec
The binarie on my device (Nexus 7 Kubuntu) works perfectly !!
2 ) second program On Lazarus, I create a new "console application" (without graphic), with a serial port communication, It works perfectly on both (computer and ARM tablet).
3 ) third program On Lazarus, I create a new application with a single form and with a button (hello world).
LCL : gtk2
I can compile without errors with target CPU ARM!
But when I try to execute this binarie on the device, the terminal output is :
" Segmentation fault (core dumped) "
What does it mean exactly? What is wrong?