Arm compiler environment

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(DFU-Util setup)
(DFU-Util setup)
Line 50: Line 50:
  
 
# Add the extracted folder to your environment variables ($PATH for linux)
 
# Add the extracted folder to your environment variables ($PATH for linux)
## This can be done on linux by adding the following to <code>~/.profile</code>: <code>export PATH=$PATH:<absolute path to DFU-Util folder></code>
+
## This can be done on linux by adding the following to '''<code>~/.profile</code>''': <code>export PATH=$PATH:<absolute path to DFU-Util folder></code>
  
 
The DFU-util also comes in a Python version, which is included in the Scripts folder for convenience.
 
The DFU-util also comes in a Python version, which is included in the Scripts folder for convenience.
  
 
More info about the DFU-Util can be found at [http://dfu-util.sourceforge.net/].
 
More info about the DFU-Util can be found at [http://dfu-util.sourceforge.net/].

Revision as of 12:48, 30 May 2016

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

OBS: Only the anchors, with their Cortex-M0 processor, supports programming through USB (DFU protocol).

The host-side tool used for programming the devices through USB, is called DFU-Util.
The tool can be downloaded at [1], and is ready to be used out of the box.

Extract the tool where you usually install programs (for linux this is usually /opt/ or /usr/local/), and choose one of the following three:

  1. Add the extracted folder to your environment variables ($PATH for linux)
    1. This can be done on linux by adding the following to ~/.profile: export PATH=$PATH:<absolute path to DFU-Util folder>

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

More info about the DFU-Util can be found at [2].

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox