source: rtems/c/src/lib/libbsp/m68k/mcf52235/gdb-init @ 3aac2db

4.104.114.95
Last change on this file since 3aac2db was 3aac2db, checked in by Chris Johns <chrisj@…>, on 06/11/08 at 07:59:03

2008-06-10 Matthew Riek <matthew.riek@…>

  • .cvsignore, ChangeLog?, Makefile.am, README, bsp_specs, clock/clock.c, configure.ac, console/console.c, gdb-init, include/bsp.h, include/bspopts.h.in, include/coverhd.h, include/tm27.h, preinstall.am, start/start.S, startup/bspclean.c, startup/bspstart.c, startup/cfinit.c, startup/init52235.c, startup/linkcmds, timer/timer.c: New.
  • Property mode set to 100644
File size: 1.3 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#target remote | m68k-bdm-gdbserver pipe /dev/bdmcf0
28target remote | m68k-bdm-gdbserver pipe /dev/tblcf2 -B
29
30#monitor set remote-debug 1
31monitor bdm-reset
32
33# Set VBR to the beginning of what will be SRAM
34monitor bdm-ctl-set 0x0801 0x20000000
35
36# Set RAMBAR1
37monitor bdm-ctl-set 0x0C05 0x20000021
38
39# Set FLASHBAR
40monitor bdm-ctl-set 0x0C04 0x00000061
41
42# Enable PST[3:0] signals
43set *((char*) 0x40100074) = 0x0F
44
45# Add the load when debugging from ram, should never happen with rtems
46#load
Note: See TracBrowser for help on using the repository browser.