The app has the same core game written in Erlang but it is deployed in the GRiSP 2 board.
The aim of this project is to study GRiSP 2 applications using webserver and also acquire know-how of the GRiSP development with Erlang as Kernel itself.
The application is running in a specific version of OTP and the project specifies the OTP and rebar3 version using the asdf program. It is important to keep in mind that the OTP version locally must match the version that will be deployed.
The next command will download any package needed and also compile the erlang application:
$ rebar3 compile
The GRiSP 2 board support only a few OTP versions. It means that the rebar3_grisp plugin will download pre-compile toolchains to compile the application to the GRiSP target board. If you need a non-listed OTP version you will need some other steps to prepare the toolchain.
If you want to check the supported pre-build OTP toochain version:
$ rebar3 grisp package list
===> GRiSP pre-built OTP versions for platform 'grisp2'
Version
23.3.4.9
23.3.4.11
24.3.4.2
24.3.4.8
25.0.3
25.2.3
For this project, we selected the OTP version 25.0.3
. It means the file rebar.config
need to be set for this specific version and this info will be use during the deployment for compatibility checks.
During the development, I found very challenging to make the combination: rebar3
, OTP
and toolchain
to work properly in the MAC OS, even using the asdf - Deployment guide. In order to mitigate this problem, I added some steps in the Makefile to create a image-builder
container using docker that will compile the app and generate the files in the image/
folder.
Once the files are generate, you can just copy them to the SD-Card
$ make docker.build
Before generating the deployment files, be sure you read all documentation about deployment with wi-fi and also setup all values accordingly with your environment:
$ make grisp.image
$ cp -a image/ /Volumes/{VOLUME-NAME}/
- Grisp website: https://www.grisp.org/resources/
- Grisp Quickstart: https://github.com/grisp/grisp/wiki/GRiSP-2-Hardware-Quickstart
- Grisp Software: https://github.com/grisp/grisp