Skip to content

Commit 03da972

Browse files
authored
Implement official Arduino IDE debugger API on 2.x (#9118)
* refactor(on-release): improve platform.txt path replacements Use regexs to replace all occurrences of `{runtime.platform.path}` with the correct `{runtime.tools.*.path}`, regardless of directory separator, and remove dependency on specific text around each path. Note that the order has been changed to ensure that the longest paths are replaced first, to avoid replacing parts of other paths. * fix(platform): Windows backslash cleanups Ensure Windows paths properly use a backslash as folder separator. * feat(platform)!: use new Arduino Debug API Implement sketch debugging according to the official Arduino Platform Debug Specification [1]. The biggest improvement is that now `launch.json` can be fully customized by the core (including the type of each entry), so there is no need to copy files in the sketch folder. In particular, `debug_custom.json` is not used anymore. [1] https://arduino.github.io/arduino-cli/latest/platform-specification/#sketch-debugging-configuration BREAKING CHANGE: This commit requires Arduino IDE 2.3.0 or later to use the debugging features. Older versions will no longer be able to start a debug session successfully. * feat(debug): pass objdump path to resolve globals Cortex-debug requires objdump to be in the same folder as gdb, or needs the full path to the executable in the `launch.json` file. This is now possible with the new debugging API. On Arduino-ESP32 core versions 2.x, though, this causes a crash within the Cortex-Debug extension as a result of loading the symbol table. This feature is thus disabled for now. * feat(debug): conditionally enable debug button on Nano ESP32 If the `debug.executable` variable is null or unset, the Debug button appears grayed out. The new IDE also takes current parameters into account, allowing to conditionally enable the Debug button only when some conditions are met.
1 parent 99ceccd commit 03da972

File tree

8 files changed

+93
-146
lines changed

8 files changed

+93
-146
lines changed

Diff for: .github/scripts/on-release.sh

+8-10
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,14 @@ find "$PKG_DIR" -name '*.git*' -type f -delete
217217
echo "Generating platform.txt..."
218218
cat "$GITHUB_WORKSPACE/platform.txt" | \
219219
sed "s/version=.*/version=$RELEASE_TAG/g" | \
220-
sed 's/tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf/tools.xtensa-esp32-elf-gcc.path=\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
221-
sed 's/tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf/tools.xtensa-esp32s2-elf-gcc.path=\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
222-
sed 's/tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf/tools.xtensa-esp32s3-elf-gcc.path=\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
223-
sed 's/tools.xtensa-esp-elf-gdb.path={runtime.platform.path}\/tools\/xtensa-esp-elf-gdb/tools.xtensa-esp-elf-gdb.path=\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
224-
sed 's/tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf/tools.riscv32-esp-elf-gcc.path=\{runtime.tools.riscv32-esp-elf-gcc.path\}/g' | \
225-
sed 's/tools.riscv32-esp-elf-gdb.path={runtime.platform.path}\/tools\/riscv32-esp-elf-gdb/tools.riscv32-esp-elf-gdb.path=\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
226-
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' | \
227-
sed 's/debug.server.openocd.path={runtime.platform.path}\/tools\/openocd-esp32\/bin\/openocd/debug.server.openocd.path=\{runtime.tools.openocd-esp32.path\}\/bin\/openocd/g' | \
228-
sed 's/debug.server.openocd.scripts_dir={runtime.platform.path}\/tools\/openocd-esp32\/share\/openocd\/scripts\//debug.server.openocd.scripts_dir=\{runtime.tools.openocd-esp32.path\}\/share\/openocd\/scripts\//g' | \
229-
sed 's/debug.server.openocd.scripts_dir.windows={runtime.platform.path}\\tools\\openocd-esp32\\share\\openocd\\scripts\\/debug.server.openocd.scripts_dir.windows=\{runtime.tools.openocd-esp32.path\}\\share\\openocd\\scripts\\/g' \
220+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp-elf-gdb/\{runtime.tools.xtensa-esp-elf-gdb.path\}/g' | \
221+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32-elf/\{runtime.tools.xtensa-esp32-elf-gcc.path\}/g' | \
222+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s2-elf/\{runtime.tools.xtensa-esp32s2-elf-gcc.path\}/g' | \
223+
sed 's/{runtime\.platform\.path}.tools.xtensa-esp32s3-elf/\{runtime.tools.xtensa-esp32s3-elf-gcc.path\}/g' | \
224+
sed 's/{runtime\.platform\.path}.tools.riscv32-esp-elf-gdb/\{runtime.tools.riscv32-esp-elf-gdb.path\}/g' | \
225+
sed "s/{runtime\.platform\.path}.tools.riscv32-esp-elf/\\{runtime.tools.riscv32-esp-elf-gcc.path\\}/g" | \
226+
sed 's/{runtime\.platform\.path}.tools.esptool/\{runtime.tools.esptool_py.path\}/g' | \
227+
sed 's/{runtime\.platform\.path}.tools.openocd-esp32/\{runtime.tools.openocd-esp32.path\}/g' \
230228
> "$PKG_DIR/platform.txt"
231229

232230
if ! [ -z ${VENDOR} ]; then

Diff for: boards.txt

+14-3
Original file line numberDiff line numberDiff line change
@@ -26035,9 +26035,22 @@ nano_nora.build.psram_type=opi
2603526035
nano_nora.build.memory_type={build.boot}_{build.psram_type}
2603626036
nano_nora.build.disable_pin_remap=
2603726037

26038+
nano_nora.debug_config.nano_nora.cortex-debug.custom.name=Arduino on Nano ESP32
26039+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideAttachCommands.0=set remote hardware-watchpoint-limit 2
26040+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideAttachCommands.1=monitor reset halt
26041+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideAttachCommands.2=monitor gdb_sync
26042+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideAttachCommands.3=interrupt
26043+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
26044+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
26045+
nano_nora.debug_config.nano_nora.cortex-debug.custom.overrideRestartCommands.2=interrupt
26046+
nano_nora.debug.additional_config=debug_config.nano_nora
26047+
2603826048
nano_nora.tools.esptool_py.program.pattern_args=--chip {build.mcu} --port "{serial.port}" --before default_reset --after hard_reset write_flash -z --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size {build.flash_size} {build.bootloader_addr} "{build.path}/{build.project_name}.bootloader.bin" 0x8000 "{build.path}/{build.project_name}.partitions.bin" 0xe000 "{runtime.platform.path}/tools/partitions/boot_app0.bin" 0xf70000 "{build.variant.path}/extra/nora_recovery/nora_recovery.ino.bin" 0x10000 "{build.path}/{build.project_name}.bin"
2603926049
nano_nora.tools.esptool_py.erase.pattern_args=--chip {build.mcu} --port "{serial.port}" --before default_reset --after hard_reset erase_flash
2604026050

26051+
nano_nora.programmer.default=esptool
26052+
nano_nora.debug.executable=
26053+
2604126054
nano_nora.menu.PartitionScheme.default=With FAT partition (default)
2604226055
nano_nora.menu.PartitionScheme.spiffs=With SPIFFS partition (advanced)
2604326056
nano_nora.menu.PartitionScheme.spiffs.build.partitions=app3M_spiffs9M_fact512k_16MB
@@ -26049,9 +26062,7 @@ nano_nora.menu.PinNumbers.byGPIONumber.build.disable_pin_remap=-DBOARD_USES_HW_G
2604926062
nano_nora.menu.USBMode.default=Normal mode (TinyUSB)
2605026063
nano_nora.menu.USBMode.hwcdc=Debug mode (Hardware CDC)
2605126064
nano_nora.menu.USBMode.hwcdc.build.usb_mode=1
26052-
nano_nora.menu.USBMode.hwcdc.build.copy_jtag_files=1
26053-
nano_nora.menu.USBMode.hwcdc.build.openocdscript=esp32s3-builtin.cfg
26054-
nano_nora.menu.USBMode.hwcdc.build.debugconfig=esp32s3-arduino.json
26065+
nano_nora.menu.USBMode.hwcdc.debug.executable={build.path}/{build.project_name}.elf
2605526066

2605626067
##############################################################
2605726068

Diff for: platform.txt

+71-38
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,22 @@ tools.xtensa-esp-elf-gdb.path={runtime.platform.path}/tools/xtensa-esp-elf-gdb
88
tools.riscv32-esp-elf-gcc.path={runtime.platform.path}/tools/riscv32-esp-elf
99
tools.riscv32-esp-elf-gdb.path={runtime.platform.path}/tools/riscv32-esp-elf-gdb
1010

11-
debug.server.openocd.path={runtime.platform.path}/tools/openocd-esp32/bin/openocd
12-
debug.server.openocd.scripts_dir={runtime.platform.path}/tools/openocd-esp32/share/openocd/scripts/
13-
debug.server.openocd.scripts_dir.windows={runtime.platform.path}\tools\openocd-esp32\share\openocd\scripts\
14-
1511
tools.esptool_py.path={runtime.platform.path}/tools/esptool
1612
tools.esptool_py.cmd=esptool
1713
tools.esptool_py.cmd.linux=esptool.py
1814
tools.esptool_py.cmd.windows=esptool.exe
1915

2016
tools.esptool_py.network_cmd=python3 "{runtime.platform.path}/tools/espota.py" -r
21-
tools.esptool_py.network_cmd.windows="{runtime.platform.path}/tools/espota.exe" -r
17+
tools.esptool_py.network_cmd.windows="{runtime.platform.path}\tools\espota.exe" -r
2218

2319
tools.esp_ota.cmd=python3 "{runtime.platform.path}/tools/espota.py" -r
24-
tools.esp_ota.cmd.windows="{runtime.platform.path}/tools/espota.exe" -r
20+
tools.esp_ota.cmd.windows="{runtime.platform.path}\tools\espota.exe" -r
2521

2622
tools.gen_esp32part.cmd=python3 "{runtime.platform.path}/tools/gen_esp32part.py"
27-
tools.gen_esp32part.cmd.windows="{runtime.platform.path}/tools/gen_esp32part.exe"
23+
tools.gen_esp32part.cmd.windows="{runtime.platform.path}\tools\gen_esp32part.exe"
2824

2925
tools.gen_insights_pkg.cmd=python3 "{runtime.platform.path}"/tools/gen_insights_package.py
30-
tools.gen_insights_pkg.cmd.windows="{runtime.platform.path}/tools/gen_insights_package.exe"
26+
tools.gen_insights_pkg.cmd.windows="{runtime.platform.path}\tools\gen_insights_package.exe"
3127

3228
compiler.path={tools.{build.tarch}-{build.target}-elf-gcc.path}/bin/
3329
compiler.sdk.path={runtime.platform.path}/tools/sdk/{build.mcu}
@@ -152,17 +148,6 @@ build.extra_flags=-DESP32 -DCORE_DEBUG_LEVEL={build.code_debug} {build.loop_core
152148
build.extra_libs=
153149
build.memory_type={build.boot}_qspi
154150

155-
# OpenOCD default configs
156-
build.copy_jtag_files=0
157-
build.openocdscript.esp32=esp32-wrover-kit-3.3v.cfg
158-
build.openocdscript.esp32s2=esp32s2-kaluga-1.cfg
159-
build.openocdscript.esp32s3=esp32s3-builtin.cfg
160-
build.openocdscript.esp32c3=esp32c3-builtin.cfg
161-
build.openocdscript={build.openocdscript.{build.mcu}}
162-
163-
# Debug plugin configuration
164-
build.debugconfig={build.mcu}.json
165-
166151
# Custom build options
167152
build.opt.name=build_opt.h
168153
build.opt.path={build.path}/{build.opt.name}
@@ -180,7 +165,7 @@ recipe.hooks.prebuild.3.pattern.windows=cmd /c if not exist "{build.path}\partit
180165
recipe.hooks.prebuild.4.pattern_args=--chip {build.mcu} elf2image --flash_mode {build.flash_mode} --flash_freq {build.flash_freq} --flash_size {build.flash_size} -o
181166
recipe.hooks.prebuild.4.pattern=/usr/bin/env bash -c "[ -f "{build.source.path}"/bootloader.bin ] && cp -f "{build.source.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || ( [ -f "{build.variant.path}"/{build.custom_bootloader}.bin ] && cp "{build.variant.path}"/{build.custom_bootloader}.bin "{build.path}"/{build.project_name}.bootloader.bin || "{tools.esptool_py.path}"/{tools.esptool_py.cmd} {recipe.hooks.prebuild.4.pattern_args} "{build.path}"/{build.project_name}.bootloader.bin "{compiler.sdk.path}"/bin/bootloader_{build.boot}_{build.boot_freq}.elf )"
182167
recipe.hooks.prebuild.4.pattern.linux=/usr/bin/env bash -c "[ -f "{build.source.path}"/bootloader.bin ] && cp -f "{build.source.path}"/bootloader.bin "{build.path}"/{build.project_name}.bootloader.bin || ( [ -f "{build.variant.path}"/{build.custom_bootloader}.bin ] && cp "{build.variant.path}"/{build.custom_bootloader}.bin "{build.path}"/{build.project_name}.bootloader.bin || python3 "{tools.esptool_py.path}"/{tools.esptool_py.cmd} {recipe.hooks.prebuild.4.pattern_args} "{build.path}"/{build.project_name}.bootloader.bin "{compiler.sdk.path}"/bin/bootloader_{build.boot}_{build.boot_freq}.elf )"
183-
recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\bootloader.bin" ( COPY /y "{build.source.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( IF EXIST "{build.variant.path}\{build.custom_bootloader}.bin" ( COPY "{build.variant.path}\{build.custom_bootloader}.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( "{tools.esptool_py.path}/{tools.esptool_py.cmd}" {recipe.hooks.prebuild.4.pattern_args} "{build.path}\{build.project_name}.bootloader.bin" "{runtime.platform.path}\tools\sdk\{build.mcu}\bin\bootloader_{build.boot}_{build.boot_freq}.elf" ) )
168+
recipe.hooks.prebuild.4.pattern.windows=cmd /c IF EXIST "{build.source.path}\bootloader.bin" ( COPY /y "{build.source.path}\bootloader.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( IF EXIST "{build.variant.path}\{build.custom_bootloader}.bin" ( COPY "{build.variant.path}\{build.custom_bootloader}.bin" "{build.path}\{build.project_name}.bootloader.bin" ) ELSE ( "{tools.esptool_py.path}\{tools.esptool_py.cmd}" {recipe.hooks.prebuild.4.pattern_args} "{build.path}\{build.project_name}.bootloader.bin" "{runtime.platform.path}\tools\sdk\{build.mcu}\bin\bootloader_{build.boot}_{build.boot_freq}.elf" ) )
184169

185170
# Check if custom build options exist in the sketch folder
186171
recipe.hooks.prebuild.5.pattern=/usr/bin/env bash -c "[ ! -f "{build.source.path}"/build_opt.h ] || cp -f "{build.source.path}"/build_opt.h "{build.path}"/build_opt.h"
@@ -199,18 +184,6 @@ recipe.hooks.prebuild.7.pattern.windows=cmd /c type nul > "{file_opts.path}"
199184
recipe.hooks.core.prebuild.1.pattern.windows=cmd /c echo "-DARDUINO_CORE_BUILD" > "{file_opts.path}"
200185
recipe.hooks.core.postbuild.1.pattern.windows=cmd /c type nul > "{file_opts.path}"
201186

202-
# Generate debug.cfg (must be postbuild)
203-
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"
204-
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"
205-
206-
# Generate debug_custom.json
207-
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"
208-
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"
209-
210-
# Generate chip.svd
211-
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"
212-
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"
213-
214187
## Compile c files
215188
recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.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} {compiler.c.extra_flags} {build.extra_flags} "@{build.opt.path}" "@{file_opts.path}" {includes} "{source_file}" -o "{object_file}"
216189

@@ -259,16 +232,76 @@ pluggable_monitor.required.serial=builtin:serial-monitor
259232
## Upload/Debug tools
260233
## ------------------
261234

262-
# Debugger configuration (general options)
263-
# ----------------------------------------
264-
# EXPERIMENTAL feature:
265-
# - this is alpha and may be subject to change without notice
235+
# Debugger configuration
236+
# ----------------------
237+
238+
# ESP32 debug configuration
239+
debug_script.esp32=esp32-wrover-kit-3.3v.cfg
240+
debug_config.esp32.cortex-debug.custom.name=Arduino on ESP32
241+
debug_config.esp32.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
242+
debug_config.esp32.cortex-debug.custom.postAttachCommands.1=monitor reset halt
243+
debug_config.esp32.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
244+
debug_config.esp32.cortex-debug.custom.postAttachCommands.3=thb setup
245+
debug_config.esp32.cortex-debug.custom.postAttachCommands.4=c
246+
debug_config.esp32.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
247+
debug_config.esp32.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
248+
debug_config.esp32.cortex-debug.custom.overrideRestartCommands.2=thb setup
249+
debug_config.esp32.cortex-debug.custom.overrideRestartCommands.3=c
250+
251+
# ESP32-S2 debug configuration
252+
debug_script.esp32s2=esp32s2-kaluga-1.cfg
253+
debug_config.esp32s2.cortex-debug.custom.name=Arduino on ESP32-S2
254+
debug_config.esp32s2.cortex-debug.custom.postAttachCommands.0=set remote hardware-watchpoint-limit 2
255+
debug_config.esp32s2.cortex-debug.custom.postAttachCommands.1=monitor reset halt
256+
debug_config.esp32s2.cortex-debug.custom.postAttachCommands.2=monitor gdb_sync
257+
debug_config.esp32s2.cortex-debug.custom.postAttachCommands.3=thb setup
258+
debug_config.esp32s2.cortex-debug.custom.postAttachCommands.4=c
259+
debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
260+
debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
261+
debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.2=thb setup
262+
debug_config.esp32s2.cortex-debug.custom.overrideRestartCommands.3=c
263+
264+
# ESP32-S3 debug configuration
265+
debug_script.esp32s3=esp32s3-builtin.cfg
266+
debug_config.esp32s3.cortex-debug.custom.name=Arduino on ESP32-S3
267+
debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.0=set remote hardware-watchpoint-limit 2
268+
debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.1=monitor reset halt
269+
debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.2=monitor gdb_sync
270+
debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.3=thb setup
271+
debug_config.esp32s3.cortex-debug.custom.overrideAttachCommands.4=c
272+
debug_config.esp32s3.cortex-debug.custom.overrideRestartCommands.0=monitor reset halt
273+
debug_config.esp32s3.cortex-debug.custom.overrideRestartCommands.1=monitor gdb_sync
274+
275+
# ESP32-C3 debug configuration
276+
debug_script.esp32c3=esp32c3-builtin.cfg
277+
debug_config.esp32c3.cortex-debug.custom.name=Arduino on ESP32-C3
278+
debug_config.esp32c3.cortex-debug.custom.serverArgs.0=-d3
279+
debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.0=set remote hardware-watchpoint-limit 8
280+
debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.1=monitor reset
281+
debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.2=monitor halt
282+
debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.3=monitor gdb_sync
283+
debug_config.esp32c3.cortex-debug.custom.overrideAttachCommands.4=thb setup
284+
debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.0=monitor reset
285+
debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.1=monitor halt
286+
debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.2=monitor gdb_sync
287+
debug_config.esp32c3.cortex-debug.custom.overrideRestartCommands.3=thb setup
288+
289+
# Debug API variable definitions
266290
debug.executable={build.path}/{build.project_name}.elf
267291
debug.toolchain=gcc
268292
debug.toolchain.path={tools.{build.tarch}-esp-elf-gdb.path}/bin/
269-
debug.toolchain.prefix={build.tarch}-{build.target}-elf-
293+
debug.toolchain.prefix={build.tarch}-{build.target}-elf
270294
debug.server=openocd
271-
debug.server.openocd.script=debug.cfg
295+
debug.server.openocd.path={runtime.platform.path}/tools/openocd-esp32/bin/openocd
296+
debug.server.openocd.scripts_dir={runtime.platform.path}/tools/openocd-esp32/share/openocd/scripts/
297+
debug.server.openocd.scripts_dir.windows={runtime.platform.path}\tools\openocd-esp32\share\openocd\scripts\
298+
debug.server.openocd.scripts.0=board/{debug_script.{build.mcu}}
299+
debug.svd_file={runtime.platform.path}/tools/ide-debug/svd/{build.mcu}.svd
300+
301+
# Enabling globals causes a crash within the Cortex-Debug extension with 2.x libraries
302+
# debug.cortex-debug.custom.objdumpPath={compiler.path}{compiler.prefix}objdump
303+
debug.cortex-debug.custom.request=attach
304+
debug.additional_config=debug_config.{build.mcu}
272305

273306
##
274307
## ESPTool

Diff for: tools/ide-debug/esp32.json

-19
This file was deleted.

Diff for: tools/ide-debug/esp32c3.json

-22
This file was deleted.

Diff for: tools/ide-debug/esp32s2.json

-19
This file was deleted.

Diff for: tools/ide-debug/esp32s3-arduino.json

-18
This file was deleted.

Diff for: tools/ide-debug/esp32s3.json

-17
This file was deleted.

0 commit comments

Comments
 (0)