[fpc-pascal] Making a cross-compiler for STM32

Jeppe Græsdal Johansen jjohan07 at student.aau.dk
Tue Oct 11 15:56:13 CEST 2011


Those errors seem to relate to some recent changes in the way heap 
management is done. Last I checked it worked just fine, but other things 
might have changed which broke it. I'll try to confirm if it's broken 
later on

But if you try revision 19167 then those changes shouldn't be there. I'm 
fairly certain that should build

Koenraad Lelong wrote:
> Hi,
>
> I'm trying to make a crosscompliler for STM32 (arm-embedded) on my 
> linux-machine. I just downloaded a daily development snapshot and 
> compiled it with :
> make clean buildbase installbase CROSSINSTALL=1 CROSSOPT="-CfSoft 
> -XParm-elf-" OS_TARGET=embedded CPU_TARGET=arm 
> PREFIX=/home/koenraad/Documents/devel SUBARCH=armv7m
>
> All seems fine except I get an error when the rtl gets compiled :
>
> /bin/mkdir -p /home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- -Us -Sg system.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- arm/lm3fury.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- arm/lm3tempest.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- arm/stm32f103.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- arm/lpc1768.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- -I../objpas ../objpas/objpas.pp
> /home/koenraad/Downloads/STM32/fpc/compiler/ppcrossarm -Cparmv7m 
> @rtl.cfg -Ur -Tembedded -Parm -XParm-embedded- -Xr -Ur -Xs -O2 -n 
> -Fi../inc -Fi../arm -FE. 
> -FU/home/koenraad/Downloads/STM32/fpc/rtl/units/arm-embedded -darm 
> -dRELEASE -CfSoft -XParm-elf- heapmgr.pp
> heapmgr.pp(23,34) Error: Identifier not found "TMemoryManager"
> heapmgr.pp(23,34) Error: Error in type definition
> heap.inc(211,37) Error: Identifier not found "TFPCHeapStatus"
> heap.inc(211,37) Error: Error in type definition
> heap.inc(214,1) Error: Forward type not resolved "Tfpcheapstatus"
> heap.inc(367,44) Error: Identifier not found "TFPCHeapStatus"
> heap.inc(372,11) Error: Illegal qualifier
> heap.inc(372,35) Error: Illegal qualifier
> heap.inc(372,58) Error: Illegal qualifier
> heap.inc(376,39) Error: Identifier not found "THeapStatus"
> heap.inc(381,11) Error: Illegal qualifier
> heap.inc(381,35) Error: Illegal qualifier
> heap.inc(381,58) Error: Illegal qualifier
> heap.inc(382,10) Error: Illegal qualifier
> heap.inc(382,37) Error: Illegal qualifier
> heap.inc(383,10) Error: Illegal qualifier
> heap.inc(383,37) Error: Illegal qualifier
> heap.inc(384,10) Error: Illegal qualifier
> heap.inc(384,37) Error: Illegal qualifier
> heap.inc(385,10) Error: Illegal qualifier
> heap.inc(386,10) Error: Illegal qualifier
> heap.inc(387,10) Error: Illegal qualifier
> heap.inc(388,10) Error: Illegal qualifier
> heap.inc(389,10) Error: Illegal qualifier
> heap.inc(390,10) Error: Illegal qualifier
> heap.inc(391,10) Error: Illegal qualifier
> heap.inc(528,38) Error: Illegal qualifier
> heap.inc(778,48) Error: Identifier not found "MaxKeptOSChunks"
> heap.inc(830,35) Error: Identifier not found "GrowHeapSize1"
> heap.inc(832,42) Error: Identifier not found "GrowHeapSize1"
> heap.inc(834,34) Error: Identifier not found "GrowHeapSize1"
> heap.inc(837,35) Error: Identifier not found "GrowHeapSize2"
> heap.inc(839,42) Error: Identifier not found "GrowHeapSize2"
> heap.inc(841,34) Error: Identifier not found "GrowHeapSize2"
> heap.inc(852,41) Error: Identifier not found "ReturnNilIfGrowHeapFails"
> heap.inc(869,19) Error: Illegal qualifier
> heap.inc(870,18) Error: Illegal qualifier
> heap.inc(870,41) Error: Illegal qualifier
> heap.inc(871,17) Error: Illegal qualifier
> heap.inc(871,40) Error: Illegal qualifier
> heap.inc(976,39) Error: Expression type must be class or record type
> heap.inc(978,21) Error: Identifier not found "currheapused"
> heap.inc(979,21) Error: Identifier not found "currheapused"
> heap.inc(979,35) Error: Identifier not found "maxheapused"
> heap.inc(981,19) Error: Identifier not found "maxheapused"
> heap.inc(981,34) Error: Identifier not found "currheapused"
> heap.inc(1001,33) Error: Identifier not found "ReturnNilIfGrowHeapFails"
> heap.inc(1045,39) Error: Expression type must be class or record type
> heap.inc(1047,21) Error: Identifier not found "currheapused"
> heap.inc(1048,21) Error: Identifier not found "currheapused"
> heap.inc(1048,21) Fatal: There were 50 errors compiling module, stopping
> Fatal: Compilation aborted
> make[3]: *** [heapmgr.ppu] Fout 1
> make[3]: Map '/home/koenraad/Downloads/STM32/fpc/rtl/embedded' wordt 
> verlaten
> make[2]: *** [embedded_all] Fout 2
> make[2]: Map '/home/koenraad/Downloads/STM32/fpc/rtl' wordt verlaten
> make[1]: *** [rtl_all] Fout 2
> make[1]: Map '/home/koenraad/Downloads/STM32/fpc' wordt verlaten
> make: *** [base.build-stamp.arm-embedded] Fout 2
>
> Did I do anything wrong ? Or is the snapshot unstable for those 
> devices ? How can I get a working compiler ?
>
> Thanks,
>
> Koenraad Lelong
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal




More information about the fpc-pascal mailing list