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