1
votes

I've been trying to set up Lazarus to compile for Windows CE 5.0, specifically for a Motorola MK-4000. However, I'm not having much success, and the instructions to set up the IDE appear to be outdated.

I'm using Lazarus v1.8.4 for Windows x64.

The problem starts when I'm told to download and install cross-arm-wince from the same download page as Lazarus. There is no such thing there. I did however find lazarus-1.8.4-fpc-3.0.4-cross-i386-win32-win64.exe which is the only mention of "cross" I can find. Not what I need, but installed anyway.

Now I go to set up my project in the IDE. I start a new application, but Project -> Project Options -> Compiler Options -> Paths -> LCL Widget Type or Project -> Project Options -> Compiler Options -> Paths -> Select another widget set (Macro LCLWidgetType) are not found, nor do I see any mention of "Widget".

Next two instructions for Target OS and CPU Family are okay, I found those settings and changed to WinCE and arm.

Upon saving project options, I see an error message:

Compiler "C:\lazarus\fpc\3.0.4\bin\x86-64-win64\fpc.exe" does not support target arm-wince

Except for the "Widget" setting I couldn't find, now I try to go ahead and build a new unaltered application. But to no surprise, I get an error:

Error: ppcarm.exe can't be executed, error message: Failed to execute ""ppcarm.exe" -Twince -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -FuC:\lazarus\packager\registration\ -FUC:\lazarus\packager\units\arm-wince\ fcllaz.pas


I went ahead and installed the arm-wince from FPC 3.0.0 (My Lazarus version came with 3.0.4), and it installed into its own FPC directory outside of the Lazarus directory. However I'm extremely new to FPC/Lazarus and have no idea how to make the IDE actually work with the other compiler.

As a dirty trial, I temporarily copied the compilers from the 3.0.0 dir to the 3.0.4 one, and the first attempt failed (I didn't note the error message at that time), but I just tried again and it compiled! Obviously blindly dumping files into the bin is not the appropriate solution, as I'm sure there's a proper way to configure this. It doesn't run on the device anyway, just shows the title in the taskbar and no UI ever opens.


What am I missing to get Lazarus to compile for Windows CE?

1

1 Answers

2
votes

Well, that is a win32->win64 crosscompiler. You need a win32 -> arm-wince compiler. (assuming that the device is arm and not i386)

Not the same thing. Seems that prebuilding for arm-wince has stopped, so you have to build your own. Try reading the buildfaq.

For 3.0.0 the relevant crosscompiler is prebuilt, maybe it is enough for simple testing: ftp://ftp.freepascal.org/pub/fpc/dist/3.0.0/arm-wince/