source: rtems/bsps/m68k/mcf52235/gdb-init

Last change on this file was eb36d11, checked in by Sebastian Huber <sebastian.huber@…>, on 04/25/18 at 13:06:08

bsps: Move documentation, etc. files to bsps

This patch is a part of the BSP source reorganization.

Update #3285.

  • 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.