How to Install MRAA Library

Eclipse Mraa (Libmraa) is a C/C++ library with bindings to Java, Python and JavaScript to interface with the IO, with a structured and sensors API where port names/numbering matches the board that you are on. Use of libmraa does not tie you to specific hardware with board detection done at runtime you can create portable code that will work across the supported platforms.

The intent is to make it easier for developers and sensor manufacturers to map their sensors & actuators on top of supported hardware and to allow control of low level communication protocol by high level languages & constructs.

Note: By default, MRAA library is already on PX30 Yocto image & also mentioned in the section of Ubuntu instruction page to guide you how to install


Our MRAA libraries has been ready on Eclipse MRAA GitHub whic is supported on LEC-PX30 & LEC-AL-AI with industrial Pi-SMARC as the following screen.

image-20191215174758939

How to Build & Install MRAA on your boards:

Building mraa on Ubuntu:

  1. Build dependencies is required:

    $ sudo apt-get install git build-essential python-dev nodejs-dev cmake libjson-c-dev python3-dev byacc

    MRAA expects the minimum swig version is 3.0.5 and please follow the below instructions:

    $ sudo apt-get install automake libpcre3-dev
    $ git clone https://github.com/swig/swig.git
    $ cd swig
    $ ./autogen.sh
    $ ./configure
    $ make
    $ sudo make install
  2. Basic build Steps:

    $ git clone https://github.com/eclipse/mraa.git
    $ cd mraa
    $ mkdir build
    $ cd build
    $ cmake ..

    Note: If this goes wrong and you have all the dependencies installed, then please file an issue with the full output of cmake .. and make or however far you got.

  3. After that you can install built files by running:

    $ sudo make install

Building mraa on Yocto:

Intel mraa recipe is here and please add it to your building Yocto.