source: rtems/c/src/lib/libbsp/m68k/mcf5225x/gdb-init @ fe32208

4.104.115
Last change on this file since fe32208 was fe32208, checked in by Joel Sherrill <joel.sherrill@…>, on 04/05/10 at 17:06:57

2010-04-05 Thomas Znidar <t.znidar@…>

  • ChangeLog?, Makefile.am, README, bsp_specs, configure.ac, gdb-init, preinstall.am, clock/clock.c, console/console.c, console/debugio.c, include/bsp.h, include/tm27.h, make/custom/mcf5225x.cfg, start/start.S, startup/bspclean.c, startup/bspstart.c, startup/init5225x.c, startup/linkcmds, timer/timer.c: New files.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1#
2# Show the exception stack frame.
3#
4define show-exception-sframe
5 set $frsr = *(unsigned short *)((unsigned long)$sp + 2)
6 set $frpc = *(unsigned long *)((unsigned long)$sp + 4)
7 set $frfvo = *(unsigned short *)((unsigned long)$sp + 0)
8 set $frcode = $frfvo >> 12
9 set $frvect = ($frfvo & 0xFFF) >> 2
10 set $frstatus = ((($frfvo >> 10) & 3) << 2) | ($frfvo & 3)
11 printf "EXCEPTION -- SR:0x%X  PC:0x%X  FRAME:0x%x  VECTOR:%d  STATUS:%d\n", $frsr, $frpc, $frcode, $frvect, $frstatus
12 if $frstatus == 4
13  printf " Fault Type: Error on instruction fetch"
14 end
15 if $frstatus == 8
16  printf " Fault Type: Error on operand write"
17 end
18 if $frstatus == 12
19  printf " Fault Type: Error on operand read"
20 end
21 if $frstatus == 9
22  printf " Fault Type: Attempted write to write-protected space"
23 end
24end
25
26# Add -v and -d flags for bdm info
27# Add -B flags to utilize hardware breakpoints when they are availiable
28
29#target remote | m68k-bdm-gdbserver pipe /dev/bdmcf0
30target remote | m68k-bdm-gdbserver pipe /dev/tblcf2 -B
31#monitor set remote-debug 1
32
33monitor bdm-reset
34
35# Set VBR to the beginning of what will be SRAM
36monitor bdm-ctl-set 0x0801 0x20000000
37
38# Set RAMBAR1
39monitor bdm-ctl-set 0x0C05 0x20000021
40
41# Set FLASHBAR
42monitor bdm-ctl-set 0x0C04 0x00000061
43
44# Enable PST[3:0] signals
45set *((char*) 0x40100074) = 0x0F
46
47# Add the load when debugging from ram which won't happen with rtems!
48#load
Note: See TracBrowser for help on using the repository browser.