blob: da181585e2d3a8e5d118f93d5c4a53e532bf4b67 (
plain)
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
|
#
# GDB init file for STM32x family
#
set complaints 1
set output-radix 16
set input-radix 16
# GDB must be set to big endian mode first if needed.
#set endian little
# add str9lib src to gdb search path
#dir /cygdrive/c/progra~1/anglia/idealist/examples/stm32/libstr32x/src
#dir C:/Progra~1/Anglia/IDEaliST/examples/stm32/libstm32x/src
# change gdb prompt
set prompt (arm-gdb)
# You will need to change this to reflect the address of your jtag interface.
#target remote localhost:2000
# The libremote daemon must be set to big endian before the
# executable is loaded.
#monitor endian little
# Increase the packet size to improve download speed.
# to view current setting use:
# show remote memory-write-packet-size
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
set remote hardware-watchpoint-limit 6
set remote hardware-breakpoint-limit 6
# Load the program executable (ram only)
#load
# Set a breakpoint at main().
#b main
# Run to the breakpoint.
#c
#
# GDB command helpers
#
#
# reset and map 0 to internal ram
#
define ramreset
reset
set *(int*)0xE000ED08 = 0x20000000
echo Internal RAM set to address 0x0.
end
#
# reset and map 0 to flash
#
define flashreset
reset
thb main
echo Internal Flash set to address 0x0.
end
#
# reset target
#
define reset
monitor reset
end
document ramreset
ramreset
Causes a target reset, remaps Internal RAM to address 0x0.
end
document flashreset
flashreset
Causes a target reset, remaps Internal Flash to address 0x0.
A temporary breakpoint is set at start of function main
end
document reset
reset
Causes a target reset.
end
|