It was easier to get docker running since I couldn’t find a precompiled version of the tool chain for OS X. What I’ve been doing is running ubuntu in a docker container that’s mounted to a workspace directory and use my standard dev environment with vim outside of the container. The same could be accomplished with Vagrant and sharing a directory with the host system.
You will need to install virtualbox and docker-machine.
Steps to run the file locally:
# initialize the host virtualbox image
docker-machine create avr -d virtualbox
# Set the DOCKER_HOST and DOCKER_MACHINE environmental variables
docker-machine env avr
eval $(docker-machine env avr)
# clone the example gist
git clone git@gist.github.com:46994b83c8a51fcb4781.git docker_mod_env
cd docker_mod_env
# build the docker container
docker build -t docker_mod_env .
# make workspace directory and clone mod repository
mkdir workspace
git clone git@github.com:tehn/mod.git ./workspace/mod
# run the docker container
docker run --volume $PWD/workspace:/root/workspace -it docker_mod_env /bin/bash
# build some things
cd mod/whitewhale/
make
cd ../earthsea
make
Normally I’ll edit outside of docker and then switch to a window running bash inside of the container to compile and then run dfu-programmer on my host. I’m glossing over many of the details, I’ll try and get some better resources together if anyone is interested, though the docker website is pretty good.