4.3. Running Applications in the Simulator
Prev | Chapter 4. Using Sourcery CodeBench from the Command Line | Next

## 4.3. Running Applications in the Simulator

Sourcery CodeBench Lite includes a simulator that you can use on the host system to run programs compiled for the target system. Since you do not need target hardware, this is the easiest way to try out Sourcery CodeBench.

To use the simulator run:

    > arm-none-eabi-run factorial

You should see the expected output:

    factorial(0) = 1
    factorial(1) = 1
    factorial(2) = 2
    factorial(3) = 6
    factorial(4) = 24
    factorial(5) = 120
    factorial(6) = 720
    factorial(7) = 5040
    factorial(8) = 40320
    factorial(9) = 362880

You can also use the simulator to execute target programs when debugging with GDB. See Section 4.4, “Running Applications from GDB” for more information.

The simulator supports the ARMv4 (StrongARM), ARMv4T (ARM7TDMI, ARM920, ARM9TDMI), ARMv5, and ARMv5TE (ARM926, Xscale) instruction sets. The arm-none-eabi-run simulator also includes support for Thumb instructions.

Prev | Up | Next
4.2. Running Applications on the Target System | Home | 4.4. Running Applications from GDB