1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | In this directory, there are the following files: |
---|
6 | |
---|
7 | Makefile - Example Makefile file |
---|
8 | README - the file you are reading. |
---|
9 | hello.adb - simple hello world file |
---|
10 | init.c - RTEMS initialization thread which invokes the Ada main |
---|
11 | |
---|
12 | The following make stanza are included: |
---|
13 | |
---|
14 | all - This stanza builds the executable hello. |
---|
15 | |
---|
16 | run - This invokes the SPARC Instruction Simulator (SIS) on hello. |
---|
17 | |
---|
18 | gdb - This invokes gdb with the integrated SPARC Instruction |
---|
19 | Simulator (SIS) on hello. |
---|
20 | |
---|
21 | clean - This stanza removes all generated files. |
---|
22 | |
---|
23 | The tool directory must be in your path for this to work. |
---|
24 | |
---|
25 | SAMPLE SESSION WITH SIS |
---|
26 | ======================= |
---|
27 | |
---|
28 | The following is a sample session with sis: |
---|
29 | |
---|
30 | $ gmake run |
---|
31 | /home/joel/gnat-3.10b/sparc-rtems//bin/sis hello |
---|
32 | |
---|
33 | SIS - SPARC intruction simulator 2.7.4, copyright Jiri Gaisler 1995 |
---|
34 | Bug-reports to jgais@wd.estec.esa.nl |
---|
35 | |
---|
36 | loading hello: |
---|
37 | section .text at 0x02000000 (159152 bytes) |
---|
38 | section .data at 0x02026db0 (4384 bytes) |
---|
39 | section .bss at 0x02027ed0 (30948 bytes)(not loaded) |
---|
40 | serial port A on stdin/stdout |
---|
41 | sis> go |
---|
42 | resuming at 0x02000000 |
---|
43 | Hello World |
---|
44 | IU in error mode (257) |
---|
45 | 712144 02000800 91d02000 ta 0 |
---|
46 | sis> quit |
---|
47 | |
---|
48 | Note that the user typed "go" to start the executable and "quit" to |
---|
49 | exit the simulator. The normal exit message is "IU in error mode (257)" |
---|
50 | because the program exits by generating an unhandled trap. |
---|
51 | |
---|
52 | |
---|
53 | SAMPLE SESSION WITH GDB |
---|
54 | ======================= |
---|
55 | |
---|
56 | The following is a sample session with sis: |
---|
57 | |
---|
58 | $ gmake gdb |
---|
59 | /home/joel/gnat-3.10b/sparc-rtems//bin/sis-gdb hello |
---|
60 | GNU gdb 4.16.1a |
---|
61 | Copyright 1996 Free Software Foundation, Inc. |
---|
62 | GDB is free software, covered by the GNU General Public License, and you are |
---|
63 | welcome to change it and/or distribute copies of it under certain conditions. |
---|
64 | Type "show copying" to see the conditions. |
---|
65 | There is absolutely no warranty for GDB. Type "show warranty" for details. |
---|
66 | This GDB was configured as "--host=i486-linux --target=sparc-erc32-aout"... |
---|
67 | |
---|
68 | SIS - SPARC instruction simulator 2.7.4 |
---|
69 | Bug-reports to Jiri Gaisler ESA/ESTEC (jgais@wd.estec.esa.nl) |
---|
70 | serial port A on stdin/stdout |
---|
71 | Connected to the simulator. |
---|
72 | loading /usr1/rtems/work/tools_ada/example/hello: |
---|
73 | section .text at 0x02000000 (159152 bytes) |
---|
74 | section .data at 0x02026db0 (4384 bytes) |
---|
75 | section .bss at 0x02027ed0 (30948 bytes)(not loaded) |
---|
76 | (gdb) run |
---|
77 | Starting program: /usr1/rtems/work/tools_ada/example/hello |
---|
78 | Hello World |
---|
79 | |
---|
80 | Program exited normally. |
---|
81 | (gdb) quit |
---|
82 | |
---|
83 | Note that the user typed "run" to start the executable and "quit" to |
---|
84 | exit the debugger. Other gdb commands function the same as when gdb |
---|
85 | is used natively. |
---|
86 | |
---|
87 | The program "sis-gdb" is a script which always invokes a command file |
---|
88 | to initialize the simulator and load the executable into the simulator's |
---|
89 | memory. |
---|
90 | |
---|
91 | |
---|