Code2Chip AI
Understand code. Debug hardware. Deliver reliability.
Firmware vs silicon verification with context-aware LLM diagnostics for ESP32 — directly inside VS Code.
What it does
- Verify firmware on chip — compare exported
.ino.bin SHA-256 against live flash via OpenOCD
- Diagnose hardware issues — read MCU registers, correlate with your sketch and RAG knowledge base
- Chat with context — ask follow-up questions with software, hardware, or both scope
Created by
Ritish Khichi — IIT Jodhpur graduate.
Quick start
- Install Code2Chip AI from the VS Code Marketplace
- Run Code2Chip AI: Setup Runtime (first time only, ~5–15 min, needs internet) — installs Python, dependencies, and rebuilds the RAG knowledge index
- Open an Arduino/ESP32 sketch workspace and Sketch → Export Compiled Binary
- Connect your ESP32 via USB
- Add your LLM API key in extension Settings (gear icon in Assistant panel)
- Open the Code2Chip AI sidebar → run Start new diagnosis or chat
Prerequisites
| Item |
Required for |
| VS Code 1.85+ |
Always |
| One-time runtime setup |
First use (Python + deps + RAG index build, automated) |
| LLM API key (Gemini, OpenAI, or Anthropic) |
Chat and diagnosis explanations |
| ESP32 board (e.g. ESP32-S3) + USB cable |
Hardware scope / live verify |
Exported .ino.bin in workspace build/ |
Firmware hash verification |
OpenOCD is bundled with the extension. The RAG knowledge base (ChromaDB index) is built on first setup from bundled document chunks — not shipped inside the VSIX to keep install size small.
Commands
| Command |
Description |
| Code2Chip AI: Open Code2Chip |
Open the main sidebar panels |
| Code2Chip AI: Setup Runtime |
Download Python runtime and dependencies (first run) |
| Code2Chip AI: Start OpenOCD |
Launch bundled OpenOCD in a terminal |
| Code2Chip AI: Run diagnosis |
Quick diagnosis from command palette |
| Code2Chip AI: Show output |
View extension logs |
Panels
| Panel |
Location |
Purpose |
| Assistant |
Activity bar sidebar |
Chat, scope, settings |
| Live Hardware |
Activity bar sidebar |
Register view after live diagnosis |
| Diagnostics |
Bottom panel |
Expected vs actual, root cause, fix |
LLM API key
Open Settings in the Assistant panel (gear icon). Keys are stored in VS Code Secret Storage on your machine — they are not sent to Code2Chip servers.
Supported providers: Gemini, OpenAI, OpenAI-compatible (e.g. Ollama), Anthropic.
OpenOCD
The extension ships with OpenOCD for your platform. Use Start OpenOCD in the Hardware panel or command palette before live hardware reads.
Override paths in VS Code settings under code2chip.openocd.* if you use a custom installation.
Windows
If USB-JTAG connection fails, ensure the ESP32 USB driver is installed. External OpenOCD mode is available in settings for advanced users.
Linux
You may need udev rules for ESP32 USB-JTAG access:
# Example for Espressif USB JTAG (VID 303a)
sudo usermod -aG plugdev $USER
# Add udev rule per Espressif documentation, then replug the board
macOS
Generally works out of the box with bundled OpenOCD on Apple Silicon and Intel Macs.
Troubleshooting
| Problem |
Fix |
| "Setup runtime required" |
Run Code2Chip AI: Setup Runtime |
Missing .ino.bin |
Arduino IDE → Sketch → Export Compiled Binary |
| OpenOCD not connected |
Run Start OpenOCD, check USB cable |
| LLM not configured |
Add API key in Settings |
| Blank webview panel |
Reinstall extension; check Show output for errors |
License
Proprietary — see LICENSE.md included in the extension package. Free to install and use from the official Marketplace.
Support
ritish143khichi@gmail.com