Install
$ agentstack add skill-xialangji-debug-codex-skills-agentmd-obsidian-esp32-c5-eim-jtag-flash ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
ESP32-C5 EIM JTAG Flash
Workflow
Use this skill when the user wants to compile, flash, or recover an ESP32-C5 project on Windows with EIM-managed ESP-IDF.
- Prefer the EIM PowerShell profile over legacy
export.ps1.
- Typical profile:
C:\Espressif\tools\Microsoft.v6.0.2.PowerShell_profile.ps1 - It sets
IDF_PATH,IDF_TOOLS_PATH,IDF_PYTHON_ENV_PATH, PATH entries, and theidf.pywrapper.
- Detect the board before flashing.
- Prefer devices with
VID_303A&PID_1001. - Expected serial label can be
USB Serial Device (COMxx)or localized equivalent. - The matching USB JTAG interface can appear as
USB JTAG/serial debug unit. - Run the shared
aa-skill-router/scripts/embedded_target_preflight.ps1before UART or JTAG flashing. It must identify ESP32-C5 rather than an attached ASR target.
- For the known
C:\Users\84365\Desktop\esp32_c5board, prefer direct JTAG (-ForceJtag) because UART download mode has repeatedly failed withNo serial data received. - Try UART flashing only if the user specifically wants to test normal serial flashing:
idf.py -p COMxx -b 115200 flash- If 115200 succeeds, faster speeds can be tried later.
- If UART flashing fails with
Failed to connect to ESP32-C5: No serial data received, use OpenOCD/JTAG fallback:
- OpenOCD config:
board/esp32c5-builtin.cfg - Program offsets:
- bootloader:
0x2000 - partition table:
0x8000 - app:
0x10000
- Treat
Verify OKfor the bootloader, partition table, and app as a successful flash.
Script
Use scripts/flash_esp32c5_eim_jtag.ps1 for the common workflow.
Examples:
# Dry run from the project root, showing the commands without flashing.
powershell -ExecutionPolicy Bypass -File C:\Users\84365\.codex\skills\esp32-c5-eim-jtag-flash\scripts\flash_esp32c5_eim_jtag.ps1 -DryRun
# Build, try UART on COM13, then fall back to JTAG if UART fails.
powershell -ExecutionPolicy Bypass -File C:\Users\84365\.codex\skills\esp32-c5-eim-jtag-flash\scripts\flash_esp32c5_eim_jtag.ps1 -ProjectDir C:\Users\84365\Desktop\esp32_c5 -Port COM13
# Skip UART and flash through OpenOCD/JTAG directly.
powershell -ExecutionPolicy Bypass -File C:\Users\84365\.codex\skills\esp32-c5-eim-jtag-flash\scripts\flash_esp32c5_eim_jtag.ps1 -ProjectDir C:\Users\84365\Desktop\esp32_c5 -ForceJtag
# Fastest repeat flash after a successful build: skip UART and skip build.
powershell -ExecutionPolicy Bypass -File C:\Users\84365\.codex\skills\esp32-c5-eim-jtag-flash\scripts\flash_esp32c5_eim_jtag.ps1 -ProjectDir C:\Users\84365\Desktop\esp32_c5 -ForceJtag -SkipBuild
Manual Commands
If the script is not suitable, run the same steps manually:
. C:\Espressif\tools\Microsoft.v6.0.2.PowerShell_profile.ps1
idf.py build
idf.py -p COM13 -b 115200 flash
When UART fails but OpenOCD can see the chip:
. C:\Espressif\tools\Microsoft.v6.0.2.PowerShell_profile.ps1
openocd -f board/esp32c5-builtin.cfg `
-c "init" `
-c "reset halt" `
-c "program_esp build/bootloader/bootloader.bin 0x2000 verify" `
-c "program_esp build/partition_table/partition-table.bin 0x8000 verify" `
-c "program_esp build/esp32_ai_printer.bin 0x10000 verify" `
-c "reset run" `
-c "shutdown"
Diagnostics
Use these checks before blaming the ESP-IDF installation:
[System.IO.Ports.SerialPort]::GetPortNames() | Sort-Object
Get-PnpDevice -Class Ports -PresentOnly
Get-PnpDevice -PresentOnly | Where-Object {
$_.FriendlyName -match 'Espressif|USB Serial|USB JTAG|CP210|CH340|CH910|UART|Serial' -or
$_.InstanceId -match 'VID_303A|VID_10C4|VID_1A86|VID_0403'
}
Important interpretation:
COMxxexists and OpenOCD detects the chip: environment and USB/JTAG are probably fine.- UART flash fails with
No serial data received: the board did not enter ROM download mode; try BOOT/RESET manually or use JTAG fallback. - OpenOCD reports ESP32-C5 chip revision and JTAG taps: JTAG flashing is available.
- No ESP serial/JTAG device appears: check board power, data cable, USB port, driver, and whether the board is switched on.
Project-Specific Defaults
For C:\Users\84365\Desktop\esp32_c5, the known working setup is:
- ESP-IDF:
C:\esp\v6.0.2\esp-idf - Tools:
C:\Espressif\tools - EIM profile:
C:\Espressif\tools\Microsoft.v6.0.2.PowerShell_profile.ps1 - Detected board:
VID_303A&PID_1001, previouslyCOM13 - App binary:
build\esp32_ai_printer.bin
Do not treat missing UART logs after a JTAG flash as proof that flashing failed; verify by OpenOCD Verify OK and board behavior first.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: xialangji-debug
- Source: xialangji-debug/codex-skills-agentmd-obsidian
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.