Skip to main content

Install a GNU Arm toolchain under Mac OS

Posted in
This tutorial was realized and tested under Snow Leopard.
 
The installation of a GNU Arm Toolchain is necessary to recompile the firmware of the robot and so take into account the modifications which you would have bring to the virtual machine (choice of the Slack Stealer algorithm, personal modifications...).

Prerequisites
 
 
Dependencies
You will need to ensure that the following programs and packages are on your system :

 


Installation

 

Download packages

Download all packages below :

 

Build Arm toolchain

Extract Arm-toolchain-mac.tar.gz in a directory of your choice (example : /Users/yourusername/) : tar xvzf Arm-toolchain-mac.tar.gz.

Copy in the directory "Gnu-Arm-Toolchain/sources" binutils-2.19.1.tar.bz2, gcc-4.4.2.tar.bz2, gdb-7.1.tar.bz2 and newlib-1.17.0.tar.gz without extracting them. 

Start a terminal session, and go to the directory "Gnu-Arm-Toolchain" (/Users/yourusername/Gnu-Arm-Toolchain in our example). Then tape : ./build_arm_toolchain.sh to execute the script and to install the arm toolchain.

 

Use Arm toolchain

You need to set up environment variables.

Start a terminal session and tape :

pico ~/.bash_profile

At the end of this file, add the following line (arranged according to your settings) :

export PATH=/Users/yourusername/Gun-Arm-Toolchain/arm-elf-toolchain/bin:$PATH

Save and quit the file :

  1. CTRL+o
  2. CTRL+x

Then restart your session.

You can check that you have successfully installed GNU Arm toolchain on your PC by starting a shell session and taping "arm-elf-gcc".