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

Koenraad Lelong koen1 at de-brouwerij.be
Tue Oct 11 21:59:43 CEST 2011


On 11-10-11 15:56, Jeppe Græsdal Johansen wrote:
> 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
>
Hi Jeppe,

Now I could make my compiler.
I also tried to compile a program (downloaded from your site) with the 
compiler, but I got a whole bunch of warnings. Is there a a way to solve 
these ?

Many thanks,

Koenraad Lelong.

~/Documents/devel/lib/fpc/2.7.1/ppcrossarm -Parm -Tembedded 
-Wpstm32f103re -Cfsoft -Cparmv7m -XParm-elf- 
-Fu~/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/ test.pas
Free Pascal Compiler version 2.7.1 [2011/10/11] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
Target OS: Embedded
Compiling test.pas
Assembling test
Linking test
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_DEINIT'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_HSECONFIG$TRCCSTATUS'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_WAITFORHSESTARTUP$$BOOLEAN'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_FLASH_PREFETCHBUFFERCMD$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_FLASH_SETLATENCY$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_HCLKCONFIG$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_PCLK2CONFIG$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_PCLK1CONFIG$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_PLLCONFIG$LONGWORD$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_PLLCMD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_GETFLAGSTATUS$BYTE$$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_SYSCLKCONFIG$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_RCC_GETSYSCLKSOURCE$$BYTE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_DEINIT$TPORTREGISTERS'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_STRUCTINIT$TGPIO_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_GPIO_INIT$TPORTREGISTERS$TGPIO_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_GPIO_INIT$TPORTREGISTERS$TGPIO_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_USART_DEINIT$TUSARTREGISTERS'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_USART_STRUCTINIT$TUSART_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_USART_INIT$TUSARTREGISTERS$TUSART_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_USART_CMD$TUSARTREGISTERS$TSTATE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_USART_GETFLAGSTATUS$TUSARTREGISTERS$WORD$$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_USART_SENDDATA$TUSARTREGISTERS$WORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'FPC_INITIALIZEUNITS'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_RCC_CONFIGURE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHCLOCKCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_GPIO_CONFIGURE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_CONFIGURE'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 
'STM32F103FW_$$_GPIO_INIT$TPORTREGISTERS$TGPIO_INITTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_SETBITS$TPORTREGISTERS$WORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_RESETBITS$TPORTREGISTERS$WORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_DELAY'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_RESETBITS$TPORTREGISTERS$WORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'STM32F103FW_$$_GPIO_SETBITS$TPORTREGISTERS$WORD'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_DELAY'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'P$TEST_$$_USART_PUTCHAR$CHAR'.
/home/koenraad/bin/arm-elf-ld: test.o: Warning: Thumb BLX instruction 
targets thumb function 'FPC_DO_EXIT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_SYSINITFPU'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_FPC_CPUINIT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_FINALIZEUNITS'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_INTERNALEXIT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_SYSTEM_EXIT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 'SYSTEM_$$_DO_EXIT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_HALT$LONGINT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_HALT$LONGINT'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_GET_CALLER_FRAME$POINTER$$POINTER'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_GET_CALLER_ADDR$POINTER$$POINTER'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function 
'SYSTEM_$$_HANDLEERRORADDRFRAME$LONGINT$POINTER$POINTER'.
/home/koenraad/bin/arm-elf-ld: 
/home/koenraad/Documents/devel/lib/fpc/2.7.1/units/arm-embedded/rtl/system.o: 
Warning: Thumb BLX instruction targets thumb function '_haltproc'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_GETFLAGSTATUS$BYTE$$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_GETFLAGSTATUS$BYTE$$LONGWORD'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 'fpc_div_dword'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB2PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB1PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB1PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB1PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_APB1PERIPHRESETCMD$LONGWORD$TSTATE'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 
'STM32F103FW_$$_RCC_GETCLOCKSFREQ$TRCC_CLOCKSTYPEDEF'.
/home/koenraad/bin/arm-elf-ld: stm32f103fw.o: Warning: Thumb BLX 
instruction targets thumb function 'fpc_div_dword'.
131 lines compiled, 0.1 sec, 5892 bytes code, 172 bytes data



More information about the fpc-pascal mailing list