Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Environment Setup

Soo-Hyun Yoo edited this page Apr 5, 2016 · 8 revisions

Mac OS

This assumes you already have HomeBrew and MacPorts installed.

Install the GCC ARM toolchain (v4.9) (based on Pixhawk instructions):

brew tap PX4/homebrew-px4
brew update
brew install genromfs
brew install kconfig-frontends
~~brew install gcc-arm-none-eabi-49~~

As of March 2015, the latest version of gcc-arm-none-eabi breaks the compilation. Instead, install the last version from 2014 from here. Unzip this to /usr/local/.

Verify installation:

arm-none-eabi-gcc --version

Install Tup, the build system:

brew install tup

Install stlink per these instructions. This is the programmer.

If you encounter permissions errors while using stlink, add the following to /etc/udev/rules.d/45-usb-stlink-v2.rules:

#FT232
ATTRS{idProduct}=="6014", ATTRS{idVendor}=="0403", MODE="666", GROUP="plugdev"

#FT2232
ATTRS{idProduct}=="6010", ATTRS{idVendor}=="0403", MODE="666", GROUP="plugdev"

#FT230X
ATTRS{idProduct}=="6015", ATTRS{idVendor}=="0403", MODE="666", GROUP="plugdev"

#STLINK V1
ATTRS{idProduct}=="3744", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"

#STLINK V2
ATTRS{idProduct}=="3748", ATTRS{idVendor}=="0483", MODE="666", GROUP="plugdev"

Unplug and plug back in the stlink programmer for the change to take effect.

You are now ready to follow the build instructions in the firmware readme.

Arch Linux

If you use Arch, you shouldn't need directions, but:

Install the arm-none-eabi-gcc toolchain and Tup:

pacman -S arm-none-eabi-gcc tup

As of April 4, 2016, I have not found a solution to the firmware hang when compiled with GCC 5.3.0 (Issue #53). Latest working version is 4.9.2-1 from the Arch community repository. Use downgrade to downgrade to that version.

Install stlink:

pacman -S stlink
  • [Environment Setup](Environment Setup)
Clone this wiki locally