Skip to content

Commit 802aa6a

Browse files
committed
Add support for Arduino IDE 2.0 Debug
1 parent 9e7f772 commit 802aa6a

File tree

7 files changed

+124
-17
lines changed

7 files changed

+124
-17
lines changed

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ tools/esptool.exe
88
tools/mkspiffs
99
tools/mklittlefs
1010
tools/mkfatfs.exe
11+
tools/openocd-esp32
1112

1213
# Ignore editor backup files and macOS system metadata
1314
.DS_Store
@@ -19,8 +20,8 @@ tools/mkfatfs.exe
1920
/build
2021

2122
# Ignore files built by Visual Studio/Visual Micro
22-
[Dd]ebug*/
23-
[Rr]elease*/
23+
[Dd]ebug/
24+
[Rr]elease/
2425
.vs/
2526
__vm/
2627
*.vcxproj*

boards.txt

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ menu.LoopCore=Arduino Runs On
1818
menu.EventsCore=Events Run On
1919
menu.MemoryType=Memory Type
2020
menu.EraseFlash=Erase All Flash Before Sketch Upload
21+
menu.JTAGAdapter=JTAG Adapter
2122

2223
##############################################################
2324
### DO NOT PUT BOARDS ABOVE THE OFFICIAL ESPRESSIF BOARDS! ###
@@ -69,6 +70,16 @@ esp32s3.build.event_core=
6970
esp32s3.build.psram_type=qspi
7071
esp32s3.build.memory_type={build.boot}_{build.psram_type}
7172

73+
esp32s3.build.openocdscript=board/esp32s3-builtin.cfg
74+
75+
## IDE 2.0 Seems to not update the value
76+
#esp32s3.menu.JTAGAdapter.default=Integrated USB JTAG
77+
#esp32s3.menu.JTAGAdapter.default.build.openocdscript=board/esp32s3-builtin.cfg
78+
#esp32s3.menu.JTAGAdapter.external=FTDI Adapter
79+
#esp32s3.menu.JTAGAdapter.external.build.openocdscript=board/esp32s3-ftdi.cfg
80+
#esp32s3.menu.JTAGAdapter.bridge=ESP USB Bridge
81+
#esp32s3.menu.JTAGAdapter.bridge.build.openocdscript=board/esp32s3-bridge.cfg
82+
7283
esp32s3.menu.PSRAM.disabled=Disabled
7384
esp32s3.menu.PSRAM.disabled.build.defines=
7485
esp32s3.menu.PSRAM.disabled.build.psram_type=qspi
@@ -270,6 +281,16 @@ esp32c3.build.boot=qio
270281
esp32c3.build.partitions=default
271282
esp32c3.build.defines=
272283

284+
esp32c3.build.openocdscript=board/esp32c3-builtin.cfg
285+
286+
## IDE 2.0 Seems to not update the value
287+
#esp32c3.menu.JTAGAdapter.default=Integrated USB JTAG
288+
#esp32c3.menu.JTAGAdapter.default.build.openocdscript=board/esp32c3-builtin.cfg
289+
#esp32c3.menu.JTAGAdapter.external=FTDI Adapter
290+
#esp32c3.menu.JTAGAdapter.external.build.openocdscript=board/esp32c3-ftdi.cfg
291+
#esp32c3.menu.JTAGAdapter.bridge=ESP USB Bridge
292+
#esp32c3.menu.JTAGAdapter.bridge.build.openocdscript=board/esp32c3-bridge.cfg
293+
273294
esp32c3.menu.CDCOnBoot.default=Disabled
274295
esp32c3.menu.CDCOnBoot.default.build.cdc_on_boot=0
275296
esp32c3.menu.CDCOnBoot.cdc=Enabled
@@ -427,6 +448,14 @@ esp32s2.build.boot=qio
427448
esp32s2.build.partitions=default
428449
esp32s2.build.defines=
429450

451+
esp32s2.build.openocdscript=board/esp32s2-kaluga-1.cfg
452+
453+
## IDE 2.0 Seems to not update the value
454+
#esp32s2.menu.JTAGAdapter.external=FTDI Adapter
455+
#esp32s2.menu.JTAGAdapter.external.build.openocdscript=board/esp32s2-kaluga-1.cfg
456+
#esp32s2.menu.JTAGAdapter.bridge=ESP USB Bridge
457+
#esp32s2.menu.JTAGAdapter.bridge.build.openocdscript=board/esp32s2-bridge.cfg
458+
430459
esp32s2.menu.CDCOnBoot.default=Disabled
431460
esp32s2.menu.CDCOnBoot.default.build.cdc_on_boot=0
432461
esp32s2.menu.CDCOnBoot.cdc=Enabled
@@ -603,6 +632,14 @@ esp32.build.defines=
603632
esp32.build.loop_core=
604633
esp32.build.event_core=
605634

635+
esp32.build.openocdscript=board/esp32-wrover-kit-3.3v.cfg
636+
637+
## IDE 2.0 Seems to not update the value
638+
#esp32.menu.JTAGAdapter.external=FTDI Adapter
639+
#esp32.menu.JTAGAdapter.external.build.openocdscript=board/esp32-wrover-kit-3.3v.cfg
640+
#esp32.menu.JTAGAdapter.bridge=ESP USB Bridge
641+
#esp32.menu.JTAGAdapter.bridge.build.openocdscript=board/esp32-bridge.cfg
642+
606643
esp32.menu.PSRAM.disabled=Disabled
607644
esp32.menu.PSRAM.disabled.build.defines=
608645
esp32.menu.PSRAM.disabled.build.extra_libs=

platform.txt

Lines changed: 40 additions & 15 deletions
Large diffs are not rendered by default.

tools/ide-debug/esp32.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name":"Arduino on ESP32",
3+
"toolchainPrefix":"xtensa-esp32-elf",
4+
"request":"attach",
5+
"demangle":true,
6+
"postAttachCommands":[
7+
"set remote hardware-watchpoint-limit 2",
8+
"monitor reset halt",
9+
"flushregs",
10+
"thb setup",
11+
"c"
12+
]
13+
}

tools/ide-debug/esp32c3.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name":"Arduino on ESP32-C3",
3+
"toolchainPrefix":"riscv32-esp-elf",
4+
"request":"attach",
5+
"demangle":true,
6+
"postAttachCommands":[
7+
"set remote hardware-watchpoint-limit 2"
8+
]
9+
}

tools/ide-debug/esp32s2.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name":"Arduino on ESP32-S2",
3+
"toolchainPrefix":"xtensa-esp32s2-elf",
4+
"request":"attach",
5+
"demangle":true,
6+
"postAttachCommands":[
7+
"set remote hardware-watchpoint-limit 2",
8+
"monitor reset halt",
9+
"flushregs",
10+
"thb setup",
11+
"c"
12+
]
13+
}

tools/ide-debug/esp32s3.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name":"Arduino on ESP32-S3",
3+
"toolchainPrefix":"xtensa-esp32s3-elf",
4+
"request":"attach",
5+
"demangle":true,
6+
"postAttachCommands":[
7+
"set remote hardware-watchpoint-limit 2"
8+
]
9+
}

0 commit comments

Comments
 (0)