New development tool – the Toolbelt

During the autumn we introduced the docker based builder images that are used for builds on the CI server. They make sure the build environment is well known and reproducible which is key on the build server, but they can also be very useful when building code locally on your machine. The obvious upside is that if a build passes in the builder on your local machine, it should also pass on the CI server but the really nice thing here is that you don’t have to install compilers, frameworks or tools on your machine, the builder handles all that for you! The drawback has been that it requires some typing to use docker, for instance building the crazyflie-firmware project would require you to type

docker run --rm -it -v ${PWD}:/module bitcraze/builder tools/build/build

That is quite a lot of typing and to solve that we now introduce the Toolbelt, it makes it dead simple to compile or test any bitcraze project.

The Toolbelt is a set of scripts that fires up the correct builder image and then executes your build script in that container. When done, the container is shut down and disappears. For instance to build the crazyflie-firmware project with the toolbelt, locate your self in the root of the project and type

tb build

Thats it!

So how do you install it? How does it work? The toolbelt it self is also running in a docker container(!) so all you need is to install is Docker and add an alias to your .profile or .bashrc file. Run a toolbelt container to get instructions on how to install

docker run --rm -it bitcraze/toolbelt

or read the (limited) documentation on the wiki, the github repo and the help.

The toolbelt works with almost all our projects such as firmware for the Crazyflie, the radio and even our website project! The toolbelt is tested on linux and OSX. It will probably work on windows as well but we have not tested it, so if you fell inclined, please contribute any insights or fixes to the repository.

Does the Toolbelt replace the VM? No, the toolbelt is simply another option, the VM will still be around. The VM offers a more complete solution than the Toolbelt, while the toolbelt is more light weight and lets you work with your normal editor and other tools you are used to.

Let us know what you think and happy hacking!

logo

Leave a Reply

Your email address will not be published. Required fields are marked *