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.

Run or debug your program in the simulator.  Sourcery CodeBench Lite includes an instruction-set simulator, which provides an easy way to run or debug your program without requiring target hardware. The simulator can be run directly from the command line (see Section 4.3, “Running Applications in the Simulator”) or via the debugger (see Section 4.4, “Running Applications from GDB”).

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.4, “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”.

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.4, “Running Applications from GDB”.