ARM Embedded Tutorial - Installing Lazarus and Free Pascal

From Free Pascal wiki

English (en)

Quickstart Installation via FPCUPdeluxe

The easiest way to install Embedded Support for a huge variety of embedded controllers is to use fpcupdeluxe.

Download latest(!!!) FPCUPdeluxe from

fpcupdeluxe releases on github.

Make sure that you use a version >= v1.8.2l of FPCUPdeluxe, the tutorial references features that are only in this and newer versions.

FPCUPdeluxe uses forks of the graemeg github repos of Freepascal trunk and Lazarus trunk

the fork used for Freepascal is named 'embedded-mir' and the fork for Lazarus is 'embedded'

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.

Steps for people mainly interested in Wio Terminal or Raspberry Pico

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 on the bottom of the screen:

fpcupdeluxe start installation.png


Steps for people interested in other targets like arm avr or espressif microcontrollers

For all other targets you can choose between either trunk.git or embedded-mir for fpc and either trunk.git or embedded for lazarus.

The reason to choose embedded-mir would be to have support for more emedded controllers that are currently not yet available in fpc trunk and installing embedded/trunk.git instead of stable lazarus is a good idea because debugging for embedded targets is much improoved in lazarus trunk

To build your embedded version of Lazarus follow those simple steps:

  • Select the target directory for your installation
  • Select either trunk.git or embedded-mir for fpc
  • Select either trunk.git or embedded for lazarus

Hit the Install/update FPC+Laz button.


fpcupdeluxe start manual installation.png

After installation of FPC+Lazarus is done switch to the 'Cross' Tab

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:


fpcupdeluxe manual install 1.png

Now you can select 'Install compiler' button and the selected subarch will be installed.....

You may repeat this step for all CPU's subarchs you wish to install.

Some hints on Subarchs:

  • armv6m Subarch is good for Raspberry Pico, SAMD21 based board like the Arduino Zero or STM32F0/G0/L0 families
  • armv7m is for the Bluepill, Arduino Due or STM32F1/L1
  • armv7em is for the Wio Terminal, Blackpill or SAMD51 / STM32F3/F4/G4/H7/L4 families
  • avr5 is for Arduino Uno
  • lx6 is for ESP32 based boards


More information on fpcupdeluxe can be found here: FpcUpDeluxe Wiki.