Building the VM from Source

30 July 2018

To build a VM from source you need an installation of the GRiSP toolchain.

macOS Preparations#

  1. Install the toolchain dependencies:

    $ brew install xz

Linux Preparations#

No preparations needed.

Building the Toolchain#

  1. Clone the GRiSP toolchain:

    $ git clone
    $ cd grisp-software
  2. Enter the grisp-software directory and start the build script:

    $ cd grisp-software
    $ ./build/

☕️ Time to brew yourself a hot beverage! This build will take a long time on most machines, so have patience.

Once the toolchain is built, you can leave it in that folder. We will see later how we use it when creating a GRiSP project.


  1. To tell the Rebar 3 GRiSP plug-in that we want to build from source, we need to add a build key to the GRiSP section. We also need to configure which directory our toolchain exists in. Add the path to the toolchain installation in rebar.config under grispbuildtoolchaindirectory:

    % ...
    {grisp, [
        % ...
        {build, [
            {toolchain, [
                {directory, "/PATH/TO/GRiSP/grisp-software/rtems-install/rtems/5"}
    % ...

    The path "/PATH/TO/GRiSP/grisp-software/rtems-install/rtems/5" needs to point to where you have your toolchain installed with the sub path /rtems-install/rtems/5 added on. Because of how the toolchain works currently, the path has to be a full path (e.g. starting with /Users/you/GRiSP on macOS or /home/you/GRiSP on Linux).

  2. The next step is to build Erlang for the GRiSP board itself:

    $ rebar3 grisp build
    ===> Verifying dependencies...
    ===> Checking out Erlang/OTP 21.0
    * Cloning...  (this may take a while)
    ===> Preparing GRiSP code
    * Copying C code...
    * Patching OTP...
    ===> Building
    * Running autoconf...
    * Running configure...  (this may take a while)
    * Building...  (this may take a while)
    * Installing...
    ===> Done