Setting up the environment in Mac OS X

  1. Install Homebrew
    $ ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
  2. Install the toolchain
    $ brew install https://raw.github.com/PX4/homebrew-px4/master/gcc-arm-none-eabi-48.rb
  3. Install libopencm3 and examples
    $ cd ~/Dev/ARM/
    $ git clone https://github.com/libopencm3/libopencm3-examples.git
    $ cd libopencm3-examples
    $ git submodule init
    $ git submodule update
    $ make
  4. Compile an example
    $ cd examples/stm32/f1/stm32-h107/flash_rw_example/
    $ make
  5. Flash the example to the device by following the instructions here