Forum > Other

Cross compile from Win10 to Raspberry Pi

(1/3) > >>


I wonder if it is possible to cross compile from Windows 10 to Raspberry Pi.

I know it is possible to run Lazarus itself on Pi. However, there are times I do love to do cross compiling where possible.

Thanks & regards,

Short answer: YES.
Long answer: you need to obtain a toolchain - binutils -for the Pi and copy some files from the Pi itself. And both the wiki and this forum contain all the answers to get you going.

Funny... I justed started with the same challenge and studied all the wiki pages etc...

I downloaded the FPC 3.0.4 sources, modified the batch file from the "Lazarus_on_Raspberry_Pi" page.
Compiler compilation and installation works fine.

But when I try to set another plattform on an existing project, I got following messages (originally in German, trying to translate)

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Compiling Package FCL 1.0.1: Exit code 1, Fehler: 1, Hinweise: 2Hint: Start of reading config file X:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.cfgHint: End of reading config file X:\lazarus\fpc\3.0.4\bin\x86_64-win64\fpc.cfgVerbose: Free Pascal Compiler version 3.0.4 [2019/12/20] for armVerbose: Copyright (c) 1993-2017 by Florian Klaempfl and othersVerbose: Target OS: Linux for ARMELVerbose: Compiling fcllaz.pasVerbose: PPU Loading X:\lazarus\fpc\3.0.4\units\arm-linux\rtl\system.ppuVerbose: Trying to use a unit which was compiled with a different FPU modeFatal: Cannot find system used by fcllaz. Please make sure, that all .ppu-Dateien of a packages are in that output directory. ppu in wrong directory=X:\lazarus\fpc\3.0.4\units\arm-linux\rtl\system.ppu..Verbose: Compilation abortedVerbose: X:\lazarus\fpc\3.0.4\bin\x86_64-win64\ppcrossarm.exe returned an error exitcode
Has anyone an idea what I missed here?

ertank: had you any success?

Kind regards,


--- Quote from: ertank on December 11, 2019, 06:20:13 am ---I wonder if it is possible to cross compile from Windows 10 to Raspberry Pi.
--- End quote ---
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. 


--- Quote from: SirTwist on December 20, 2019, 09:30:00 pm ---ertank: had you any success?

--- End quote ---

I did not have time to look at it, unfortunately.


[0] Message Index

[#] Next page

Go to full version