4 |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
<table border=0 width=100% bgcolor="#d0d0d0"><tr> |
5 |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
<td width=100% align=center valign=center><table border=0 width=100%><tr> |
6 |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
<td align="left" valign=center bgcolor="#d0efff"><font color="#6060e0" size="6"> |
7 |
<b>Gavare's eXperimental Emulator:</b></font><br> |
<b>GXemul:</b></font> |
8 |
<font color="#000000" size="6"><b>Experimenting with GXemul</b> |
<font color="#000000" size="6"><b>Experimenting with GXemul</b> |
9 |
</font></td></tr></table></td></tr></table><p> |
</font></td></tr></table></td></tr></table><p> |
10 |
|
|
11 |
<!-- |
<!-- |
12 |
|
|
13 |
$Id: experiments.html,v 1.110 2007/06/15 18:07:08 debug Exp $ |
$Id: experiments.html,v 1.112 2007/06/23 16:59:35 debug Exp $ |
14 |
|
|
15 |
Copyright (C) 2003-2007 Anders Gavare. All rights reserved. |
Copyright (C) 2003-2007 Anders Gavare. All rights reserved. |
16 |
|
|
67 |
<ul> |
<ul> |
68 |
<li>Build and install a cross-compiler for your chosen target, |
<li>Build and install a cross-compiler for your chosen target, |
69 |
e.g. <tt>mips64-unknown-elf</tt>. |
e.g. <tt>mips64-unknown-elf</tt>. |
70 |
GCC is usually a good compiler choice, because it is portable |
<a href="http://gcc.gnu.org/">GCC</a> is usually a good compiler |
71 |
and in wide-spread use. (Other compilers should work too.) |
choice, because it is portable and in wide-spread use. |
72 |
|
(Other compilers should work too.) |
73 |
<p> |
<p> |
74 |
<li>Compile the Hello World demo program for your chosen target, and run |
<li>Compile the Hello World demo program for your chosen target, and run |
75 |
it in the emulator. |
it in the emulator. |
80 |
subdirectory. The README files in the demo directories have several |
subdirectory. The README files in the demo directories have several |
81 |
examples of how the demo programs can be built. |
examples of how the demo programs can be built. |
82 |
|
|
83 |
|
<p>Once you have tried running the Hello World program from the command |
84 |
|
line, e.g.<pre> |
85 |
|
<b>gxemul -E testmips hello_mips</b> |
86 |
|
</pre> |
87 |
|
you can experiment with adding one or more of the following command line |
88 |
|
options: |
89 |
|
|
90 |
|
<p><ul> |
91 |
|
<li><b><tt>-t</tt></b>, to show a function call trace, |
92 |
|
<li><b><tt>-i</tt></b>, to show instruction disassembly (for each |
93 |
|
executed instruction), |
94 |
|
<li>and finally <b><tt>-V</tt></b> to start the emulator in a "paused" |
95 |
|
state. |
96 |
|
</ul> |
97 |
|
|
98 |
|
<p>If you start the emulator in the paused state, or if you press CTRL-C |
99 |
|
during normal execution, you will end up with a <tt><b>GXemul></b></tt> |
100 |
|
prompt. This is the built-in debugger. |
101 |
|
|
102 |
|
<p>Using the built-in debugger, you can single step (<tt><b>s</b></tt>), |
103 |
|
show the current contents of the emulated registers (<tt><b>r</b></tt>), |
104 |
|
turn on/off the function call trace mode (<tt><b>trace</b></tt>), or |
105 |
|
continue at full speed (<tt><b>c</b></tt>). Typing <tt><b>quit</b></tt> |
106 |
|
exits the emulator. |
107 |
|
|
108 |
<p>Hopefully this is enough to get you inspired. :-) |
<p>Hopefully this is enough to get you inspired. :-) |
109 |
|
|
110 |
|
|