1 | # |
---|
2 | # $Id$ |
---|
3 | # |
---|
4 | |
---|
5 | Simple BSP for the SH simulator built into gdb. |
---|
6 | |
---|
7 | Simulator Invocation |
---|
8 | ==================== |
---|
9 | sh-rtems[elf|]-gdb <executable> |
---|
10 | (gdb) target sim |
---|
11 | (gdb) set archi [sh|sh2] |
---|
12 | (gdb) load <executable> |
---|
13 | (gdb) run |
---|
14 | |
---|
15 | Status |
---|
16 | ====== |
---|
17 | |
---|
18 | * The simulator invocation procedure outlined above produces error messages |
---|
19 | with gdb-5.0, nevertheless seems to work. With gdb versions > 5.0 these |
---|
20 | error messages are gone. I.e. if you plan to seriously work with the gdb |
---|
21 | simulator better use gdb versions > 5.0. |
---|
22 | |
---|
23 | * gdb's simulator is not able to correctly emulate memory areas esp. shadowing |
---|
24 | and non-consecutive memory. I.e. access to memory areas besides area 0 will |
---|
25 | (bogusly) generate SIGBUS exceptions. This includes access to area 5 |
---|
26 | (On-chip peripherials) and prevents simulation of configuration and access |
---|
27 | to on-chip peripherials. |
---|
28 | |
---|
29 | * Due to limitations of the simulator you will only be able to run |
---|
30 | applications which do not try to access any SH control registers. |
---|
31 | |
---|
32 | Currently, this excludes all applications, which apply timers and serial |
---|
33 | devices, i.e. almost any real world application. |
---|
34 | |
---|
35 | * This BSP supports 3 different console devices (cf. configure --help): |
---|
36 | - trap34, an interface base on gdb's trap34 emulation. Known to work with |
---|
37 | gdb-5.0. |
---|
38 | - gdbsci1, a stripped down sci device driver adapted to apply gdb's sci1 |
---|
39 | emulation. This is known to fail with gdb-5.0, because of a bug in gdb-5.0's |
---|
40 | sh-sim, a patch is submitted, but .. ~== |
---|
41 | - devnull, redirection of console io to /dev/null. Try to single step this, |
---|
42 | if you want to understand the details on how SH-RTEMS console redirection |
---|
43 | works. |
---|
44 | |
---|
45 | NOTE: the trap34 interface is incomplete and is temporarily disabled |
---|
46 | inside of configure.in. |
---|