[{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eThere's a good old (\u0026gt;3yrs) project called\u0026nbsp;\u003ca href=\"https://github.com/espressif/esp-usb-bridge\" target=\"_blank\"\u003eESP-USB-Bridge\u003c/a\u003e. It turns any ESP32-S2 or ESP32-S3 into a fully functional debug probe tool, with JTAG or SWD, UART pass through, and UF2 flashing too.\u003c/p\u003e\n\u003cp\u003eI'd been meaning to give it a try for ages, and this week I finally had the excuse to debug an uncooperative chip!\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;Mainly my reasoning for wanting these is that each PicoProbe costs ~$12, and JLink even more, and I ideally want one debug probe per board in my Hardware Testing farm (bunch of boards in boxes, controlled via SBCs with USB PPPS hubs).\u003c/p\u003e\n\u003cp\u003e\u003cem\u003eYes,\u003c/em\u003e you\u0026nbsp;\u003cem\u003ecan\u003c/em\u003e use a Pico (~$6) as a pico probe, but that doesn't cover non SWD targets. Ideally I want to spend \u0026lt;$3 per target to add debugging, and cheap ESP32-S3 nano boards ($2 clones with bad aerial) seem ideal for that.\u003c/p\u003e\n\u003cp\u003eThe firmware I work on (Adafruit WipperSnapper) supports \u003ca href=\"https://io.adafruit.com/works-with-wippersnapper\" target=\"_blank\"\u003eover 40boards, and 100 components/peripherals\u003c/a\u003e, so there's quite the combination to debug / support (too expensive for official probes). I also aspire to support as many CircuitPython boards as possible, and at 500 boards that's a tall order!\u003c/p\u003e\n      \n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/596/original/Screenshot_2026-09-18_181853.png?1789751945","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eWhat, a universal probe for $2? Almost, but not quite...\u003c/h2\u003e\n\u003cp\u003eYes it supports JTAG and SWD transports, no not interchangeably on demand (yet).\u003c/p\u003e\n\u003cp\u003eYou must pick SWD \u003cstrong\u003e\u003cem\u003eor\u003c/em\u003e \u003c/strong\u003eJTAG, and reflash the firmware to switch between. UART / Serial remains unaffected.\u003c/p\u003e\n\u003cp\u003eThe pins remain the same, and it seems like you don't need to unplug them,\u0026nbsp;\u003cspan style=\"text-decoration: underline;\"\u003e\u003cem\u003e\u003cstrong\u003eexcept nReset\u003c/strong\u003e\u003c/em\u003e\u003c/span\u003e (remove for SWD).\u003c/p\u003e\n\u003cp\u003eSee the Docs here: \u003ca href=\"https://documentation.espressif.com/esp-usb-bridge/master/README.md\" target=\"_blank\"\u003ehttps://documentation.espressif.com/esp-usb-bridge/master/README.md\u003c/a\u003e\u003c/p\u003e\n\u003cp\u003eLast gotcha, is that you'll probably want the openocd-esp32 forked copy (releases include windows binaries), which maintains parity with the SWD upstream code along with espressif specific patches. \u003cbr\u003eFollow the \u003ca href=\"https://documentation.espressif.com/esp-usb-bridge/master/README.md#jtag-bridge\" target=\"_blank\"\u003erecommended commands\u003c/a\u003e in the readme linked above, but mainly it's the same as usual.\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"markdown","content":"\u003ch2\u003eSpeaking of Pins...which ones did I use:\u003c/h2\u003e\n\n\u003cp\u003eThere's a handy Diagram on the back of the SWD/JTAG breakout, seen also on the \u003ca href=\"https://www.adafruit.com/product/2094\"\u003eProduct page\u003c/a\u003e, and it lists each pin name for JTAG or SWD. It also works as a convenient presoldered breakout for jumper cables! \u003c/p\u003e\n","metadata":{"markdown":"## Speaking of Pins...which ones did I use:\n\nThere's a handy Diagram on the back of the SWD/JTAG breakout, seen also on the [Product page](https://www.adafruit.com/product/2094), and it lists each pin name for JTAG or SWD. It also works as a convenient presoldered breakout for jumper cables! \n"}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/593/original/Screenshot_2026-09-18_180402.png?1789751063","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003cp\u003eWhen planning my pin use, I got Google Gemini to suggest an appropriate pinout (for a Super-Mini S3 board):\u0026nbsp;\u003c/p\u003e\n\u003ctable\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cstrong\u003eTarget Interface\u003c/strong\u003e\u003c/td\u003e\n\u003ctd style=\"text-align: center;\"\u003e\u003cstrong\u003eBridge (S3 Super Mini) Pin\u003c/strong\u003e\u003c/td\u003e\n\u003ctd style=\"text-align: right;\"\u003e\u003cstrong\u003eNotes\u003c/strong\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003ctbody\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget TX\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 4\u003c/code\u003e (Bridge RX)\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget RX\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 5\u003c/code\u003e (Bridge TX)\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget TMS\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 6\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget TCK\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 7\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget TDI\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 8\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget TDO\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 15\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u0026nbsp;\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget EN (Reset)\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 1\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003eAutomatically toggled by bridge DTR/RTS\u003c/span\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\u003cspan\u003e\u003cstrong\u003eTarget IO0 (Boot)\u003c/strong\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003e\u003ccode\u003eIO 2\u003c/code\u003e\u003c/span\u003e\u003c/td\u003e\n\u003ctd\u003e\u003cspan\u003eAutomatically toggled by bridge DTR/RTS\u003c/span\u003e\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eAnd it worked with another S3 board as expected (an official Espressif ESP32-S3-DevkitC-1-N8):\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/594/original/Screenshot_2026-09-18_180659_%281%29.jpg?1789752429","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eCloning, reconfiguring pin selection, building and flashing:\u003c/h2\u003e\n\u003cp\u003eGrab your copy of the software from github:\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003egit clone \u003ca href=\"https://github.com/espressif/esp-usb-bridge\"\u003ehttps://github.com/espressif/esp-usb-bridge\u003c/a\u003e\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eMake sure you have the esp-idf installed and loaded (use installer or via git):\u003cbr\u003e\u003cem\u003e(drop/swap the .ps1 extension if not on windows powershell)\u003c/em\u003e\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003egit clone \u003ca href=\"https://github.com/espressif/esp-idf\"\u003ehttps://github.com/espressif/esp-idf\u003c/a\u003e\u003cbr\u003ecd esp-idf\u003cbr\u003egit checkout origin/release/v5.3\u003cbr\u003egit submodule update --init --recursive --depth=0\u003cbr\u003e./install.ps1\u003cbr\u003e./export.ps1\u003cbr\u003ecd ..\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eNow update esp-usb-bridge submodules, set target (\u003csup\u003e\u003cem\u003es2 or s3\u003c/em\u003e\u003c/sup\u003e), then run menuconfig and select pins for JTAG or SWD:\u003c/p\u003e\n\u003cp\u003e\u003ccode\u003ecd esp-usb-bridge\u003cbr\u003egit submodule update --init --recursive --depth=0\u003cbr\u003eidf.py set-target esp32s3\u003cbr\u003eidf.py menuconfig\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003eGo to Bridge config and alter anything desired (nothing), then go back to main menu, then \u003cstrong\u003eComponent Config\u003c/strong\u003e, then\u0026nbsp;\u003cstrong\u003eDebug Probe Config\u003c/strong\u003e, and then select the interface type (SWD or JTAG) and update the Pin numbers.\u003cbr\u003e\u003cstrong\u003e\u003cspan style=\"text-decoration: underline;\"\u003eSave\u003c/span\u003e \u003c/strong\u003ebefore exiting.\u003c/p\u003e\n\u003cp\u003eFinally build and flash the software:\u003cbr\u003e\u003ccode\u003eidf.py build flash\u003c/code\u003e\u003c/p\u003e\n\u003cp\u003e\u0026nbsp;\u003c/p\u003e\n      \n\n\n\n\n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/592/original/Screenshot_2026-09-18_175120.png?1789750288","metadata":{}},{"element_type":"text","content":"\n  \n  \n        \u003ch2\u003eSuccess?\u003c/h2\u003e\n\u003cp\u003eYes in theory!\u003c/p\u003e\n\u003cp\u003eI got bored of setting up and tweaking the openocd and platformio config for SAMD debugging (the Adafruit Metro M4 AirLift being debugged by an ESP32-S3 Devkit board), as VsCode takes an age to reload metadata after each save of platformio.ini, so left Opus model via Claude Code running on it along with other things, and it happily beavered away until resolved:\u003c/p\u003e\n      \n\n","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/595/original/Screenshot_2026-09-18_181047.png?1789762757","metadata":{}},{"element_type":"user_image","content":"https://cdn-learn.adafruit.com/user_assets/assets/000/002/597/original/Screenshot_2026-09-18_211240.png?1789762564","metadata":{}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch2\u003eSuggested Hardware\u003c/h2\u003e\n\u003cp\u003eYou'll probably want an SWD/JTAG cable, and maybe an SWD/JTAG breakout board:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"product","content":"https://www.adafruit.com/product/1675","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/2743","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/2094","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"text","content":"\n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n  \n        \u003ch3\u003eMicrocontroller Board as the Debug Tool\u003c/h3\u003e\n\u003cp\u003e\u003cstrong\u003e\u003cem\u003eAny of these boards\u003c/em\u003e\u003c/strong\u003e are suitable, as are ANY manufacturers ESP32-S2 or ESP32-S3 based boards:\u003c/p\u003e\n      \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n","metadata":{}},{"element_type":"parts","content":"\n  \n    \u003cinput value=\"parts\" class=\"element_type\" id=\"user_page_elements_attributes_18_element_type\"\u003e\n    \u003cinput value=\"3225675\" class=\"id\" id=\"user_page_elements_attributes_18_id\"\u003e\n    \u003cinput value=\"18\" class=\"position\" id=\"user_page_elements_attributes_18_position\"\u003e\n    \u003cinput value=\"Espressif Systems ESP-PROG-2\" class=\"part-name\" id=\"user_page_elements_attributes_18_part_name\"\u003e\n    \u003cinput value=\"https://www.digikey.com/en/products/detail/espressif-systems/ESP-PROG-2/27544876\" class=\"part-url\" id=\"user_page_elements_attributes_18_part_url\"\u003e\n    \u003cinput value=\"The second ESP dedicated programmer released, and the intended target of esp-usb-bridge, makes for a perfect ESP-USB-Bridge debug tool\" class=\"part-description\" id=\"user_page_elements_attributes_18_description\"\u003e\n    \u003cinput value=\"1\" class=\"quantity\" id=\"user_page_elements_attributes_18_quantity\"\u003e\n    \u003cinput value=\"false\" class=\"featured\" id=\"user_page_elements_attributes_18_featured\"\u003e\n\n  \n    \u003ci class=\"fa fa-edit\"\u003e\u003c/i\u003e\n  \n\n  \u003cdiv class=\"product-column product-details-wrapper\"\u003e\n    \u003cdiv class=\"parts-header\"\u003e\n      \u003cdiv class=\"product-title\"\u003e\n          \u003ca href=\"https://www.digikey.com/en/products/detail/espressif-systems/ESP-PROG-2/27544876\" class=\"parts-name\" target=\"_blank\"\u003eEspressif Systems ESP-PROG-2\u003c/a\u003e\n        \n      \u003c/div\u003e\n\n        \u003cdiv class=\"product-custom-description parts-description\"\u003eThe second ESP dedicated programmer released, and the intended target of esp-usb-bridge, makes for a perfect ESP-USB-Bridge debug tool\u003c/div\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\n  \u003cdiv class=\"parts-purchase\"\u003e\n    \u003cdiv class=\"product-buy-wrapper\"\u003e\n      \u003cspan class=\"btn-primary preview-btn\"\u003eBuy Now\u003c/span\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n","metadata":{"quantity":"1","description":"The second ESP dedicated programmer released, and the intended target of esp-usb-bridge, makes for a perfect ESP-USB-Bridge debug tool","name":"Espressif Systems ESP-PROG-2","url":"https://www.digikey.com/en/products/detail/espressif-systems/ESP-PROG-2/27544876"}},{"element_type":"product","content":"https://www.adafruit.com/product/5312","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5364","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5336","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5325","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5000","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/4775","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5426","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5323","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"product","content":"https://www.adafruit.com/product/5500","metadata":{"quantity":"1","description":"","name":"","url":"","featured":"true"}},{"element_type":"text","content":"\n  \n  \n  \n  \n        \u003ch2\u003eImprovements\u0026nbsp;\u003csup\u003e(hopefully an incoming PR or two in the future)\u003c/sup\u003e\n\u003c/h2\u003e\n\u003col\u003e\n\u003cli\u003eIt would be lovely if the nRESET line was supported in SWD mode, or at least left in a compatible state.\u003cbr\u003e\u003cbr\u003e\n\u003c/li\u003e\n\u003cli\u003eHaving to swap firmware for SWD or JTAG is silly, and two OTA partitions instead would be clever.\u003cbr\u003e\u003cbr\u003eYou set the led/neopixel to one colour on boot and wait for one or two button presses, picking SWD or JTAG accordingly, or maybe smarter yet is one press just swaps. Colour of LED indicates SWD or JTAG.\u003cbr\u003eEither way, the boot app (factory) checks the buttons and lights the LEDs, then sets the OTA partition active for JTAG or SWD (or via a flag in NVM) and reboots / loads chosen app partition. Upon loading OTA0 or OTA1 switch to factory app as default partition (or just rely on NVM next boot if not OTA) and then run SWD/JTAG app mode.\u003cbr\u003e\u003cbr\u003e\n\u003c/li\u003e\n\u003cli\u003eDebugMCP allows your agentic harness to interact with debugging tools and was a VsCode extension, but just recently became a CLI tool too / independent of vscode. It probably needs a bit of configuration to select the correct debug target+protocol / add an adapter, but looks pretty solid:\u003cbr\u003e\u003ca href=\"https://github.com/microsoft/DebugMCP\"\u003ehttps://github.com/microsoft/DebugMCP\u003c/a\u003e (Multiple session id / support is an open recent issue)\u003cbr\u003e\u003cbr\u003e\n\u003c/li\u003e\n\u003cli\u003eWireless debugging would be cool...\u003c/li\u003e\n\u003c/ol\u003e\n      \n\n\n\n","metadata":{}},{"element_type":"alert","content":"\u003cp\u003eIf you read this far then you're probably an advanced level adventurer (or sensibly skim first) and I should mention that there's also a version supporting a WiFi connection instead of USB, linked from here: \u003ca href=\"https://github.com/espressif/esp-usb-bridge/issues/1\"\u003ehttps://github.com/espressif/esp-usb-bridge/issues/1\u003c/a\u003e\u003c/p\u003e\n","metadata":{"markdown":"If you read this far then you're probably an advanced level adventurer (or sensibly skim first) and I should mention that there's also a version supporting a WiFi connection instead of USB, linked from here: [https://github.com/espressif/esp-usb-bridge/issues/1](https://github.com/espressif/esp-usb-bridge/issues/1)","alert_type":"primary","icon":"smile"}}]