SimpleScalar/ARM Admin

Introduction

simplesim-arm is not tested or guaranteed to work on 64-bit Linux systems (like ours). But it seems to work. The trick is to make the source directory and build directory the same directory (denoted by --prefix below)..

Download

From the University of Michigan's SimpleScalar website, download:

  1. SimpleScalar/ARM
  2. SimpleScalar/ARM cross-compiler kit

Prepare

  1. On your build/distribution system, verify or install gcc 3.4:
    
    % yum list installed | grep compat-gcc-34
    compat-gcc-34.x86_64                     3.4.6-4.1                     installed
    % which gcc34
    /usr/bin/gcc34
    
    
  2. We need to build everything with gcc34. Set environment variables accordingly:
    
    % setenv CC gcc34
    % setenv HOST_CC gcc34
    
    

Build

Build SimpleScalar/ARM

  1. Unpack the distribution:
    
    % gunzip simplesim-arm-0.2.tar.gz
    % tar -xvf simplesim-arm-0.2.tar
    % cd simplesim-arm
    
    
  2. Follow Hao Wang's advice to comment out error-producing cygwin 'if' clauses.
  3. Make:
    
    simplesim-arm% make config-arm
    simplesim-arm% make "CC=gcc34"
    
    

Build SimpleScalar/ARM cross-compiler kit

Build binutils

  1. Configure, Make, Make Install:
    
    binutils-2.10% ./configure --target=arm-linux --host=arm-linux --prefix=/util/simplesim/crossdir
    binutils-2.10% make
    binutils-2.10% sudo make install
    
    
  2. Add the crossdir binaries directory to your executable path to get ready for the next build:
    
    % setenv PATH ${PATH}:/util/simplesim/crossdir/bin
    % rehash
    
    

Build GNU GCC

  1. Configure, Make, Make Install:
    
    gcc-2.95.2% ./configure --target=arm-linux --host=arm-linux --prefix=/util/simplesim/crossdir
    gcc-2.95.2% make LANGUAGES=c
    gcc-2.95.2% sudo make LANGUAGES=c install
    gcc-2.95.2% cd ..
    crossdir% sudo vi lib/gcc-lib/arm-linux/2.95.2/specs
    
    [replace all occurrences of "elf32arm" with "armelf_linux"]
    
    

References

  1. http://www.simplescalar.com/v4test.html
  2. http://web.eecs.umich.edu/~taustin/code/arm/ANNOUNCE.ARM
  3. http://web.eecs.umich.edu/~taustin/code/arm-cross/ANNOUNCE.cross
  4. https://sites.google.com/site/pkuwangh/solutions/simplescalar