Skip to content

Commit f84dc9a

Browse files
committed
Add ESP-based debug probes
Resolve platformio#828
1 parent 08d00cf commit f84dc9a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

platform.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def _add_dynamic_options(self, board):
157157
supported_debug_tools = [
158158
"cmsis-dap",
159159
"esp-prog",
160+
"esp-bridge",
160161
"iot-bus-jtag",
161162
"jlink",
162163
"minimodule",
@@ -167,6 +168,9 @@ def _add_dynamic_options(self, board):
167168
"tumpa",
168169
]
169170

171+
if board.get("build.mcu", "") in ("esp32c3", "esp32s3"):
172+
supported_debug_tools.append("esp-builtin")
173+
170174
upload_protocol = board.manifest.get("upload", {}).get("protocol")
171175
upload_protocols = board.manifest.get("upload", {}).get("protocols", [])
172176
if debug:
@@ -178,7 +182,6 @@ def _add_dynamic_options(self, board):
178182
if "tools" not in debug:
179183
debug["tools"] = {}
180184

181-
# Only FTDI based debug probes
182185
for link in upload_protocols:
183186
if link in non_debug_protocols or link in debug["tools"]:
184187
continue
@@ -190,6 +193,10 @@ def _add_dynamic_options(self, board):
190193
openocd_interface = "ftdi/esp32s2_kaluga_v1"
191194
else:
192195
openocd_interface = "ftdi/esp32_devkitj_v1"
196+
elif link == "esp-bridge":
197+
openocd_interface = "esp_usb_bridge"
198+
elif link == "esp-builtin":
199+
openocd_interface = "esp_usb_jtag"
193200
else:
194201
openocd_interface = "ftdi/" + link
195202

0 commit comments

Comments
 (0)