未验证 提交 5b61930b 编写于 作者: M Me No Dev 提交者: GitHub

Support JTAG debugging in Arduino IDE 2.0 (#7295)

* Add support for Arduino IDE 2.0 Debug

* Update platform.txt

* Add SVD support

* Update configs for IDE 2.0.3

* Update esp32c3.json
上级 e355370c
......@@ -179,12 +179,12 @@ cp -Rf "$GITHUB_WORKSPACE/libraries" "$PKG_DIR/"
cp -Rf "$GITHUB_WORKSPACE/variants" "$PKG_DIR/"
cp -f "$GITHUB_WORKSPACE/tools/espota.exe" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/espota.py" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/esptool.py" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.py" "$PKG_DIR/tools/"
cp -f "$GITHUB_WORKSPACE/tools/gen_esp32part.exe" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/partitions" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/ide-debug" "$PKG_DIR/tools/"
cp -Rf "$GITHUB_WORKSPACE/tools/sdk" "$PKG_DIR/tools/"
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
cp -f $GITHUB_WORKSPACE/tools/platformio-build*.py "$PKG_DIR/tools/"
# Remove unnecessary files in the package folder
echo "Cleaning up folders ..."
......@@ -197,7 +197,11 @@ cat "$GITHUB_WORKSPACE/platform.txt" | \
sed "s/version=.*/version=$ver$extent/g" | \
sed 's/runtime.tools.xtensa-esp32-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32-elf//g' | \
sed 's/runtime.tools.xtensa-esp32s2-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s2-elf//g' | \
sed 's/runtime.tools.xtensa-esp32s3-elf-gcc.path={runtime.platform.path}\/tools\/xtensa-esp32s3-elf//g' | \
sed 's/runtime.tools.riscv32-esp-elf-gcc.path={runtime.platform.path}\/tools\/riscv32-esp-elf//g' | \
sed 's/tools.esptool_py.path={runtime.platform.path}\/tools\/esptool/tools.esptool_py.path=\{runtime.tools.esptool_py.path\}/g' \
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' \
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' \
> "$PKG_DIR/platform.txt"
# Add header with version information
......
......@@ -8,6 +8,7 @@ tools/esptool.exe
tools/mkspiffs
tools/mklittlefs
tools/mkfatfs.exe
tools/openocd-esp32
# Ignore editor backup files and macOS system metadata
.DS_Store
......@@ -19,8 +20,8 @@ tools/mkfatfs.exe
/build
# Ignore files built by Visual Studio/Visual Micro
[Dd]ebug*/
[Rr]elease*/
[Dd]ebug/
[Rr]elease/
.vs/
__vm/
*.vcxproj*
......
......@@ -18,6 +18,7 @@ menu.LoopCore=Arduino Runs On
menu.EventsCore=Events Run On
menu.MemoryType=Memory Type
menu.EraseFlash=Erase All Flash Before Sketch Upload
menu.JTAGAdapter=JTAG Adapter
##############################################################
### DO NOT PUT BOARDS ABOVE THE OFFICIAL ESPRESSIF BOARDS! ###
......@@ -69,6 +70,14 @@ esp32s3.build.event_core=
esp32s3.build.psram_type=qspi
esp32s3.build.memory_type={build.boot}_{build.psram_type}
## IDE 2.0 Seems to not update the value
esp32s3.menu.JTAGAdapter.default=Integrated USB JTAG
esp32s3.menu.JTAGAdapter.default.build.openocdscript=esp32s3-builtin.cfg
esp32s3.menu.JTAGAdapter.external=FTDI Adapter
esp32s3.menu.JTAGAdapter.external.build.openocdscript=esp32s3-ftdi.cfg
esp32s3.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32s3.menu.JTAGAdapter.bridge.build.openocdscript=esp32s3-bridge.cfg
esp32s3.menu.PSRAM.disabled=Disabled
esp32s3.menu.PSRAM.disabled.build.defines=
esp32s3.menu.PSRAM.disabled.build.psram_type=qspi
......@@ -270,6 +279,14 @@ esp32c3.build.boot=qio
esp32c3.build.partitions=default
esp32c3.build.defines=
## IDE 2.0 Seems to not update the value
esp32c3.menu.JTAGAdapter.default=Integrated USB JTAG
esp32c3.menu.JTAGAdapter.default.build.openocdscript=esp32c3-builtin.cfg
esp32c3.menu.JTAGAdapter.external=FTDI Adapter
esp32c3.menu.JTAGAdapter.external.build.openocdscript=esp32c3-ftdi.cfg
esp32c3.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32c3.menu.JTAGAdapter.bridge.build.openocdscript=esp32c3-bridge.cfg
esp32c3.menu.CDCOnBoot.default=Disabled
esp32c3.menu.CDCOnBoot.default.build.cdc_on_boot=0
esp32c3.menu.CDCOnBoot.cdc=Enabled
......@@ -427,6 +444,12 @@ esp32s2.build.boot=qio
esp32s2.build.partitions=default
esp32s2.build.defines=
## IDE 2.0 Seems to not update the value
esp32s2.menu.JTAGAdapter.external=FTDI Adapter
esp32s2.menu.JTAGAdapter.external.build.openocdscript=esp32s2-kaluga-1.cfg
esp32s2.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32s2.menu.JTAGAdapter.bridge.build.openocdscript=esp32s2-bridge.cfg
esp32s2.menu.CDCOnBoot.default=Disabled
esp32s2.menu.CDCOnBoot.default.build.cdc_on_boot=0
esp32s2.menu.CDCOnBoot.cdc=Enabled
......@@ -603,6 +626,12 @@ esp32.build.defines=
esp32.build.loop_core=
esp32.build.event_core=
## IDE 2.0 Seems to not update the value
esp32.menu.JTAGAdapter.external=FTDI Adapter
esp32.menu.JTAGAdapter.external.build.openocdscript=esp32-wrover-kit-3.3v.cfg
esp32.menu.JTAGAdapter.bridge=ESP USB Bridge
esp32.menu.JTAGAdapter.bridge.build.openocdscript=esp32-bridge.cfg
esp32.menu.PSRAM.disabled=Disabled
esp32.menu.PSRAM.disabled.build.defines=
esp32.menu.PSRAM.disabled.build.extra_libs=
......
此差异已折叠。
{
"name":"Arduino on ESP32",
"toolchainPrefix":"xtensa-esp32-elf",
"svdFile":"esp32.svd",
"request":"attach",
"postAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
]
}
\ No newline at end of file
{
"name":"Arduino on ESP32-C3",
"toolchainPrefix":"riscv32-esp-elf",
"svdFile":"esp32c3.svd",
"request":"attach",
"serverArgs":[
"-d3"
],
"overrideAttachCommands":[
"set remote hardware-watchpoint-limit 8",
"monitor reset",
"monitor halt",
"monitor gdb_sync",
"thb setup"
],
"overrideRestartCommands":[
"monitor reset",
"monitor halt",
"monitor gdb_sync",
"thb setup"
]
}
\ No newline at end of file
{
"name":"Arduino on ESP32-S2",
"toolchainPrefix":"xtensa-esp32s2-elf",
"svdFile":"esp32s2.svd",
"request":"attach",
"postAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
]
}
\ No newline at end of file
{
"name":"Arduino on ESP32-S3",
"toolchainPrefix":"xtensa-esp32s3-elf",
"svdFile":"esp32s3.svd",
"request":"attach",
"overrideAttachCommands":[
"set remote hardware-watchpoint-limit 2",
"monitor reset halt",
"monitor gdb_sync",
"thb setup",
"c"
],
"overrideRestartCommands":[
"monitor reset halt",
"monitor gdb_sync"
]
}
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册