Compiler Installation Guide

If you want to actually use the supersmall, you're going to want to be able to write your own custom code for it. And if you want to write your own code, you're going to need a toolchain to transform that code into binaries that the supersmall will actually run. That's where supersmall-compiler-mips-softmul comes in: it's a combination of GCC, binutils, and newlib, set up to cross-compile your C or C++ programs into the MIPS subset supported by the supersmall. These are the actual compilation tools that were used to develop the tests for the supersmall, and therefore are known to work, and should be fairly easy to get running.

However, you don't necessarily need to use this toolchain to compile your code for the supersmall soft processor: any MIPS compiler or assembler capable of producing the supersmall's supported instructions should work fine. It's provided for your convenience, and it is known to work, but if you want to try your own, you can skip this section and go straight to the information on programming the processor.


This document assumes you have access to a standard unix development environment, including such tools as bash, make, and gcc. If you're running Windows, probably the best way to obtain these is by using Cygwin, obtainable for free from If you're running a linux distribution, these should already be installed, but may require you to install development packages.


  1. Download the compiler package from the distribution page.

  2. Uncompress the files onto an appropriate location on your computer.


  3. Run BUILD in the root directory of the compiler package you just downloaded. It will take a significant amount of time to compile the mips cross-compiler and associated files.


  4. After that's completed, you should have a host of mips-mips-* tools populating the bin directory of your package. You can use these to compile programs to mips object code, which is what is used by the supersmall. For more details on how exactly to make the processor run your code, see the supersmall programming guide.

Recompiling the test applications

If you want to use the compiler you just compiled to recompile the supersmall's test applications, here's how to do it:

  1. Modify the SPE_COMPILER and SPE_COMPILER_LIBPATH constants in "", which is located in the testing/applications directory of the main supersmall distribution package, setting them to point to wherever you unpacked the compiler. By default, they expect it to be in a "compiler" subdirectory of the supersmall directory. This means the easiest way to do it is this:

    mv supersmall-compiler-gnu-softmul-X.Y/ supersmall-X.Y/compiler

  2. Use the "" shell script, located in the testing directory of the supersmall distribution package, to recompile the applications with your compiler. The script must be given a file which lists the applications to be reconfigured. The provided "benchmarks" file lists the default tests contained in the supersmall distribution package, but if you're following the programming guide, you might end up making your own.

    testing/ testing/applications/benchmarks

    Beware: this will recompile the applications, but will not remake the software simulator execution traces. Unfortunately, the MIPS software simulator we used to make the traces is not distributable, and therefore, if you want to have software traces against which to test the processor, you will have to find some alternate way of generating them.