Forum > Linux

Setting up an ARM embedded project?

(1/4) > >>

Ruptor:
I managed to blunder through the setup of Lazarus & FPC trunk using fpcupdeluxe after installing the prerequisites as given here:
https://github.com/LongDirtyAnimAlf/fpcupdeluxe
and following the wiki instructions here:
https://wiki.freepascal.org/ARM_Embedded_Tutorial_-_Entry_FPC_and_STM32
but after completing the cross compiler build the wheels have fallen off.
The instructions started to go wrong with a minor thing
    "Tools > Reread FPC source code directory"
should be rescan not reread. I moved on to the simple project.
After guessing Settings is Options where is this?
"Project > Project Settings ... > Configuration and Goals"
Elsewhere under
Tools > Configure "Build Lazarus"
I could set arm & embedded then I did rescan and it said system.ppu not found in fpc binary so is more screwed up.
Is there alternative instructions to do a simple arm project.
Eventually under project options I have done some of the settings in config target > embedded, arm & armv7m settings but not -WpSTM32F103X8 & what about the fpc.cfg? I am a bit lost so any help will be appreciated.

Laksen:
Which chip are you targetting?

You can do it in two steps to figure out where the problem is

A) Check that FPC is configured right
1. Write the following test program to test.pas:
--- Code: ---program test; begin end.
--- End code ---
2. Compile that with
--- Code: ---fpc -Tembedded -Cparmv7m -WpXXX test.pas
--- End code ---
with XXX being the fpc name for your microcontroller (use "fpc -Tembedded -Cparmv7m -i" to list)

If that works and produces a test.elf then your compiler works, and the problem is in the configuration of Lazarus

Ruptor:
Error: Illegal parameter: -Cparmv7m
removing all parameters gives
Target OS: Embedded
Compiling test.pas
Fatal: Can't find unit system used by Program
Fatal: Compilation aborted
fpc works on Linux code.

Ruptor:
There is only one fpc.cfg file and it is in the x86_64-linux directory. Shouldn't there be two fpc.cfg files so there is one for arm?
There are two system.ppu that Lazarus files one in RTL under x86 and the other in RTL under embedded. It looks like the fpc.cfg file is missing for embedded to me but why didn't the cross build create it?

Laksen:
Sorry forgot "-Parm". Add that to all commands

Navigation

[0] Message Index

[#] Next page

Go to full version