Hi!
I'm also on Mac and I created the docker flavour of the development environment to solve the problems you are facing. I wanted to minimise the number of applications/languages/frameworks to install on the system while staying in the Mac world of tools. I'm using the toolbelt to build the firmware but has settled for running the python library/client natively (installing the required dependencies using pip3).
Looks like you have installed docker and run the toolbelt, that's a good start. A bit further down in output from the toolbelt you should find the following lines
Code: Select all
Installation on linux, OSX and Windows:
Add "alias tb='docker run --rm -it -e "HOST_CW_DIR=${PWD}" -e "CALLING_HOST_NAME=$(hostname)" -e "CALLING_UID"=$UID -e "CALLING_OS"=$(uname) -v ${PWD}:/tb-module -v ${HOME}/.ssh:/root/.ssh -v /var/run/docker.sock:/var/run/docker.sock bitcraze/toolbelt'" to your .profile or .bashrc
The toolbelt is using an alias to make it easy to run it. Just add
Code: Select all
alias tb='docker run --rm -it -e "HOST_CW_DIR=${PWD}" -e "CALLING_HOST_NAME=$(hostname)" -e "CALLING_UID"=$UID -e "CALLING_OS"=$(uname) -v ${PWD}:/tb-module -v ${HOME}/.ssh:/root/.ssh -v /var/run/docker.sock:/var/run/docker.sock bitcraze/toolbelt'
to one of the files that are loaded when your shell is started, I use ~/.profile. If ~/.profile does not exist, create a new file in your home folder named .profile and paste the line above into it, save and restart your terminal.
If all is good you should now be able to run the toolbelt using the alias "tb"
When I run it (located in the crazyflie-firmware directory) I get
Code: Select all
Kristoffers-MacBook-Air-2:crazyflie-firmware kristoffer$ tb
Usage: tb tool [arguments]
The toolbelt is used to develop, test and build Bitcraze modules. When the toolbelt is called, it will first try to find the tool in the belt, after that it will try the tools in the module if the working directory is the root of a module. Module tools are executed in the context of a docker container based on the module requirements configured in the module.json config file.
Tools in the belt:
help, -h, --help - Help
update - Update tool belt to latest version
version, -V, --version - Display version of the tool belt
ghrn - Generate release notes from github milestone
Tools in the current module:
build
clean
compile
make
test
The idea is that the toolbelt acts on the project in the current directory, so make sure you are located where you have cloned the firmware code.
To build the crazyflie binary:
To build the crayflie binary with 4 CPUs:
To clean the binaries there is no need to use the toolbelt (assuming you have developer tools installed)
If you have pip3 installed the python library you can flash the crazyflie using
Hope this helps to get the toolbelt up and running.
This post is growing, I'll write a second one on how to work with projects.