Setting up environment

Setting up 4DIAC-IDE on Linux Machine

    Setting up 4DIAC on a Linux machine is a straightforward task.Latest IDE is available in 4DIAC Downloads page.

  • Extract the tarball
    tar -xzvf filename
  • Go to extracted folder and you may execute the IDE
    The application requires Java 8 or higher. If not installed try the following commands
    sudo add-apt-repository ppa:webupd8team/java
    sudo apt update
    sudo apt install oracle-java8-installer

    Accept EULA and install.To know version, type
    javac -version

Forte on Raspberry Pi

Forte is a real time capable Runtime Environment for IEC 61499 compliant applications.We will use Forte to run applications on an Embedded resource for applications developed on 4DIAC.Forte can be run on embedded resources such as Raspberry Pi, Beagle Bone and other Linux SBC. For installing Forte on RPi, you can try the official documentation. Procedures for compiling and cross compiling Forte are mentioned in the page.Compiling should work in all Rpi Boards but it takes over 45 Minutes on a Pi Zero board hence its advised to do a cross compilation and download the executable files to RPi via SFTP/SCP/FISH. For cross compilation you may follow the following procedure since the one mentioned in official documentation did not work on Pi Zero.I have tested the executable on Pi Zero and Pi 3, it should work.

  • Clone the repo
  • git clone
  • Open CMake. If you dont have it installed , try.
  • sudo apt-get install cmake
  • Point the source code field to cloned directory and build binaries to your preferred folder and then do configure
  • Make sure that name of directories in the path does not contain blank spaces.

  • Select options as shown below.
  • CMake

  • Give a name for the build , I named it RPi. Select toolchain files for C and C++ compilers and finish.
  • CMake

    I had used official toolchain from RPi foundation.You may clone the same.
    git clone
    In the cloned folder select arm-linux-gnueabihf-gcc and arm-linux-gnueabihf-g++ for C and C++ respectively which are located in tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin/. Target root may be pointed to arm-rpi-4.9.3-linux-gnueabihf folder.

  • Now an error might pop up.Selected the right system(forte) architecture should solve the error.
  • CMake

  • Select "Posix" as Forte Architecture
  • CMake

  • Also select SysFs to enable GPIO access for forte in RPi. You can also select other modules if required.
  • CMake

  • Configure and Generate.CMake will then generate configuration files to cross compile forte
  • If you made an inappropriate selection in any of the above procedures listed above, delete cache,configure and repeat the process.
  • To compile, go to target build directory for binaries, which is "build" in my case and run
  • make
  • After compilation copy forte executable from build ,its located in src in my case, to Raspberry Pi.Try
  • scp forte pi@local_ip_address:~
    Then enter password.This will copy forte to home folder(~) of machine(RPi) with "local_ip_address".
    You can also use Filezilla, give IP address, username, password of Pi and 22 (SFTP) as port number.
  • To launch forte in RPi , in RPi terminal try.
  • cd src
    sudo ./forte
    Forte will start and wait for 4DIAC to download application to it.If no message is shown in terminal, it means forte is up and working properly.
    You may refer SSH tutorial to access RPi shell remotely on a network.


    4DIAC-IDE offers five different perspectives.To view each you may click on the open perspectives.


    Ensure that workspace is set to default workspace in 4DIAC application folder to view existing examples.
  • Debug Perspective - Used to visualise realtime data and event flow
  • 4DIAC_Debug

  • Deployment Perspective - Used to deploy/test application to an embedded resource and/or host system.
  • 4DIAC_Deployment

  • Resources Perspective - Lists all the resources associated with projects in the workspace
  • 4DIAC_Resources

  • System Perspective - Provides a system view with system explorer, system configuration and application
  • 4DIAC_System

  • Type Management Perspective - View and manage Function Block types
  • 4DIAC_Type
    We will learn more on 4DIAC perspectives and IDE usage in next chapter