Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2014-10

creating the embedded port of fpc

10 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Sietse Achterop

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

Looks like an error to me. I don't know what to do here. This is on a linux/debian/jessie/64bit.

The second question is about the binutils. I am confused about that. I normally use the crosscompiler developed by ARM from https://launchpad.net/gcc-arm-embedded
But that creates binaries with names like
arm-none-eabi-gcc
Can they be used? And why is fpc using non-standard names? For the moment I use symlinks to get the names that fpc expects. Hopefully someone can help me with these questions.

Thanks in advance,
Sietse

Reply by email

Mark Morgan Lloyd
to Sietse Achterop
Sietse Achterop wrote 10 lines
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 Looks like an error to me. I don't know what to do here. This is on a linux/debian/jessie/64bit.

This is for the sake of a comparatively rapid response, and I obviously defer to anybody who knows what he's talking about :-)

Your make problem is that it's not worked out what the correct name of the compiler is, so it's trying to expand an undefined variable. Try defining the PP variable, i.e. something like

export PP=....
make clean all

You've obviously got to decide what to set PP to, it will vary depending on whether you're trying to run the native compiler on your system or a newly-generated cross-compiler.

Show quoted text 8 lines
The second question is about the binutils. I am confused about that. I normally use the crosscompiler developed by ARM from https://launchpad.net/gcc-arm-embedded But that creates binaries with names like arm-none-eabi-gcc Can they be used? And why is fpc using non-standard names? For the moment I use symlinks to get the names that fpc expects. Hopefully someone can help me with these questions.

Those triplets are a pain in the backside, the "none" simply means that the binutils build script couldn't work out the precise platform and/or wasn't told. Live with it.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sietse Achterop
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 7 lines
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

Reply by email

Michael Ring
to Sietse Achterop

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

Reply by email

Michael Ring
to Michael Ring

Oops, forgot to include -Wplpc1768 in the commandlines, sorry...

/home/sietse/lib/fpc/2.7.1/ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv7m -Wplpc1768 *-XParm-none-eabi-* tled1.pp

/home/sietse/lib/fpc/2.7.1/ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv7m -Wplpc1768 *-XParm-none-eabi-* *-vu* tled1.pp

Ch and Cs set heap and stacksize, -vu enables (some) debug output

Michael

Michael Ring wrote 158 lines
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 Am 12.10.14 um 18:40 schrieb Sietse Achterop: > 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 _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Mark Morgan Lloyd
to Sietse Achterop: ..... Ok, thanks. I now see that you need the hosts fpc to create the embedded version. I…
Sietse Achterop wrote 16 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.

GCC doesn't enter into the picture at all, the documentation states explicitly that FPC is self-hosted. All you need is the appropriate binutils, which you might end up needing to compile yourself. Way back I put some stuff at
http://wiki.lazarus.freepascal.org/Native_MIPS_Systems#Mainline_MIPS_Port which might still be useful.

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.

You should be able to do everything except the final install as a non-privileged user.

Show quoted text 5 lines
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

After the make install operation, you might need to set up a symlink for ppcarm. or use PP as before.

As before, all subject to comments from anybody who knows what he's doing.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Sietse Achterop
to Michael Ring: I am wondering why compile did not fail, or did you rename your binutils tools? In case…
Michael Ring wrote

Thanks Michael!

The following (now using armv4) works!

make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv4 BINUTILSPREFIX=arm-none-eabi-

ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv4 -XParm-none-eabi- -Wplpc2124 -vu tled1.pp

A final question.
Can I generate a fpc that has both SUBARCH's armv4 and armv7m? Of should I create to different fpc's for that?

Thanks again, now I can start building a more complete lpc1768 and start on a stm32f4.

Sietse

Reply by email

Michael Ring
to Sietse Achterop

Unfortunately (as far as I know) you cannot do that. You need to have two versions of ppcrossarm in separate directories with separate rtl.

I have the same problem with armv7m and armv6m, was never able to solve it in a different way.

Please keep me posted on your success with stm32f4 ... I would like to know if anything is missing/with need for improvement in the device's unit.....

Michael

Sietse Achterop wrote 26 lines
On 10/12/2014 08:06 PM, Michael Ring wrote: > Thanks Michael! The following (now using armv4) works! make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv4 BINUTILSPREFIX=arm-none-eabi- ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv4 -XParm-none-eabi- -Wplpc2124 -vu tled1.pp A final question. Can I generate a fpc that has both SUBARCH's armv4 and armv7m? Of should I create to different fpc's for that? Thanks again, now I can start building a more complete lpc1768 and start on a stm32f4. Sietse _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply by email

Jeppe Græsdal Johansen
to Sietse Achterop: Thanks Michael! The following (now using armv4) works! make clean buildbase installbase…
Sietse Achterop wrote 21 lines
On 10/12/2014 08:06 PM, Michael Ring wrote: > Thanks Michael! The following (now using armv4) works! make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded CPU_TARGET=arm SUBARCH=armv4 BINUTILSPREFIX=arm-none-eabi- ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv4 -XParm-none-eabi- -Wplpc2124 -vu tled1.pp A final question. Can I generate a fpc that has both SUBARCH's armv4 and armv7m? Of should I create to different fpc's for that? Thanks again, now I can start building a more complete lpc1768 and start on a stm32f4. Sietse

The difference here is in the RTL. When you compile that for ARMv4 it won't wok with ARMv7M. The cross ppc (compiler) itself is the same, but the RTL has to be compiled for their specific targets.

You can probably have both in seperate folders if you do some define trickery in fpc.cfg, but you would need to match some weird strings. Haven't checked but I seem to remember that we define what cpusettings.cputype we use when we compile? You might want to try -va and then see if you can match some of the defines in fpc.cfg to change directory

But in the big picture it might be an idea to implement this as a core feature? It would be pretty nice to have the compiler be the same and be able to target any sub architecture with a single install.

Reply by email

Michael Ring
to Jeppe Græsdal Johansen
Jeppe Græsdal Johansen wrote 39 lines
Den 12-10-2014 22:30, Sietse Achterop skrev: > On 10/12/2014 08:06 PM, Michael Ring wrote: >> > > Thanks Michael! > > The following (now using armv4) works! > > make clean buildbase installbase CROSSINSTALL=1 OS_TARGET=embedded > CPU_TARGET=arm SUBARCH=armv4 BINUTILSPREFIX=arm-none-eabi- > > ppcrossarm -Ch1024 -Cs1024 -Tembedded -Parm -Cparmv4 > -XParm-none-eabi- -Wplpc2124 -vu tled1.pp > > A final question. > Can I generate a fpc that has both SUBARCH's armv4 and armv7m? > Of should I create to different fpc's for that? > > Thanks again, now I can start building a more complete lpc1768 and > start on a stm32f4. > > Sietse The difference here is in the RTL. When you compile that for ARMv4 it won't wok with ARMv7M. The cross ppc (compiler) itself is the same, but the RTL has to be compiled for their specific targets. You can probably have both in seperate folders if you do some define trickery in fpc.cfg, but you would need to match some weird strings. Haven't checked but I seem to remember that we define what cpusettings.cputype we use when we compile? You might want to try -va and then see if you can match some of the defines in fpc.cfg to change directory But in the big picture it might be an idea to implement this as a core feature? It would be pretty nice to have the compiler be the same and be able to target any sub architecture with a single install. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

It would be nice to have that feature in the core!

Michael

Reply by email