-
Notifications
You must be signed in to change notification settings - Fork 33
Prerequisites
FreeRTPS is designed for portability, so it does not have any runtime dependencies. However, the current Linux-based build system requires Make, CMake, and gcc to produce Linux executables.
To compile and run FreeRTPS on a microcontroller (MCU), you'll need a cross-compiler. At time of writing, the only supported MCU targets are bare-metal STM32 processors. To use FreeRTPS with STM32, you'll need the ARM Cortex-M port of gcc (arm-none-eabi) and OpenOCD. The following sections will walk through the installation of these tools on Ubuntu 14.04 LTS (Trusty).
First, let's install the tools required to retrieve, compile, and run freertps on Linux:
sudo apt-get update
sudo apt-get install build-essential cmake git
Next, let's install the pre-built compiler toolchain for ARM Cortex-M. On Ubuntu, we can do this easily from an Ubuntu Personal Package Archive (PPA) maintained by Terry Guo of ARM:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:terry.guo/gcc-arm-embedded
sudo apt-get update
sudo apt-get install gcc-arm-none-eabi
At time of writing, we need to build OpenOCD from source in order to use the latest members of the STM32 family. Let's do that in ~/openocd
and install into /usr/local
as follows:
cd ~
git clone http://repo.or.cz/openocd.git
cd openocd
./bootstrap
./configure --enable-stlink --enable-ftdi --prefix=/usr/local
make
sudo make install