Lazarus on RPi

From eLinux.org
Revision as of 13:40, 7 June 2015 by Jwdietrich (talk | contribs) (Updated information for Free Pascal 2.7.x, Lazarus 1.5.x and Raspberry Pi 2.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Lazarus on Raspbian Wheezy
Lazarus on Raspberry Pi.

Lazarus is a cross-platform IDE for Free Pascal, a professional 32 bit / 64 bit Pascal Compiler. Lazarus supports a wide variety of processors and Linux distributions including the Raspberry Pi, where it runs natively.

Simple installation

In the Raspbian distribution Lazarus and Free Pascal are easily installed with the following shell commands:

  sudo apt-get update
  sudo apt-get upgrade
  sudo apt-get install fpc
  sudo apt-get install lazarus

This installs a ready-to-use precompiled version of Lazarus, however not necessarily the newest one.

Compiling from sources

The newest versions of Lazarus are distributed as source code. In order to compile Lazarus from subversion sources see Michell Computing: Lazarus on the Raspberry Pi for details. An updated version covering Free Pascal 2.7.x is the article FreePascal 2.7.1 on Raspberry Pi by the same author.

The article How to install Lazarus Pascal on Raspberry Pi 2 (Raspbian) is a comprehensive description of the steps that are necessary to install a trunk version of Lazarus 1.5.x on the Raspberry Pi 2.

See also

Accessing low-level hardware

Hardware hacking is easily possible with the Lazarus wrapper unit for Gordon Henderson's wiringPi C library (see below). Alternatively, the GPIO port is also accessible directly from Free Pascal as described in the article on RPi Low-level peripherals or, in more detail, in the Lazarus Wiki.

External Links