[fpc-devel] Questions about cross-compiling (z80)
pascaldragon at googlemail.com
Fri Feb 11 14:14:22 CET 2022
BogDan via fpc-devel <fpc-devel at lists.freepascal.org> schrieb am Fr., 11.
Feb. 2022, 11:09:
> According to https://wiki.freepascal.org/Z80 fpc is able to compile
> pascal code for z80.
> Sadly I'm a newbie on fpc, therefore I have a few questions:
> 1. I changed a bit the build script from
> https://wiki.freepascal.org/Z80#Building and I managed to build fpc, and
> when I built a simple hello world file, the resulted tzx file seems wrong:
> ./ppcrossz80 -n -Tzxspectrum -PZ80
> -Fu/path/to/fpc/lib/fpc/3.3.1/units/z80-zxspectrum/rtl -viwn -CX -XX
> $ cat test.tzx
> It seems is an IHX format not tzx
> Also the result for a simple hello world is way too big (over 20k) !
> I assume that I'm passing wrong params to ppcrossz80. What params should I
> use? Where I can find more info on this matter?
You need to make sure that the ihxutil built in
utils/ihxutil/<hostcpu>-<hostos>/ is available in PATH, so that the
compiler will do the conversion.
> 2. Is it possible to add z80 cross compilation target to FP IDE? The FP
> IDe shows me a few targets, but z80 is not there.
The text mode IDE can only ever compile for one CPU platform, so you need
to build it for Z80. Though I don't know right now whether this is enabled.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the fpc-devel