I am wondering why compile did not fail, or did you rename your binutils tools? In case you did not rename them those commandlines should work:
make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m INSTALL_PREFIX=/home/sietse *BINUTILSPREFIX=arm-none-eabi- *
You do not need to call fpc to successfully compile, it is good enough to use ppcrossarm.
/home/sietse/lib/fpc/2.7.1/ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv7m *-XParm-none-eabi-* tled1.pp
should compile the app. If those can't find system used by program errors stay there's propably a problem with your fpc.cfg.
pleae try with this commandline:
/home/sietse/lib/fpc/2.7.1/ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv7m *-XParm-none-eabi-* *-vu* tled1.pp
You should see output like this:
Target OS: Embedded
Compiling hello.pas
(HELLO) Registering new unit SYSTEM
(HELLO) Load from HELLO (implementation) unit SYSTEM (SYSTEM) Loading unit SYSTEM
(SYSTEM) PPU Name:
*/home/sietse/lib/fpc/2.7.1/units/arm-embedded/rtl/system.ppu*
Here's a list of files installed on my system for arm-embedded, your directory structure should look similar (except that you have a different INSTALL_PREFIX
/usr/local/lib/fpc/2.7.1//units/arm-embedded
/usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl
/usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/consoleio.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/consoleio.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/cortexm3.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/cortexm3.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/cortexm4.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/cortexm4.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/heapmgr.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/heapmgr.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm3fury.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm3fury.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm3tempest.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm3tempest.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm4f120.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lm4f120.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc13uxx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc13uxx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc13xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc13xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc1768.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/lpc1768.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/objpas.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/objpas.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/Package.fpc /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f100xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f100xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f101xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f101xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f102xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f102xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f103xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f103xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f105xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f105xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f107xx.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f107xx.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f40x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f40x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f41x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f41x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f427x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f427x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f429x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f429x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f437x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f437x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f439x.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/stm32f439x.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/sysconst.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/sysconst.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/system.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/system.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/sysutils.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/sysutils.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/uuchar.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/uuchar.ppu /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/xmc4500.o /usr/local/lib/fpc/2.7.1//units/arm-embedded/rtl/xmc4500.ppu
Sietse Achterop wrote 52 lines
On 10/12/2014 10:54 AM, Mark Morgan Lloyd wrote:
> Sietse Achterop wrote:
>> Dear list,
>> I try to get the embedded port of fpc (for both lcp1728 and stm32f4)
>> to work but fail.
>> I use the info on
>>
http://wiki.freepascal.org/TARGET_Embedded
>> but immediate get:
>> make[1]: -iVSPTPSOTO: Command not found
.....
> export PP=....
> make clean all
Ok, thanks. I now see that you need the hosts fpc to create the
embedded version. I assumed only gcc was needed.
The given make-command only works as root, so i use a INSTALL_PREFIX:
make clean buildbase installbase INSTALL_PREFIX=/home/sietse
CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv7m
This works ok.
But the command
fpc -Parm -Tembedded -Wplpc1768 -Cparmv7m tled1.pp
gives:
Error: ppcarm can't be executed, error message: Failed to execute
"ppcarm", error code: 127
I notice that "make installbase" did not install a program fpc in
/home/sietse/bin, but I find
/home/sietse/lib/fpc/2.7.1/ppcrossarm
If I try
/home/sietse/lib/fpc/2.7.1/ppcrossarm -Parm -Tembedded -Wplpc1768
-Cparmv7m tled1.pp
Free Pascal Compiler version 2.7.1 [2014/10/12] for arm
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Embedded
Compiling tled1.pp
Fatal: Can't find unit system used by Program
Fatal: Compilation aborted
So the ppcrosarm probably is the correct main program, but it seems
that the fpc for the embedded port isn't installed.
Where is the fpc that will call ppcrosarm?
Hopefully this make sense.
Sietse
_______________________________________________
fpc-devel maillist -
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel