-
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 “GCC ARM Embedded Maintainers” team:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get update
sudo apt-get install gcc-arm-embedded
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:
sudo apt-get install libtool autoconf automake pkg-config libusb-1.0-0-dev libhidapi-dev
cd ~
git clone http://repo.or.cz/openocd.git
cd openocd
./bootstrap
./configure --enable-stlink --enable-ftdi --enable-cmsis-dap --prefix=/usr/local
make -j4
sudo make install
Hooray! That's it. Now, let's continue on to compile FreeRTPS.