Here are some notes for setting up the cross-compiler, SimpleScalar, and sim-panalyzer.
First, you need to setup the cross-compiler.
The easiest way to do this is using crosstool (get it here: http://www.kegel.com/crosstool/crosstool-0.43.tar.gz). Here is how I setup the cross-compiler using crosstool.
(1)
Unpack the tarball, descend into the crosstool-0.43 directory, and open the file "demo-arm.sh"
(2)
Change the line "RESULT_TOP" to indicate where you want the cross-compiler installed
(3)
Change "GCC_LANGUAGES" only to use "c" (this should make it compile faster)
(4)
The eval line (at the bottom) that you want is "eval `cat arm.dat gcc-4.1.1-glibc-2.3.2.dat` sh all.sh --notest"
(5)
Unset your LD_LIBRARY_PATH environment variable (e.g. in bash, export LD_LIBRARY_PATH = "")
(6)
Run "./demo-arm.sh". This *should* download the sources (with versions specified in that "eval" line), compile the cross-compiler, and put it in RESULT_TOP. Note that this may take some time (maybe up to an hour). Make sure you have enough space for the installation (you can delete the installation files after it compiles correctly).
Now, setup SimpleScalar-ARM.
First, get the file: http://www.eecs.umich.edu/~taustin/code/arm/simplesim-arm-0.2.tar.gz
Next...
(1)
In the Makefile, change the compiler from "gcc" to "gcc34" (the code needs to be compiled using an older version, e.g. version 3.4, of gcc than the current -- your Linux distribution should have a package you can download).
(2)
Add the following to the top of range.h and eval.h: #include "errno.h"
(3)
Run "make". If everything worked, it should say "my work is done here..."
To setup sim-panalyzer,
First download the file from http://www.eecs.umich.edu/~panalyzer/locked_files/sim-panalyzer-2.0.3.tar.gz
(you may need a password for this...)
Next...
(1)
This is built on SimpleScalar, so the installation process is similar. We don't need to change the gcc version, or edit the 2 header files (they've already been fixed).
(2)
Descend into PA2.0.3/Implementations/ARM/sim-panalyzer-2.0
(3)
Remove the "tests" directory
(4)
Run "make config-arm"
(5)
Edit "machine.h" and move the line "extern enum md_opcode md_mask2op[];" after the definition of md_opcode.
(6)
Run "make", and that should be it