1.4. Running and Debugging Your Program

The steps to run or debug your program depend on your target system and how it is configured. Choose the appropriate method for your target.

Debug your program in the QEMU emulator.  The QEMU emulator provides an easy way to try out your program without requiring target hardware. QEMU support is integrated with the GDB debugger. Refer to Section 4.3.1, “Connecting to the QEMU Emulator” for instructions on using QEMU.

Debug your program on the target using the Debug Sprite.  You can use the Sourcery CodeBench Debug Sprite to load and execute your program on the target from the debugger. Refer to Section 4.3, “Running Applications from GDB” for instructions on using the Sprite from the GDB command line. Detailed reference material for the Sourcery CodeBench Debug Sprite, including information about supported debug devices, can be found in Chapter 6, “Sourcery CodeBench Debug Sprite”.

Run your program on the target using YAMON.  You can run programs built with Sourcery CodeBench Lite on MIPS ELF targets via the YAMON boot monitor. For instructions, refer to Section 3.5, “Using Sourcery CodeBench with YAMON”. Note that you must select a YAMON linker script profile when building your program.

Debug your program on the target using a third-party debug device.  Sourcery CodeBench supports debugging programs on the remote target using third-party debug devices that can communicate via the GDB remote serial protocol. For command-line GDB instructions, see Section 4.3, “Running Applications from GDB”.