Skip to content

manuelkasper/webupdi

Repository files navigation

WebUPDI

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/

Features

  • 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

WebUPDI main UI screenshot

What is UPDI?

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

Simple UPDI programmer hardware

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:

Compatibility testing

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.

Original source

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.

Development

Setup

npm install

Development Server

npm run dev

This starts a local development server at http://localhost:3000 with hot module reloading.

Build for Production

npm run build

This generates an optimized production build in the dist/ directory that can be deployed to a web server.

Preview Production Build

npm run preview

This starts a local server to preview the production build.

About

WebUPDI: Flashing modern AVRs in the browser via serial UPDI

Topics

Resources

License

Stars

Watchers

Forks