• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/toolchains/hndtools-armeabi-2011.09/share/doc/arm-arm-none-eabi/html/getting-started/
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>4.3.�Running Applications in the Simulator</title><link rel="stylesheet" href="cs.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.74.0"><link rel="home" href="index.html" title="Sourcery CodeBench Lite"><link rel="up" href="chap-building.html" title="Chapter�4.�Using Sourcery CodeBench from the Command Line"><link rel="prev" href="ch04s02.html" title="4.2.�Running Applications on the Target System"><link rel="next" href="sec-remote-debugging.html" title="4.4.�Running Applications from GDB"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.3.�Running Applications in the Simulator</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch04s02.html">Prev</a>�</td><th width="60%" align="center">Chapter�4.�Using Sourcery CodeBench from the Command Line</th><td width="20%" align="right">�<a accesskey="n" href="sec-remote-debugging.html">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-gdbsimulator"></a>4.3.�Running Applications in the Simulator</h2></div></div></div><p>
2   Sourcery CodeBench Lite includes a simulator that you can use on the host system to
3   run programs compiled for the target system.  Since you do not need
4   target hardware, this is the easiest way to try out Sourcery CodeBench.
5  </p><p>
6   To use the simulator run:
7   </p><pre class="screen">&gt; arm-none-eabi-run factorial</pre><p>
8   You should see the expected output:
9   </p><pre class="screen">factorial(0) = 1
10factorial(1) = 1
11factorial(2) = 2
12factorial(3) = 6
13factorial(4) = 24
14factorial(5) = 120
15factorial(6) = 720
16factorial(7) = 5040
17factorial(8) = 40320
18factorial(9) = 362880</pre><p>
19  </p><p>
20   You can also use the simulator to execute target programs when 
21   debugging with GDB.  See <a class="xref" href="sec-remote-debugging.html" title="4.4.�Running Applications from GDB">Section�4.4, &#8220;Running Applications from GDB&#8221;</a> 
22   for more information.
23  </p><p>
24   The simulator supports the ARMv4 (StrongARM), ARMv4T (ARM7TDMI, ARM920,
25   ARM9TDMI), ARMv5, and ARMv5TE (ARM926, Xscale) instruction sets.
26   The arm-none-eabi-run simulator also includes support for
27   Thumb instructions.  
28  </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch04s02.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="chap-building.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="sec-remote-debugging.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.2.�Running Applications on the Target System�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�4.4.�Running Applications from GDB</td></tr></table></div></body></html>
29