I have managed to run 'SysUtils', 'Math' and other units for the Raspberry.
Inside the
rtl/embedded/system.cfg file, you will find:
#ifdef CPUARM
-SfSOFTFPU
-SfCLASSES
-SfEXCEPTIONS
-SfANSISTRINGS
-SfRTTI
-SfWIDESTRINGS
-SfDYNARRAYS
-SfTHREADING
-SfVARIANTS
-SfOBJECTS
-SfCOMMANDARGS
-SfRANDOM
-SfRESOURCES
#endif CPUARM
In testing, removing the option: '-SfTHREADING', units work.
And in order for the 'Consoleio' unit to work, I've added the '-SfCONSOLEIO' option.
With 'SysUtils', I have successfully tested the IntToStr and ToString functions.
This unit adds 'heapmgr' as suggested by @DonAlfredo.
@DonAlfredo, is it possible to add the cross compiler aarch64-embedded to Fpcupdeluxe?
Aarch64-none-elf would be needed with their respective libraries and all their magic to make it.
With 'Math', I successfully tried the DivMod function.
As suggested by @Laksen it was necessary to enable the fpu of the Raspberry.
And that part is in the original raspi2.pp file.
With 'Consoleio', I successfully tried redirect the StdOut to serial port from the miniUART.
Just like raspi2.pp does.
For example:
WriteLn('Hello World'); // that message comes out of the miniUART.
Also I found that it only works with shortstring, I fix it by adding {$H-}