These instructions assume that you are using a version of Linux, but should also work on BSD-derived OSes (including OS X). Windows users may wish to try Cygwin, create a Linux VM (although flashing the board from a VM may require some thought), or consider their life choices.
-
git
can be found in your distribution's repositories, or online. -
A working C compiler, such as
gcc
orclang
, also from your distribution's repositories. -
make
, also from your distribution's repositories. -
The
arm-none-eabi
toolchain. This may be in your distribution's repositories, otherwise download it from Launchpad and follow the instructions in the README. -
stm32flash
, which can be found on Google Code. After downloading, build and install it:$ make $ sudo make install
-
From a shell,
cd
into the directory where you cloned the repository and download thelibopencm3
submodule:$ git submodule update --init
-
Determine your
arm-none-eabi
toolchain prefix, unless it is in your$PATH
. If you downloaded it from the link above, it will be the path to thebin
directory of the extracted folder, followed byarm-none-eabi
. -
Build
libopencm3
:$ cd libopencm3 $ make PREFIX=
-
Change back to the project directory and build the firmware:
$ cd .. $ make PREFIX=
-
Connect the motor board to your machine via USB. The USB Power Light (green, next to the connector) should turn on.
-
Connect the motor board to a power source. The main power light (green, in the middle of the board) should turn on. If using the SR power board, you will have to run a program to turn on the motor rail.
-
Press the firmware button on the side of the motor board with a long thin object.
-
To test connectivity, run the following command, where X is found by running
ls /dev/ttyUSB*
:$ stm32flash /dev/ttyUSB
-
Load the firmware onto the motor board:
$ stm32flash -w mcv4.bin -v /dev/ttyUSB