I wonder if it is possible to cross compile from Windows 10 to Raspberry Pi.No problem, if you want to use fpcupdeluxe on windows.
ertank: had you any success?
No problem, if you want to use fpcupdeluxe on windows.
After the basic installation, it downloads the correct crossbuild chain for you and make the system workable. I use it for crossbuild for arm-linux and x64-linux. One goal for you is, to have the correct libraries depending on the used components on the windows machine. this can sometime be a little tricky to find out, what is missing and the needed depencies.
The error looks like you have either selected the wrong CPU or you need to do a clean and build to generate new .ppu files
%FPCBIN%\make distclean OS_TARGET=linux CPU_TARGET=arm CROSSBINDIR=%FPCCROSSBIN% CROSSOPT="-CpARMV6 -CfVFPV2 -OoFASTMATH" FPC=%FPCMBIN%\ppcx64.exe
%FPCBIN%\make all OS_TARGET=linux CPU_TARGET=arm CROSSBINDIR=%FPCCROSSBIN% CROSSOPT="-CpARMV6 -CfVFPV2 -OoFASTMATH" FPC=%FPCBIN%\ppcx64.exe
if errorlevel 1 goto quit
%FPCBIN%\make crossinstall CROSSBINDIR=%FPCCROSSBIN% CROSSOPT="-CpARMV6 -CfVFPV2 -OoFASTMATH" OS_TARGET=linux CPU_TARGET=arm FPC=%FPCBIN%\ppcx64.exe INSTALL_BASEDIR=%OUTPATH%
It first makes a distclean. I also tried to remove all "arm-linux" directories within the lazarus/fpc directory. Didn't helped.For ARM, it's rather complicated.No it is not. You just need the proper binutils and know how to build a cross-compiler.
On a side note, I belive on RPi, if you use Raspbian, you will need to target ARMHF instead of ARMEL.Yes that is correct.
No it is not. You just need the proper binutils and know how to build a cross-compiler.Well, the fact that this thread exists say otherwise. The OP expects to use fpc as is, just like in other targets, but he couldn't due to missing options he used to build the compiler and the entire rtl + packages.