Arm compiler environment

From Rsewiki
Revision as of 10:53, 28 May 2016 by S123950 (Talk | contribs)

Jump to: navigation, search

The arm compiler environment for the ST microcontrollers used in the 3D localization project contains a number of software packages, which ones are needed depends on the users demands to debugging. It consists of an arm compiler including accessory binaries, openOCD for SWD usage (programming & debugging through GDB) and DFU-util for programming through USB.

Compiler setup - Linux

The following steps were performed on Linux Mint (Procedure is the same for Linux Ubuntu, but please adjust them accordingly for other distributions):

since the toolchain executables are 32-bits apps, when running on 64-bits machines, be sure you install the following 32-bits libraries (for different versions check the toolchain README for the actual list):

$ sudo apt-get -y install lib32z1 lib32ncurses5 lib32bz2-1.0

on Mint 17.3 / Ubuntu 15.04 the following libraries are required:

$ sudo apt-get -y install lib32ncurses5

on Ubuntu 12 LTSx64 all 32-bits libraries were packed in ia32-libs, so you can also use, but be prepared to get a lot of useless libraries:

$ sudo apt-get -y install ia32-libs

download the latest Linux install tarball file from Launchpad (currently gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2, more than 60 MB)

Note: DO NOT install the ARM GCC package that comes with your distribution, especially if it is newer than the one provided by Launchpad, since generally it is not supported, and debugging sessions might fail.

locate the file (usually in the $HOME/Downloads/ folder) decide on a location to install the toolchain; the recommended folder is /usr/local/ or /opt/ unpack the archive in the destination folder

$ cd /opt
$ sudo tar xjf ~/Downloads/gcc-arm-none-eabi-5_3-2016q1-20160330-linux.tar.bz2

the result should be a folder like /opt/gcc-arm-none-eabi-5_3-2016q1 test if the compiler is functional; use the actual install path:

$ /opt/gcc-arm-none-eabi-5_3-2016q1/bin/arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 5.3 20160330 (release) [ARM/embedded-5-branch revision 234589]


  1. Add to $PATH, symbolic links or change the makefile


If you’ll ever need to remove the toolchain, just remove the /opt/gcc-arm-none-eabi-5_3-2016q1, there are no other components stored in system folders.

OpenOCD setup

DFU-Util setup

The DFU-util also comes in a Python version, which is included in the Scripts folder for convenience.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox