-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrp_gdbinit
136 lines (116 loc) · 1.83 KB
/
rp_gdbinit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
target remote localhost:3333
monitor arm semihosting enable
monitor reset halt
#monitor debug_level -2
set $NVIC_USER = 0xe000e100
set $NVIC_ICER = 0xe000e180
set $NVIC_ISPR = 0xe000e200
set $NVIC_ICPR = 0xe000e280
set $NVIC_IPR0 = 0xe000e400
set $NVIC_IPR1 = 0xe000e404
set $NVIC_IPR2 = 0xe000e408
set $NVIC_IPR3 = 0xe000e40c
set $NVIC_IPR4 = 0xe000e410
set $NVIC_IPR5 = 0xe000e414
set $NVIC_IPR6 = 0xe000e418
set $NVIC_IPR7 = 0xe000e41c
set $VTOR = 0xe000ed08
set $ICSR = 0xe000ed04
set $PROC0_NMI_MASK = 0x40014000
define nvic_user
echo "NVIC_ISER:\n"
x/t $NVIC_USER
end
define nvic_icer
echo "NVIC_ICER:\n"
x/t $NVIC_ICER
end
define nvic_ispr
echo "NVIC_ISPR:\n"
x/t $NVIC_ISPR
end
define nvic_icpr
echo "NVIC_ICPR:\n"
x/t $NVIC_ICPR
end
define nvic_ipr0
echo "NVIC_IPR0:\n"
x/t $NVIC_IPR0
end
define nvic_ipr1
echo "NVIC_IPR1:\n"
x/t $NVIC_IPR1
end
define nvic_ipr2
echo "NVIC_IPR2:\n"
x/t $NVIC_IPR2
end
define nvic_ipr3
echo "NVIC_IPR3:\n"
x/t $NVIC_IPR3
end
define nvic_ipr4
echo "NVIC_IPR4:\n"
x/t $NVIC_IPR4
end
define nvic_ipr5
echo "NVIC_IPR5:\n"
x/t $NVIC_IPR5
end
define nvic_ipr6
echo "NVIC_IPR6:\n"
x/t $NVIC_IPR6
end
define nvic_ipr7
echo "NVIC_IPR7:\n"
x/t $NVIC_IPR7
end
define vtor
echo "VTOR:\n"
x/t $VTOR
end
define icsr
echo "ICSR:\n"
x/t $ICSR
end
define proc0_nmi_mask
echo "PROC0_NMI_MASK:\n"
x/t $PROC0_NMI_MASK
end
define checkint
nvic_user
nvic_icer
nvic_ispr
nvic_icpr
nvic_ipr0
nvic_ipr1
nvic_ipr2
nvic_ipr3
nvic_ipr4
nvic_ipr5
nvic_ipr6
nvic_ipr7
vtor
icsr
proc0_nmi_mask
end
define checkpin
echo "PROC0_INTE2:\n"
x/t 0x40014108
echo "GPIO_IN:\n"
x/t 0xd0000004
echo "GPIO_OE:\n"
x/t 0xd0000020
echo "GPIO16_STATUS:\n"
x/t 0x40014080
echo "GPIO16_CTLR:\n"
x/t 0x40014084
end
define vectab
echo "Interrupt vector:\n"
x/40x 0x10000100
end
define setvtor
echo "Setting VTOR to 0x10000100:\n"
set *0xe000ed08 = 0x10000100
end