# # $Id$ # 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 PowerPC Simulator (PSIM) on hello. gdb - This invokes gdb with the integrated PowerPC Simulator (PSIM) on hello. clean - This stanza removes all generated files. The tool directory must be in your path for this to work. SAMPLE SESSION WITH PSIM ======================== The following is a sample session with psim: $ gmake run /home/joel/gnat-3.10p/powerpc-rtems//bin/psim hello Hello World Hello World gmake: *** [run] Error 132 At this point, programs run under the powerpc-rtems-run command restart a second time. This is an known problem with the RTEMS PSIM Board Support Package. Note that the powerpc-rtems-run command has no interactive mode. SAMPLE SESSION WITH GDB ======================= The following is a sample session with sis: $ gmake gdb /home/joel/gnat-3.10p/powerpc-rtems//bin/psim-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=powerpc-unknown-eabi"... Connected to the simulator. (gdb) run Starting program: /usr1/rtems/work/tools_ada/example/hello Hello World (gdb) quit The program is running. Quit anyway (and kill it)? (y or n) y 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 "psim-gdb" is a script which always invokes a command file to initialize the simulator and load the executable into the simulator's memory.