This guide is for compiling FORTE for the Raspberry Pi. For information about the parameters to be used, go to the Parameters page
Raspberry Pi (RPI) is one of most famous low-cost embedded system. In its third generation, the Raspberry Pi 3 launched in February 2016 has a 1.2GHz 64-bit quad-core ARMv8 CPU, 1 GB RAM and several I/O options, among them a 40 pin header. The operating system is loaded from a SD card, so it can support many OS, being the most popular the Debian-based Raspbian. FORTE used to use the wiringPi library, but it has changed to use the sysFs virtual file system.
This tutorial explains first how to compile FORTE in the RPI, or even cross-compile, and how to easily use the I/O Function Blocks in FORTE to control the 40 pin header.
This tutorial doesn't show the details of how to make the RPI run, but if you never used before, you should know that beside the RPI board, you need a source power that is connected to the mini-USB port and a mini-SD card. The RPI can be connected to a screen, mouse and keyboard through the HDMI and USB ports, but you also can connect to it headless, meaning that you connect through ssh using the Ethernet or a usb-wifi connector. There are plenty of tutorials on how to access the RPI, so this tutorial starts supposing you have access to the command line of the RPI, through ssh or directly on it using the GUI, and that the RPI has Internet access.
You will need to add the SysFs module to the compilation. In order to that, you will need to change the setup_posix.sh file, using your preferred text editor. In the file you will find a line that starts with cmake -G "Unix Makefiles" -DFORTE_ARCHITECTURE=Posix. At the end of the line, add -DFORTE_MODULE_SysFs=ON. This will enable the interface to the 40 pin header of the RPI. Save the file, exit the editor and execute:
When no error occurs, the command creates a folder in bin/posix where all the files to compile FORTE are stored. Access the folder if not already there.
The RPI is a very powerful computer, but when developing a project, one sometimes has to compile FORTE many times, an the RPI is slow compared to the power of a desktop computer. That's when cross-compiling is useful. It allows to compile in your desktop machine, and then send the executable to the RPI.
You will need the FORTE source code, and the same additional tools used in the preparation, except the CMake, because the CMake-GUI will be needed in this case.
A list with all variables of FORTE in red should be shown in CMake as the picture below.
Now that you installed the required tools, it's time to start using them. Take a look at the following page:
Step by step tutorial
If you want to compile FORTE for another platform or want to know more about that, here's a quick link back:
If you want to go back to the Start Here page, we leave you here a fast access
Start Here page
Or Go to top