Base container for zephyr projects.
$ sudo apt-get install -y libffi-dev libssl-dev
$ sudo apt-get install -y python3-dev
$ sudo apt-get install -y python3 python3-pip
$ pip3 install docker-compose
Make sure, ~/.local
is within $PATH
or re-link e.g. it to /usr/local
.
$ cd ./docker
$ echo "UID=$(id -u)" > .env
$ echo "GID=$(id -g)" >> .env
$ docker-compose build
Build target
$ docker-compose -f ./docker-compose.yml run --rm zephyr
Login to develop, e.g. for the SiFive HiFive1 Rev B
$ docker-compose -f ./docker-compose.yml run --rm zephyr /bin/bash
docker$ cd ./zephyrproject/zephyr
docker$ west build -b hifive1_revb samples/basic/blinky
docker$ west flash
!!!Make sure the device is plugged (/dev/ttyACM0 exists) before entering the container!!!
NB: Appending --privileged
is not safe! Mainly this is used for such things as connecting the USB (SEGGER) the easiest way possible.
NB: Append /bin/bash
to enter the current container for debugging