diff options
Diffstat (limited to 'gdb/README')
-rw-r--r-- | gdb/README | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/gdb/README b/gdb/README index 751fb22946..e61c930ea8 100644 --- a/gdb/README +++ b/gdb/README | |||
@@ -23,14 +23,23 @@ To debug using the serial port on the Jukebox, you need to do the following: | |||
23 | 2) Build or download a GDB SH1 cross debugger | 23 | 2) Build or download a GDB SH1 cross debugger |
24 | 24 | ||
25 | 3) Compile the GDB stub from the CVS "gdb" archive | 25 | 3) Compile the GDB stub from the CVS "gdb" archive |
26 | For Player models, just type: | ||
27 | # make | ||
28 | |||
29 | For Recorder, type | ||
30 | #make RECORDER=1 | ||
26 | 31 | ||
27 | 4) Copy the newly built ARCHOS.MOD to the Jukebox. | 32 | 4) Copy the newly built ARCHOS.MOD to the Jukebox. |
28 | 33 | ||
29 | 5) Start the Jukebox and fire up the GDB with the elf file you want to debug | 34 | 5) Start the Jukebox and fire up the GDB with the elf file you want to debug |
30 | as an argument along with the baud rate: | 35 | as an argument along with the baud rate: |
31 | 36 | ||
37 | For Player: | ||
32 | # sh-elf-gdb -b 38400 test.elf | 38 | # sh-elf-gdb -b 38400 test.elf |
33 | 39 | ||
40 | For Recorder: | ||
41 | # sh-elf-gdb -b 115200 test.elf | ||
42 | |||
34 | 6) In GDB, type: | 43 | 6) In GDB, type: |
35 | 44 | ||
36 | (gdb) target remote /dev/ttyS0 | 45 | (gdb) target remote /dev/ttyS0 |
@@ -58,13 +67,13 @@ To debug using the serial port on the Jukebox, you need to do the following: | |||
58 | 67 | ||
59 | 8) You're set. Now try to set a breakpoint and run: | 68 | 8) You're set. Now try to set a breakpoint and run: |
60 | 69 | ||
61 | (gdb) b 22 | 70 | (gdb) b main |
62 | Breakpoint 1 at 0x90182c6: file led.c, line 14. | 71 | Breakpoint 1 at 0x9011b2a: file main.c, line 192. |
63 | (gdb) c | 72 | (gdb) c |
64 | Continuing. | 73 | Continuing. |
65 | 74 | ||
66 | Breakpoint 2, main () at led.c:15 | 75 | Breakpoint 1, main () at main.c:192 |
67 | 15 SSR1 &= ~(SCI_RDRF | SCI_ORER | SCI_PER | SCI_FER); | 76 | 192 app_main(); |
68 | (gdb) | 77 | (gdb) |
69 | 78 | ||
70 | Good luck! | 79 | Good luck! |
@@ -73,8 +82,14 @@ To debug using the serial port on the Jukebox, you need to do the following: | |||
73 | Technical details: | 82 | Technical details: |
74 | 83 | ||
75 | As for now, the GDB stub occupies the memory from 0x900000 up to | 84 | As for now, the GDB stub occupies the memory from 0x900000 up to |
76 | 0x9018000. This will change. | 85 | 0x9018000. |
77 | 86 | ||
78 | Compile and link your test program at 0x9018000 and up, and it will work. | 87 | Compile and link your test program at 0x9018000 and up, and it will work. |
79 | 88 | ||
80 | The baud rate is 38400, and the settings are 8N1. | 89 | The baud rate is 38400 for Player, 115200 for Recorder, and the settings |
90 | are 8N1. | ||
91 | |||
92 | Note that you may have to change the ATA I/O address in the ATA_CONTROL | ||
93 | macro in sh-stub.c. go to Menu->Debug (keep out)->View HW info to find out. | ||
94 | |||
95 | Linus Nielsen Feltzing | ||