PSIM - model the PowerPC environment Copyright (C) 1994-1996, Andrew Cagney . ---------------------------------------------------------------------- Building PSIM This file describes how to build the program PSIM o Walk through a basic build o Discussion of PSIM's components and how they relate to the build process o Detailed description of each of PSIM's compile time configuration options ---------------------------------------------------------------------- BUILDING PSIM: PSIM 1.0.2 is included in GDB-4.16. To build PSIM you will need the following: gdb-4.16.tar.gz Available from your favorite GNU ftp site gcc GCC version two includes suport for long long (64bit integer) arrithemetic which PSIM uses. Hence it is recommended that you build PSIM using GCC. Method: 1. Unpack gdb $ cd .../scratch $ gunzip < gdb-4.16.tar.gz | tar xf - 2. Configure gdb First consult the gdb documentation $ cd .../scratch $ cd gdb-4.16 $ more README $ more gdb/README then something like (I assume SH): $ CC=gcc ./configure \ --enable-sim-powerpc \ --target=powerpc-unknown-eabi \ --prefix=/applications/psim 4. Build (again specifying GCC) $ make CC=gcc alternatively, if you are short on disk space or only want to build the simulator: $ ( cd libiberty && make CC=gcc ) $ ( cd bfd && make CC=gcc ) $ ( cd sim/ppc && make CC=gcc ) 5. Install $ make CC=gcc install or just $ cp gdb/gdb ~/bin/powerpc-unknown-eabisim-gdb $ cp sim/ppc/run ~/bin/powerpc-unknown-eabisim-run ---------------------------------------------------------------------- UPDATING PSIM: A PSIM is an ongoing development. Occasional snapshots which both contain new features and fix old bugs are made available. See the ftp directory: ftp://ftp.ci.com.au/pub/psim/beta or ftp://cambridge.cygnus.com/pub/psim/beta for the latest version. To build/install one of these snapshots, you replace the sim/ppc found in the gdb archive with with one from the snapshot. Then just re-configure and rebuild/install. Procedure: 0. A starting point $ cd gdb-4.16 1. Remove the old psim directory $ mv sim/ppc sim/old.ppc 2. Unpack the new one $ gunzip < ../psim-NNNNNN.tar.gz | tar tf - $ gunzip < ../psim-NNNNNN.tar.gz | tar tf - 3. Reconfigure/rebuild (as seen above): $ CC=gcc ./configure \ --enable-sim-powerpc \ --target=powerpc-unknown-eabi \ --prefix=/applications/psim $ make CC=gcc ---------------------------------------------------------------------- UPDATES TO GDB: From time to time, problems involving the integration of PSIM into gdb are found. While eventually each of these problems is resolved there can be periouds during which a local hack may be needed. At the time of writing the following were outstanding: ATTACH command: ftp://ftp.ci.com.au/pub/psim/gdb-4.15+attach.diff.gz or ftp://cambridge.cygnus.com/pub/psim/gdb-4.15+attach.diff.gz PSIM, unlike the other simulators found in GDB, is able to load the description of a target machine (including the initial state of all processor registers) from a file. Unfortunatly GDB does not yet have a standard command that facilitates the use of this feature. Until such a command is added, the patch (hack?) gdb-4.15+attach.diff.gz can be used to extend GDB's attach command so that it can be used to initialize the simulators configuration from a file. ---------------------------------------------------------------------- RUNNING PROGRAMS: See the file: ftp://ftp.ci.com.au/pub/psim/RUN or ftp://cambridge.cygnus.com/pub/psim/RUN ---------------------------------------------------------------------- COMPILE TIME CONFIGURATION OPTIONS: PSIM's compile time configuration is controlled by autoconf. PSIM's configure script recognises options of the form: --enable-sim-