[fpc-devel] Freepascal in microcontrollers
Christian Iversen
chrivers at iversen-net.dk
Sun Feb 24 12:59:33 CET 2008
Andrew Haines wrote:
> Can freepascal be used on small processors that are 8 or 16 bits or does
> it expect that there are at least 32 bits for most things? I've been
> tempted lately to start making little circuits with microcontrollers on
> them. I realize that a great deal of the rtl/fcl would not be used on
> these little processors. Also since there is no OS on these devices does
> that mean that for sure fpc cannot work?
Most of the RTl is written for 32- and 64-bit computing, as you
correctly state. I would imagine that _some_ of it would work on 16-bit,
and maybe 1-2% would work on 8-bit ;-)
However, you can choose to compile fpc without the system unit, using a
special option on the command-line. This would enable you to code your
own system routines (such as writeln), most likely in assembler.
However, the most obvious problem here is that (AFAIK) fpc does not
support arbitrary 8- and 16-bit targets. You need to find an
architecture that fpc supports, so you can compile programs for it.
Other people on this list probably know more about embedded systems than
I do, so I hope someone else can answer with the specifics.
--
Med venlig hilsen
Christian Iversen
More information about the fpc-devel
mailing list