It has been a while since I wrote about ARM development. I recently made a Black Magic Probe (BMP) clone which acts different then the original. The BMP can source power to the target, but on my version control signal is inverted. Not a big deal, but can give unintentional results and has to be fixed. Just for my own memory I wrote down all the steps involved in setting it up and shared it in order to be useful for others.

Since most of the ‘free’ development enviroments are based on Linux and my main OS is Windows. I took the road of installing the new enviroment in a new virtual machine. It also had the advantage is it easily setup, has standard hardware (to the guest OS) and can be thrown away when done or when made an mistake. I won’t go into the details of setting up an virtual machine and installing the OS in that. I choose Ubuntu as guest OS since that is widely used.

After the installation is finished, start a new terminal and enter the next commands to get the needed dependencies and tools installed. When done the toolchain will be installed in the ‘/usr/local’ directory.

 sudo apt-get update
 sudo apt-get upgrade
 sudo apt-get install git
 sudo apt-get install make
 sudo apt-get install python
 sudo apt-get install python-pip 
 sudo pip install intelhex
 cd ~/Downloads
 bzip2 -d gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2
 cd /usr/local/
 sudo tar xsf ~/Downloads/gcc-arm-none-eabi-6-2017-q2-update-linux.tar
 sudo usermod -a -G dialout $USER

Instead of using wget to get the file directly using a webbrowser. The latest version can be found here.

Next we need to add the toolchain to path variable (could be optional as the absolute path can be set in a Makefile I guess). The easiest way I could find was to alter the file ‘/etc/environment’ and add the ‘/usr/local/gcc-arm-none-eabi-6-2017-q2-update/bin’ directory to the PATH variable. Afterwards, mine looked like this:


I prefer to have a separate directory in which all of my projects are saved, from the same commandline:

 cd ~
 mkdir armdevelopment
 cd armdevelopment

Finally we can use ‘git’ to get the repository to the local machine and work on the code. I first used the GitHub webpage to fork the existing repo (located here) to my GitHub space. To retrieve all the files (the Blackmagic probe relies on libopencm3 to function) this command is used:

 git clone --recursive

More to come soon..

Share this