Sign in Join
Wiki copytemporary

ARM Embedded Tutorial - Installing Lazarus and Free Pascal: what changed

Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.

Title: ARM Embedded Tutorial - Installing Lazarus and Free Pascal

OldNewLine
1+## Quickstart Installation via FPCUPdeluxe
2+
3+The easiest way to install Embedded Support for a huge variety of embedded controllers is to use fpcupdeluxe.
4+
5+Download latest(!!!) FPCUPdeluxe from
6+
7+[fpcupdeluxe releases on github](https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases).
8+
9+Make sure that you use a version \>= v1.8.2r of FPCUPdeluxe, the tutorial references features that are only in this and newer versions.
10+
11+As we are using trunk versions we highly recommend to create an extra installation for embedded targets so that issues in compiler/lazarus do not effect your other work.
12+
13+## Steps for people mainly interested in Wio Terminal or Raspberry Pico
14+
15+When your primary targts of interest are the Wio Terminal or the Raspberry Pico, then installation consists of entering an installation directory for fpcupdeluxe on top left and then selecting the speedbutton for 'Wio' or 'Pico' on the bottom of the screen:
16+
17+<figure>
18+<img src="SelectEmbeddedandTrunk.png" title="SelectEmbeddedandTrunk.png" width="800" />
19+<figcaption>SelectEmbeddedandTrunk.png</figcaption>
20+</figure>
21+
22+## Steps for people interested in other targets like arm avr or espressif microcontrollers
23+
24+For all other targets select embedded (or trunk.git) for fpc and trunk.git for lazarus.
25+
26+The reason to choose embedded would be to have support for more arm-embedded controllers that are currently not yet available in fpc trunk and installing trunk.git instead of stable lazarus is a good idea because debugging for embedded targets is much improved in lazarus trunk.
27+
28+For all platforms besides arm trunk.git is likely the best choice for both fpc and lazarus.
29+
30+To build your embedded version of Lazarus follow those simple steps:
31+
32+- Select the target directory for your installation
33+- Select embedded or trunk.git for fpc
34+- Select trunk.git for lazarus
35+
36+Hit the Install/update FPC+Laz button.
37+
38+<figure>
39+<img src="SelectEmbeddedandTrunk.png" title="SelectEmbeddedandTrunk.png" width="800" />
40+<figcaption>SelectEmbeddedandTrunk.png</figcaption>
41+</figure>
42+
43+After installation of FPC+Lazarus is done switch to the 'Cross' Tab
44+
45+In the Cross tab select the desired CPU and the desired OS und then click on the 'Set subarch' button to define the subarch that you would like to use:
46+
47+<figure>
48+<img src="fpcupdeluxe_manual_install_1.png" title="fpcupdeluxe_manual_install_1.png" width="800" />
49+<figcaption>fpcupdeluxe_manual_install_1.png</figcaption>
50+</figure>
51+
52+Now you can select 'Install compiler' button and the selected subarch will be installed.....
53+
54+You may repeat this step for all CPU's subarchs you wish to install.
55+
56+Some hints on Subarchs:
57+
58+- armv6m Subarch is good for Raspberry Pico, SAMD21 based board like the Arduino Zero or STM32F0/G0/L0 families
59+
60+- armv7m is for the Bluepill, Arduino Due or STM32F1/L1
61+
62+- armv7em is for the Wio Terminal, Blackpill or SAMD51 / STM32F3/F4/G4/H7/L4 families
63+
64+- avr5 is for Arduino Uno
65+
66+- lx6 is for ESP32 based boards
67+
68+## Install extra devel tools
69+
70+There is an extra module available to ease development by providing pre-compiled binaries for some usefull tools:
71+
72+For avr development:
73+
74+- avarice (gdbserver for several debug probes manufactured by Microchip)
75+
76+- bossac (upload firmwares to avr controllers)
77+
78+for arm development:
79+
80+- openocd (gdbserver for all kinds of debug probes)
81+
82+- st-util (gdbserver specially for st-link v2/v3 debug probes)
83+
84+for the Raspberry Pico:
85+
86+- openocd-picodebug (gdbserver for running a debug probe on the 2nd cpu of your pico)
87+
88+- openocd-rp2040 (gdbserver for using a 2nd pico as a debug probe)
89+
90+general:
91+
92+- gdb-multiarch (one gdb to debug all embedded archs available)
93+
94+- gdb-multiarch-8.3.1 (an older version of gdb that works better for avr)
95+
96+Install it by selection develtools4fpc on the Modules tab of fpcupdeluxe by selection develtools4fpc and clicking 'Install Module':
97+
98+<figure>
99+<img src="modules_devtools4fpc.png" title="modules_devtools4fpc.png" width="800" />
100+<figcaption>modules_devtools4fpc.png</figcaption>
101+</figure>
102+
103+the files will then get deployed to the ccr/devtools4fpc directory inside of your fpcupdeluxe installation
104+
105+More information on fpcupdeluxe can be found here: [[fpcupdeluxe|FpcUpDeluxe Wiki]].
106+
107+---
108+*From the Free Pascal wiki, page "ARM Embedded Tutorial - Installing Lazarus and Free Pascal", as it stood on 2021-04-15 after a change by MiR, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history