[7efcefa] | 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 PowerPC Simulator (PSIM) on hello. |
---|
| 14 | |
---|
| 15 | gdb - This invokes gdb with the integrated PowerPC Simulator |
---|
| 16 | (PSIM) 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 PSIM |
---|
| 23 | ======================== |
---|
| 24 | |
---|
| 25 | The following is a sample session with psim: |
---|
| 26 | |
---|
| 27 | $ gmake run |
---|
| 28 | |
---|
| 29 | /home/joel/gnat-3.10p/powerpc-rtems//bin/psim hello |
---|
| 30 | Hello World |
---|
| 31 | Hello World |
---|
| 32 | gmake: *** [run] Error 132 |
---|
| 33 | |
---|
| 34 | At this point, programs run under the powerpc-rtems-run command |
---|
| 35 | restart a second time. This is an known problem with the RTEMS PSIM |
---|
| 36 | Board Support Package. |
---|
| 37 | |
---|
| 38 | Note that the powerpc-rtems-run command has no interactive mode. |
---|
| 39 | |
---|
| 40 | |
---|
| 41 | SAMPLE SESSION WITH GDB |
---|
| 42 | ======================= |
---|
| 43 | |
---|
| 44 | The following is a sample session with sis: |
---|
| 45 | |
---|
| 46 | $ gmake gdb |
---|
| 47 | /home/joel/gnat-3.10p/powerpc-rtems//bin/psim-gdb hello |
---|
| 48 | GNU gdb 4.16.1a |
---|
| 49 | Copyright 1996 Free Software Foundation, Inc. |
---|
| 50 | GDB is free software, covered by the GNU General Public License, and you are |
---|
| 51 | welcome to change it and/or distribute copies of it under certain conditions. |
---|
| 52 | Type "show copying" to see the conditions. |
---|
| 53 | There is absolutely no warranty for GDB. Type "show warranty" for details. |
---|
| 54 | This GDB was configured as "--host=i486-linux --target=powerpc-unknown-eabi"... |
---|
| 55 | Connected to the simulator. |
---|
| 56 | (gdb) run |
---|
| 57 | Starting program: /usr1/rtems/work/tools_ada/example/hello |
---|
| 58 | Hello World |
---|
| 59 | (gdb) quit |
---|
| 60 | The program is running. Quit anyway (and kill it)? (y or n) y |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | Note that the user typed "run" to start the executable and "quit" to |
---|
| 64 | exit the debugger. Other gdb commands function the same as when gdb |
---|
| 65 | is used natively. |
---|
| 66 | |
---|
| 67 | The program "psim-gdb" is a script which always invokes a command file |
---|
| 68 | to initialize the simulator and load the executable into the simulator's |
---|
| 69 | memory. |
---|
| 70 | |
---|
| 71 | |
---|