(Answer) (Category) SID Faq-O-Matic :
How does one build and run sid?
As sid is mostly written in C++, a good recent C++ compiler is needed. We recommend gcc 2.95.2, or Red Hat Linux 7's gcc 2.96. While we know of no native publically-released Cygwin compiler that can build sid, using the "Canadian Cross" method, one can cross-compile sid on a larger UNIX build machine for the Cygwin host.
Additional information on accessing the sid CVS repository is given at http://sources.redhat.com/sid/.
        % mkdir /SOURCETREE
        % cd /SOURCETREE
        % cvs -d :pserver:anoncvs@sources.redhat.com:/cvs/src co sid
        % mkdir /BUILDTREE
        % cd /BUILDTREE
        % /SOURCETREE/src/configure --prefix=/INSTALLTREE [OTHEROPTIONS]
        % make all install
        % PATH=$PATH:/INSTALLTREE/bin
        % siddoc -l hw-cpu
OTHEROPTIONS for the configure line may include "--disable-shared" if you have some types of linking problems, and "--disable-nls" if you get gettext-related compile or linking failures.

A simulator by itself isn't very interesting, unless you already have an program for the simulator to run. If you don't, you should install a suitable cross-development toolchain. If you have no specific target in mind, and just want to play with the simulator, build a GNU toolchain for the "arm-elf" or "m32r-elf" targets, since sid supports these families out of the "box".
Once you have a cross toolchain, you can build toy programs such as

        % echo '#include <stdio.h>' > hello.c
        % echo 'int main () { printf ("Hello world!\n"); return 0; }' >> hello.c
        % arm-elf-gcc -EL hello.c -o hello.x    # little-endian
and run sid via the "arm-elf-sid" wrapper script:
        % arm-elf-sid hello.x
The wrapper script has many options to add optional settings such as remote debugging components, tracing, GUIs, etc. For example:
        % arm-elf-sid --gdb=2000 -EL &
        % arm-elf-gdb hello.x
        (gdb) target remote localhost:2000
        (gdb) load
        (gdb) break main
        (gdb) cont
is the start of a debugging session. Try the "--tksm" option for an experimental sid GUI.
For some ARM targets, sid can be configured with sufficient peripheral modelling support to run eCos (http://sources.redhat.com/ecos/) applications.
[Append to This Answer]
Previous: (Answer) How does sid compare or relate to other simulators?
Next: (Answer) How can one (re)build sid quickly?
This document is: http://sources.redhat.com/fom/sid?file=6
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
This FAQ administered by ...