summaryrefslogtreecommitdiff
path: root/hello_world_ada/README.ERC32
blob: d058c31767221bec0077b15e1702193a45651c47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88

In this directory, there are the following files:

    Makefile  - Example Makefile file
    README    - the file you are reading.
    hello.adb - simple hello world file
    init.c    - RTEMS initialization thread which invokes the Ada main

The following make stanza are included:

    all   - This stanza builds the executable hello.

    run   - This invokes the SPARC Instruction Simulator (SIS) on hello.

    gdb   - This invokes gdb with the integrated SPARC Instruction
            Simulator (SIS) on hello.

    clean - This stanza removes all generated files.

The tool directory must be in your path for this to work.  

SAMPLE SESSION WITH SIS
=======================

The following is a sample session with sis:

    $ gmake run
    /home/joel/gnat-3.10b/sparc-rtems//bin/sis hello

     SIS - SPARC intruction simulator 2.7.4,  copyright Jiri Gaisler 1995
     Bug-reports to jgais@wd.estec.esa.nl
    
    loading hello:
    section .text at 0x02000000 (159152 bytes)
    section .data at 0x02026db0 (4384 bytes)
    section .bss at 0x02027ed0 (30948 bytes)(not loaded)
    serial port A on stdin/stdout
    sis> go
    resuming at 0x02000000
    Hello World
    IU in error mode (257)
       712144  02000800  91d02000  ta  0
    sis> quit

Note that the user typed "go" to start the executable and "quit" to
exit the simulator.  The normal exit message is "IU in error mode (257)"
because the program exits by generating an unhandled trap.

 
SAMPLE SESSION WITH GDB
=======================

The following is a sample session with sis:

    $ gmake gdb
    /home/joel/gnat-3.10b/sparc-rtems//bin/sis-gdb hello
    GNU gdb 4.16.1a
    Copyright 1996 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "--host=i486-linux --target=sparc-erc32-aout"...
    
     SIS - SPARC instruction simulator 2.7.4
     Bug-reports to Jiri Gaisler ESA/ESTEC (jgais@wd.estec.esa.nl)
    serial port A on stdin/stdout
    Connected to the simulator.
    loading /usr1/rtems/work/tools_ada/example/hello:
    section .text at 0x02000000 (159152 bytes)
    section .data at 0x02026db0 (4384 bytes)
    section .bss at 0x02027ed0 (30948 bytes)(not loaded)
    (gdb) run
    Starting program: /usr1/rtems/work/tools_ada/example/hello 
    Hello World

    Program exited normally.
    (gdb) quit

Note that the user typed "run" to start the executable and "quit" to
exit the debugger.  Other gdb commands function the same as when gdb
is used natively.

The program "sis-gdb" is a script which always invokes a command file
to initialize the simulator and load the executable into the simulator's
memory.