Skip to content

Commit

Permalink
Add instructions for building with docker
Browse files Browse the repository at this point in the history
  • Loading branch information
suurkivi committed Mar 2, 2024
1 parent af364d5 commit b7efc4c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ conditionally subscribe the `System` object to the new START, START_CFM, STOP, a

lastly, route any desired read and write host commands to the new module in the switch statement in the `DELEGATE_PROCESS_COMMAND` event in `source/Delegate.cpp`

### Building with docker

First build the `adafruit-seesaw-builder` container:

```
docker build --platform linux/amd64 -f scripts/adafruit-seesaw-builder.Dockerfile --tag adafruit-seesaw-builder .
```

Then use it to build, e.g.:

```
docker run --platform linux/amd64 -v "$(pwd):/seesaw" -w /seesaw adafruit-seesaw-builder make BOARD=samd09Breakout
```

Since the above make command mounts the current directory as a docker volume, build files will show up in `build/` as usual.

# Future Work

Much of the boilerplate work listed above could be automated away using the preprocessor and other build tools so only the new module files would need to be edited.
Expand Down
21 changes: 21 additions & 0 deletions scripts/adafruit-seesaw-builder.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:xenial

RUN apt-get update && apt-get install -y \
curl \
libexpat1 \
libisl15 \
libmpc3 \
libmpfr4 \
python \
libpython2.7 \
make

RUN mkdir /debs

WORKDIR /debs

RUN curl -LO https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb

RUN echo "8c359c83adf69a8e3be27f239e14725bb000fdbc0b2f3dc14e9b7654dbcf89ce gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb" | sha256sum --check

RUN dpkg -i gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb

0 comments on commit b7efc4c

Please sign in to comment.