-
Notifications
You must be signed in to change notification settings - Fork 0
/
gdbinit_template.gdb
66 lines (48 loc) · 2.21 KB
/
gdbinit_template.gdb
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
################################################################################
# Loaad gdb_pycd integration
################################################################################
# Update only hte path in this section
python import os
python pyocd_gdb_integration_path = os.environ['HOME'] + '/path/to/gdb_pyocd_integration'
python exec(compile(open(pyocd_gdb_integration_path + '/gdb_init.py', "rb").read(), 'gdb_init.py', "exec"))
# Enable pretty print, if wanted
set print pretty on
# Useful aliases for the integration
alias connect = python probe_start()
alias res = mon reset halt
# reload command is useful for auto rebuilding, but adds dependency on make and
# target name. It is expected to stand in the directory of where the loaded file
# is built, and will rebuild using: make -j32 filename.elf
alias reload = python reload()
################################################################################
# Probe configuraiton
################################################################################
# Add aliases for your commonly used probes or devboards such as:
# alias probe_name = python probe_setup(probe_openocd, "interface", "target", "optional extra commands")
#
# Example probe configurations:
# Select a signle nrf board
alias nrf = python probe_setup(probe_openocd, "jlink", "nrf52")
# Select a predefined nrf board. Serial can be fetched using "pyocd list"
alias nrf1 = python probe_setup(probe_openocd, "jlink", "nrf52", "jlink serial 123456789")
# To specify probe and device on command line
define probe
python probe_setup(probe_openocd, "$arg0", "$arg1")
end
################################################################################
# Other extensions
################################################################################
# Load useful extensions
#
# To install:
# pip install arm-gdb
# pip install freertos-gdb
#
# For SVD files, check out:
# https://github.com/posborne/cmsis-svd
# or extract from .pack files above, which are renamed zip archives
# Uncomment to use:
# python import arm_gdb
# python import freertos_gdb
# arm loadfile nrf52840 /path/to/cmsis-svd/data/Nordic/nrf52840.svd
# arm loadfile stm32f7x7 /path/to/cmsis-svd/data/STMicro/STM32F7x7.svd