-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyocd.toml
More file actions
115 lines (92 loc) · 2.75 KB
/
Copy pathpyocd.toml
File metadata and controls
115 lines (92 loc) · 2.75 KB
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
# =============================================================================
# pyocd.toml — pyOCD backend example, connecting to a specific target chip
# Usage:
# ucap rw -c examples/pyocd.toml # Continuous read/write (Ctrl+C to stop)
# ucap mon -c examples/pyocd.toml # Real-time monitor with GUI
#
# First verify the target chip is available:
# pyocd list --targets
# =============================================================================
# Read/Write frequency (Hz)
# rw_freq = 500
[backend]
name = 'pyocd'
[backend.pyocd]
# Target chip model (use `pyocd list --targets` to see supported list)
target = 'stm32f407vg'
# Debugger frequency (Hz). 0 = max speed (default), positive = specific freq, negative = backend default. Unset here, uses max speed
# freq = 0
# Debugger serial number, leave empty if only one device connected
# serial_no = ''
[save]
enable = true
dir = 'data/pyocd_session'
auto_name = true
save_figure = true
save_config = true
[plot]
show = true
[[plot.figures]]
name = 'ADC & Timers'
axes = [['ax_adc'], ['ax_timer']]
sharex = 'col'
[[plot.figures]]
name = 'GPIO & Status'
axes = [['ax_gpio']]
[plot.axes.ax_adc.kwargs]
ylabel = 'ADC Value (counts)'
[plot.axes.ax_timer.kwargs]
ylabel = 'Timer (us)'
xlabel = 'Time (s)'
[plot.axes.ax_gpio.kwargs]
ylabel = 'GPIO State'
[mon]
view_window = 5.0
refresh_interval = 50
theme = 'dark'
# =============================================================================
# pre_vars: Initialize/verify before acquisition
# =============================================================================
[[pre_vars]]
name = 'device_id'
address = 0xE0042000
format = '<I'
[[pre_vars]]
name = 'flash_size'
address = 0x1FFF7A22
format = '<H'
# =============================================================================
# vars: Variables to read/write continuously
# =============================================================================
# --- STM32F407 ADC1 data variable ---
[[vars]]
name = 'adc1_data'
address = 0x4001204C
format = '<H'
plot = { axis = 'ax_adc' }
expr = 'x * 3.3 / 4096'
# --- STM32F407 TIM2 counter ---
[[vars]]
name = 'timer2_cnt'
address = 0x40000024
format = '<I'
plot = { axis = 'ax_timer' }
# --- STM32F407 GPIOA ODR (output data variable) ---
[[vars]]
name = 'gpioa_odr'
address = 0x40020014
format = '<I'
plot = { axis = 'ax_gpio' }
# =============================================================================
# post_vars: Read status after acquisition
# =============================================================================
[[post_vars]]
name = 'systick_val'
address = 0xE000E018
format = '<I'
[[post_vars]]
name = 'irq_pending'
address = 0xE000E208
format = '<I'
[extra]
metadata = { description = 'pyOCD demo with STM32F407VG', target = 'stm32f407vg' }