Demo application for GRiSP boards
WARNING This script has only been tested on Linux WARNING
First you need the full toolchain already built:
$ cd {{GRISP_TOOLCHAIN_ROOT}}
$ make install
Then you need to build OTP for the project. rebar3 may be able to download a
pre-built image of OTP, if it is not working you should add this to rebar.config
in the grisp
section:
{platform, grisp2},
{build, [
{toolchain, [
{directory,"{{GRISP_TOOLCHAIN_ROOT}}/rtems/5"}
]}
]},
replacing GRISP_TOOLCHAIN_ROOT by the path to the toolchain checkout built previously.
Then you can build OTP with:
$ rebar3 grisp build
Now you can generate the EMMC demo image:
$ ./make_image.sh -t {{GRISP_TOOLCHAIN_ROOT}} -n grisp_demo -v 0.1.0
To flash the image to the GRiSP board:
-
Copy the image to an SD card:
macOS
$ cp grisp2_emmc.img.gz /Volumes/GRISP
Linux
$ cp grisp2_emmc.img.gz /media/$USER/GRISP
-
Unmount the SD card:
macOS
$ diskutil umount /Volumes/GRISP
Linux
$ umount /media/$USER/GRISP
-
Insert the SD card in the GRiSP board.
-
Open a serial console to the board:
macOS
$ screen /dev/tty.usbserial-010031 115200
Linux
$ screen /dev/ttyUSB1 115200
-
Reset the board using the button on the board.
-
Open the bootloader console by pressing any key in the serial console before 3 seconds.
-
Flash the compressed image, this could take some minutes:
:/ uncompress /mnt/mmc/grisp2_emmc.img.gz /dev/mmc1
-
Remove the SD card.
-
Reset the GRiSP board again, and it should boot the erlang demo.
-
To boot the RTEMS demo, go to the bootloader console by reseting and pressing a key before 3 seconds, then running:
:/ boot -m /mnt/emmc
That would list all the possible boot entries on the EMMC select
GRiSP RTEMS Demo
to start the toolchain demo and get an RTEMS shell.