@@ -9,10 +9,6 @@ tools.xtensa-esp-elf-gdb.path={runtime.platform.path}/tools/xtensa-esp-elf-gdb
9
9
tools.riscv32-esp-elf-gcc.path={runtime.platform.path}/tools/riscv32-esp-elf
10
10
tools.riscv32-esp-elf-gdb.path={runtime.platform.path}/tools/riscv32-esp-elf-gdb
11
11
12
- debug.server.openocd.path={runtime.platform.path}/tools/openocd-esp32/bin/openocd
13
- debug.server.openocd.scripts_dir={runtime.platform.path}/tools/openocd-esp32/share/openocd/scripts/
14
- debug.server.openocd.scripts_dir.windows={runtime.platform.path}\tools\openocd-esp32\share\openocd\scripts\
15
-
16
12
tools.esptool_py.path={runtime.platform.path}/tools/esptool
17
13
tools.esptool_py.cmd=esptool
18
14
tools.esptool_py.cmd.linux=esptool.py
@@ -105,19 +101,6 @@ build.extra_flags=-DARDUINO_HOST_OS="{runtime.os}" -DARDUINO_FQBN="{build.fqbn}"
105
101
build.extra_libs=
106
102
build.memory_type={build.boot}_qspi
107
103
108
- # OpenOCD default configs
109
- build.copy_jtag_files=0
110
- build.openocdscript.esp32=esp32-wrover-kit-3.3v.cfg
111
- build.openocdscript.esp32s2=esp32s2-kaluga-1.cfg
112
- build.openocdscript.esp32s3=esp32s3-builtin.cfg
113
- build.openocdscript.esp32c3=esp32c3-builtin.cfg
114
- build.openocdscript.esp32c6=esp32c6-builtin.cfg
115
- build.openocdscript.esp32c6=esp32h2-builtin.cfg
116
- build.openocdscript={build.openocdscript.{build.mcu}}
117
-
118
- # Debug plugin configuration
119
- build.debugconfig={build.mcu}.json
120
-
121
104
# Custom build options
122
105
build.opt.name=build_opt.h
123
106
build.opt.path={build.path}/{build.opt.name}
@@ -154,18 +137,6 @@ recipe.hooks.prebuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{fi
154
137
recipe.hooks.core.prebuild.set_core_build_flag.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
155
138
recipe.hooks.core.postbuild.set_core_build_flag.pattern.windows=cmd /c type nul > "{file_opts.path}"
156
139
157
- # Generate debug.cfg (must be postbuild)
158
- recipe.hooks.postbuild.1.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{debug.server.openocd.scripts_dir}"board/{build.openocdscript} "{build.source.path}"/debug.cfg"
159
- recipe.hooks.postbuild.1.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{debug.server.openocd.scripts_dir}board\{build.openocdscript}" "{build.source.path}\debug.cfg"
160
-
161
- # Generate debug_custom.json
162
- recipe.hooks.postbuild.2.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{runtime.platform.path}"/tools/ide-debug/{build.debugconfig} "{build.source.path}"/debug_custom.json"
163
- recipe.hooks.postbuild.2.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{runtime.platform.path}\tools\ide-debug\{build.debugconfig}" "{build.source.path}\debug_custom.json"
164
-
165
- # Generate chip.svd
166
- recipe.hooks.postbuild.3.pattern=/usr/bin/env bash -c "[ {build.copy_jtag_files} -eq 0 ] || cp -f "{runtime.platform.path}"/tools/ide-debug/svd/{build.mcu}.svd "{build.source.path}"/debug.svd"
167
- recipe.hooks.postbuild.3.pattern.windows=cmd /c IF {build.copy_jtag_files}==1 COPY /y "{runtime.platform.path}\tools\ide-debug\svd\{build.mcu}.svd" "{build.source.path}\debug.svd"
168
-
169
140
## Compile c files
170
141
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.c.extra_flags} {compiler.c.flags} -DF_CPU={build.f_cpu} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" -DARDUINO_VARIANT="{build.variant}" -DARDUINO_PARTITION_{build.partitions} {build.extra_flags} {compiler.cpreprocessor.flags} {includes} "@{build.opt.path}" "@{file_opts.path}" "{source_file}" -o "{object_file}"
171
142
@@ -217,16 +188,82 @@ pluggable_monitor.required.serial=builtin:serial-monitor
217
188
## Upload/Debug tools
218
189
## ------------------
219
190
220
- # Debugger configuration (general options)
221
- # ----------------------------------------
222
- # EXPERIMENTAL feature:
223
- # - this is alpha and may be subject to change without notice
191
+ # Debugger configuration
192
+ # ----------------------
193
+
194
+ # ESP32 debug configuration
195
+ debug_script.esp32=esp32-wrover-kit-3.3v.cfg
196
+ debug_config.esp32.cortex-debug.custom.name=Arduino on ESP32
197
+ debug_config.esp32.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
198
+ debug_config.esp32.cortex-debug.custom.postAttachCommands.1=monitor reset halt
199
+ debug_config.esp32.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
200
+ debug_config.esp32.cortex-debug.custom.postAttachCommands.3=thb setup
201
+ debug_config.esp32.cortex-debug.custom.postAttachCommands.4=c
202
+ debug_config.esp32.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
203
+ debug_config.esp32.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
204
+ debug_config.esp32.cortex-debug.custom.overrideRestartCommands.2=thb setup
205
+ debug_config.esp32.cortex-debug.custom.overrideRestartCommands.3=c
206
+
207
+ # ESP32-S2 debug configuration
208
+ debug_script.esp32s2=esp32s2-kaluga-1.cfg
209
+ debug_config.esp32s2.cortex-debug.custom.name=Arduino on ESP32-S2
210
+ debug_config.esp32s2.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
211
+ debug_config.esp32s2.cortex-debug.custom.postAttachCommands.1=monitor reset halt
212
+ debug_config.esp32s2.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
213
+ debug_config.esp32s2.cortex-debug.custom.postAttachCommands.3=thb setup
214
+ debug_config.esp32s2.cortex-debug.custom.postAttachCommands.4=c
215
+ debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
216
+ debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
217
+ debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.2=thb setup
218
+ debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.3=c
219
+
220
+ # ESP32-S3 debug configuration
221
+ debug_script.esp32s3=esp32s3-builtin.cfg
222
+ debug_config.esp32s3.cortex-debug.custom.name=Arduino on ESP32-S3
223
+ debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.0=set remote hardware-watchpoint-limit 2
224
+ debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.1=monitor reset halt
225
+ debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.2=monitor gdb_sync
226
+ debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.3=thb setup
227
+ debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.4=c
228
+ debug_config.esp32s3.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
229
+ debug_config.esp32s3.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
230
+
231
+ # ESP32-C3 debug configuration
232
+ debug_script.esp32c3=esp32c3-builtin.cfg
233
+ debug_config.esp32c3.cortex-debug.custom.name=Arduino on ESP32-C3
234
+ debug_config.esp32c3.cortex-debug.custom.serverArgs.0=-d3
235
+ debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.0=set remote hardware-watchpoint-limit 8
236
+ debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.1=monitor reset
237
+ debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.2=monitor halt
238
+ debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.3=monitor gdb_sync
239
+ debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.4=thb setup
240
+ debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.0=monitor reset
241
+ debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.1=monitor halt
242
+ debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.2=monitor gdb_sync
243
+ debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.3=thb setup
244
+
245
+ # ESP32-C6 debug configuration (TBD)
246
+ debug_script.esp32c6=esp32c6-builtin.cfg
247
+ debug_config.esp32c6=
248
+
249
+ # ESP32-H2 debug configuration (TBD)
250
+ debug_script.esp32h2=esp32h2-builtin.cfg
251
+ debug_config.esp32h2=
252
+
253
+ # Debug API variable definitions
224
254
debug.executable={build.path}/{build.project_name}.elf
225
255
debug.toolchain=gcc
226
256
debug.toolchain.path={tools.{build.tarch}-esp-elf-gdb.path}/bin/
227
- debug.toolchain.prefix={build.tarch}-{build.target}-elf-
257
+ debug.toolchain.prefix={build.tarch}-{build.target}-elf
228
258
debug.server=openocd
229
- debug.server.openocd.script=debug.cfg
259
+ debug.server.openocd.path={runtime.platform.path}/tools/openocd-esp32/bin/openocd
260
+ debug.server.openocd.scripts_dir={runtime.platform.path}/tools/openocd-esp32/share/openocd/scripts/
261
+ debug.server.openocd.scripts_dir.windows={runtime.platform.path}\tools\openocd-esp32\share\openocd\scripts\
262
+ debug.server.openocd.scripts.0=board/{debug_script.{build.mcu}}
263
+ debug.svd_file={runtime.platform.path}/tools/ide-debug/svd/{build.mcu}.svd
264
+
265
+ debug.cortex-debug.custom.request=attach
266
+ debug.additional_config=debug_config.{build.mcu}
230
267
231
268
##
232
269
## ESPTool
0 commit comments