Radar van Elk Solutions

Hackaday · Creativity & design

On-Chip Debugging for MicroPython

A new method allows for on-chip source-code debugging of MicroPython in Visual Studio, moving beyond traditional print-statement debugging.

The system requires a supported MicroPython host and a standard USB programming cable. Users must either build a custom MicroPython image or use a pre-provided one. Supported hardware includes several Raspberry Pi Pico versions and ESP32 chips.

Compatibility issues were noted, with one specific Raspberry Pi Pico model failing to accept the custom firmware, while a standard model worked correctly. A known problem also affects Linux with ESP32-S3 chips exhibiting similar behavior. Building a custom image requires setting up a toolchain and dependencies.

While not essential for simple programs, the debugger offers the ability to inspect variables and visualize control flow. Limitations include the inability to catch exceptions already handled by the code and breakpoints halting all threads. These are considered minor issues.

AI-samenvatting op basis van de bron.

Hackaday