LongDirtyAnimAlf / fpcupdeluxe

A GUI based installer for FPC and Lazarus
505 stars 95 forks source link

Cross compile aarch64-embedded for RASPI3 #581

Closed rcla closed 1 year ago

rcla commented 1 year ago

Selecting Cross compiler doesn't allow me to change or Set surbach.

Install Ok, and inside the fpc.cfg file:

# begin fpcup do not remove aarch64-embedded
# Inserted by fpcup 8-5-23 20:35:06
# Cross compile settings dependent on both target OS and target CPU
#IFDEF FPC_CROSSCOMPILING
#IFDEF EMBEDDED
#IFDEF CPUAARCH64
-FD/home/myfedo/Designer/Laz_Embed0608/cross/bin/aarch64-embedded
-XPaarch64-elf-
#IFDEF CPUSANONE
-Fl/home/myfedo/Designer/Laz_Embed0608/cross/lib/aarch64-embedded
#ENDIF CPUSANONE
-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/$FPCSUBARCH/rtl
-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/$FPCSUBARCH/packages
#ENDIF CPUAARCH64
#ENDIF EMBEDDED
#ENDIF FPC_CROSSCOMPILING
# end fpcup do not remove

But when compiling a project it shows the following error:

Compile Project, OS: embedded, CPU: aarch64, Target: /home/myfedo/Test/Laza/Embe_64/Sim_gpio/prpiardu.elf: Exit code 1, Errors: 1, Hints: 3
Note: Changed CPU type to be consistent with specified controller
Hint: Start of reading config file /home/myfedo/Designer/Laz_Embed0608/fpc/bin/x86_64-linux/fpc.cfg
Hint: End of reading config file /home/myfedo/Designer/Laz_Embed0608/fpc/bin/x86_64-linux/fpc.cfg
Verbose: Free Pascal Compiler version 3.3.1-12650-gb53034705f-dirty [2023/05/06] for aarch64
Verbose: Copyright (c) 1993-2023 by Florian Klaempfl and others
Verbose: Target OS: Embedded
Verbose: Compiling prpiardu.lpr
Verbose: PPU Loading /home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/system.ppu
Fatal: Can't find unit system used by prpiardu
Verbose: Compilation aborted
Verbose: /home/myfedo/Designer/Laz_Embed0608/fpc/bin/x86_64-linux/ppcrossa64 returned an error exitcode

To fix this error, you noticed that the only folder that gets installed inside "units" is "saNone" /home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/saNone

Inside the fpc.cfg file, I change from:

-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/$FPCSUBARCH/rtl
-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/$FPCSUBARCH/packages

to:

-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/saNone/rtl
-Fu/home/myfedo/Designer/Laz_Embed0608/fpc/units/aarch64-embedded/saNone/packages

And now if it compiles, no errors.

Inside RASPI3:
cpu_armv8a; fputype:fpu_vfp;

Subarch and the folder shouldn't be armv8 or armv8-a, instead of saNone?

LongDirtyAnimAlf commented 1 year ago

Confirmed. Will release new binaries that solve this issue next week.

rcla commented 1 year ago

Thanks, that's good news.

LongDirtyAnimAlf commented 1 year ago

Implemented in release.