[fpc-pascal] Is Delphi7 on Windows to FPC on embedded Linux possible?

Honza befelemepeseveze at gmail.com
Sat Sep 25 09:49:08 CEST 2010


2010/9/25 Bo Berglund <bo.berglund at gmail.com>:
> So then I found FPC and now I am looking for advice concerning if it would be possible to use FPC/Lazarus to program for an embedded Linux board with a graphics LCD screen. I want to be able to do the following:
>
> 1) Communicate via RS232 to the equipment core to control it and retrieve data. We already have a serial interface protocol for sending and retrieving data and commands, which would be the gateway into the core. So the first question is if there exists some class/component in FPC that can be used to communicate.
>
> 2) Display control screens in a GUI way with standard controls (buttons, text boxes, radio buttons etc). This would be the new user interface for the instrument.
>
> 3) Display data graphically (curves, pie charts etc). We need to improve on the on-board datat display a lot....
>
> 4) Store data on a file system, either SSD or flash memory.
>
> Can this be done?

1) I'm not aware of a ready made solution, but it quite probable
exists and if not it would be probable pretty easy to write one. It's
supposedly mostly a matter of getting access to/opening the right
(text) device.

2) Depends. Has the embeded Linux only a frame buffer device or a X
server? On X you can choose from more than one widgetset supported by
FPC/Lazarus. GTK+ can AFAIK also run on bare fbdev but I don't know if
the LCL/GTK does support that.

3) see 2)

4) Linux suports a broader range of filesystems than Windows, no
problem expected here.

> Is it possible to program on a standard Linux distribution but compile for the embedded linux?

Yes, that's what cross compiling is for. In any case, the embeded
Linux CPU has to be a FPC supported one, e.g. x86, AMD64, ARM, ... and
many more.

> Can I even re-use my Delphi7 classes from the windows environment?

Those dependent purely only on RTL/VCL and not on direct WinAPI calls
have a good chance to being ported to FPC. Sometimes they will just
work w/o modifications in Delphi mode.

-- 
bflm
freepascal-bits.blogspot.com



More information about the fpc-pascal mailing list