C Compiler for SpiNNaker

Follow me on GitHub

The version described here is no longer supported.

Home page for current version

To build programs on SpiNNaker, you will primarily need to install a C compiler that is compatible with SpiNNaker. At present, we recommend using gcc for this. Instructions for installing this on your system are below, depending on which platform you are using, as well as instructions for installing Perl, which is used by the development tools to modify the generated binaries to run on SpiNNaker:

Linux

Development Dependencies for 64-bit Ubuntu

  1. Install 32-bit libc

    sudo apt-get install libc6-i386
    
  2. Install perl and dependencies

    sudo apt-get install perl perl-tk libterm-readline-gnu-perl
    
  3. Follow the instructions for the Linux C Compiler, below.

Development Dependencies for 64-bit Fedora

  1. Install 32-bit libc

    sudo dnf install glibc.i686
    
  2. Install perl and dependencies

    sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
    
  3. Follow the instructions for the Linux C Compiler, below.

Development Dependencies for 32-bit Ubuntu

  1. Install perl and dependencies

    sudo apt-get install perl perl-tk libterm-readline-gnu-perl
    
  2. Follow the instructions for the Linux C Compiler, below.

Development Dependencies for 32-bit Fedora

  1. Install perl and dependencies

    sudo dnf install perl perl-Tk perl-Term-ReadLine-Gnu
    
  2. Follow the instructions for the Linux C Compiler, below.

Linux C Compiler

  1. Download GCC ARM NONE EABI Compiler - choose version 6-2017-q2-update (for the release version). For a development version we believe newer versions work, but without extensive testing. Note Windows users pick the “Linux 64-bit” as it will be used inside the shell.

  2. Extract the downloaded archive to the location of your choice

  3. Add the “bin” directory within the installed location to the PATH environment variable in .profile in your home directory, e.g., append the following:

    export PATH=$PATH:<install-location>/bin
    

    where <install-location> is the place where you extracted the file.

Mac OS X

Development Dependencies for Mac OS X

  1. If you haven’t done so already, install Xcode and all its development tools from here or via the App Store. NOTE: take into account your Mac version if using a direct download.

  2. If you haven’t done so already, sign the Xcode license to enable compilation on your computer.

    sudo xcodebuild -license
    
  3. If you haven’t done so already, install Mac Ports.

  4. Install the arm-none-eabi toolchain.

    sudo port install arm-none-eabi-gcc
    
  5. Install perl and related dependencies.

    sudo port install perl5 p5-tk p5-term-readline-gnu
    

Windows

Development Dependencies for Windows

Users with an up-to-date version of Windows 10 64-bit may want to use the Linux Subsystem for Windows 10. This has been tested with an Ubuntu 14.04 install and seems to work well. For graphics content, you will also need to install and run an X-Windows Server. After installing, you should follow the Ubuntu installation instructions.

All other Windows Users should follow the instructions below.

  1. Download the prepackaged MinGW Environment.
  2. Extract the downloaded archive to the location of your choice
  3. Create a shortcut to MinGW/msys/1.0/msys.bat and add it to your start menu

You can now use the msys.bat to start up an environment from in which you can compile C code for SpiNNaker.

Note the make requires access to the python package spinn_utilities.make_tools. This requires inside the Ubuntu/minGW window

  • sudo apt-get update
  • sudo apt install python
  • sudo pip install setuptools
  • Change to the directory with SpiNNakerManchester/SpiNNUtils
  • sudo python setup.py develop