This is a browser-based flashing tool for Microchip AVR microcontrollers that support UPDI programming. I couldn't find a nice GUI-based flasher, so I decided to port the code from pymcuprog so that it runs in a browser. Prerequisites:
- AVR chip with UPDI interface
- Simple "serial UPDI" programmer (see below)
- Browser that supports the Web Serial API (Chrome, Edge, Opera)
You can access WebUPDI directly in your browser, without downloading or building anything, here:
https://manuelkasper.github.io/webupdi/
- Program Flash, EEPROM and User Row
- Read Intel HEX or raw binary files
- Chip erase/unlock
- Auto-detect device type by reading device ID
- Read portions of device memory and display data in the log
UPDI (Unified Program and Debug Interface) is a 1-wire interface for debugging and programming newer Microchip AVR microcontrollers, such as:
- tinyAVR 0, 1, 2 Series: e.g. ATtiny202, ATtiny412, ATtiny1604, ATtiny3226
- megaAVR 0 Series: e.g. ATmega1608, ATmega3208, ATmega4809
- AVR DA/DB/DD/DU Series
- AVR EA/EB Series
The hardware for a UPDI programmer can be very simple and cheap: a USB-to-Serial adapter with TTL levels (3.3 or 5 V depending on the circuit that the AVR is being used in) and a 1k resistor is all that it takes. See for example here:
- UPDI Friend: https://www.adafruit.com/product/5879
- https://github.com/BlackBrix/AVR-Programmer/tree/master/SerialUPDI_Programmer
- https://github.com/umbertoragone/nanoupdi
So far, compatibility has only been tested with NVM version 0 (tinyAVR 0, 1, 2; megaAVR 0) on the following AVR models:
- ATtiny416
- ATtiny3217
- ATtiny3226
Success or failure reports with other MCUs are most welcome.
The code in the serialupdi directory has been ported from Python to TypeScript, with some help from Copilot to speed up the task. The original source is at https://github.com/microchip-pic-avr-tools/pymcuprog/tree/main/pymcuprog/serialupdi.
npm installnpm run devThis starts a local development server at http://localhost:3000 with hot module reloading.
npm run buildThis generates an optimized production build in the dist/ directory that can be deployed to a web server.
npm run previewThis starts a local server to preview the production build.
