Tkinter GUI front-end for the minipro chip programmer
  • Python 99%
  • Shell 1%
Find a file
Yeold 2e84c26569 Add the upstream write-up for the AVR fuse stride bug
Keeps the analysis behind the Fuses tab's write guard next to the code
that implements it, and gives the minipro project something filable.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Fa6qCG6gUQWGpwbmFKqp1g
2026-08-26 12:13:01 +02:00
docs Add the upstream write-up for the AVR fuse stride bug 2026-08-26 12:13:01 +02:00
.gitignore Add Tkinter GUI front-end for the minipro programmer 2026-08-26 09:14:06 +02:00
fuses.py Refuse to write fuses that read back wider than the database 2026-08-26 12:10:45 +02:00
hexview.py Add a fuse editor and a buffer view 2026-08-26 10:50:01 +02:00
install.sh Add Tkinter GUI front-end for the minipro programmer 2026-08-26 09:14:06 +02:00
LICENSE Add Tkinter GUI front-end for the minipro programmer 2026-08-26 09:14:06 +02:00
minipro-gui.desktop Add Tkinter GUI front-end for the minipro programmer 2026-08-26 09:14:06 +02:00
minipro_gui.py Refuse to write fuses that read back wider than the database 2026-08-26 12:10:45 +02:00
README.md Refuse to write fuses that read back wider than the database 2026-08-26 12:10:45 +02:00

minipro GUI

A Tkinter front-end for minipro, the free and open command-line tool for the XGecu TL866A/CS, TL866II+, T48, T56 and T76 chip programmers.

It does not talk to the hardware itself — every button builds a plain minipro command line, runs it, and streams the output back. The exact command is shown before it runs and echoed into the log, so anything you do here can be repeated by hand in a terminal.

Read tab with a device selected

Features

  • Device picker — search the chip database by name (-L) and pick from the results, or type a device in directly. Double-click a result for its chip info (-d): memory size, package, protocol and buffer sizes.
  • Programmer detection — presence check (-k) on startup and on demand, with an override for driving the database of a programmer that is not plugged in.
  • Read (-r) to raw binary, Intel hex or Motorola S-record, with memory page and fuses/uid/lock section selection.
  • Write (-w) with the full set of options: skip/force erase, skip verify, skip blank blocks (-B), unprotect before and protect after, and both size-mismatch modes. Programming parameters (VPP, VDD, VCC, pulse delay, SPI clock, I2C address) can be overridden per write.
  • Verify (-m), blank check (-b), erase (-E), pin contact check (-z) and SPI 25xx auto-detect (-a).
  • Logic test (-T) with an optional saved report (--logicic_out).
  • Fuse editor — read the config page, edit each fuse as hex or as individual bit checkboxes, and write it back. Bit masks and factory defaults are pulled from minipro's infoic.xml, so bits the device does not use are greyed out and a Reset to defaults button is available where the database knows them.
  • Buffer view — a hex/ASCII view of any dump with go-to-offset, hex or text search, and Size / 16- and 32-bit sums / CRC32 / MD5 / SHA1 / blank check.
  • Programmer maintenance — supported-programmer list, hardware self-test, version, custom infoic.xml / logicic.xml / algorithm.xml, and firmware update.
  • Live log with a progress bar driven by minipro's own percentage output, colouring for warnings and errors, cancel, and save-to-file.
  • Destructive actions (write, erase, firmware update, self-test) ask first.

Requirements

  • Python 3.10+ with Tkinter (python3-tk on Debian/Ubuntu, python3-tkinter on Fedora/openSUSE). No third-party Python packages.
  • The minipro binary on $PATH, or its path set in the Programmer tab.

Usage

python3 minipro_gui.py

Or install the launcher and desktop entry for the current user:

./install.sh

Typical flow: plug in the programmer, hit Detect, search for your chip in the Device pane, then use the Read / Write / Verify tabs.

Write tab

Fuse editing

minipro -c config -r fuses.conf writes the config page as plain text — one name=0xNN line per fuse, lock or user-ID word. The Fuses tab reads that file, lays each entry out as a hex box plus one checkbox per bit, and writes it back in the same format; lines it does not recognise (such as the AVR calibration bytes: line) are preserved untouched.

Fuse names come from the file, but the bit masks and defaults come from the <config> blocks in infoic.xml, looked up via the device you have selected. Note that minipro sets every bit outside the mask to 1 on the way out, so a default is shown the same way — an ATmega328P efuse reads back as 0xf8, not 0x00, even though only its low three bits mean anything.

Individual bit names (CKSEL, BODLEVEL and friends) are not in minipro's database, so unlike Xgpro this editor shows bit numbers rather than their meanings. Check the datasheet before writing.

Fuses tab

Buffer view

Loads any file — a chip dump, a ROM image — and shows it as hex and ASCII. The data is held in memory and only the visible window is rendered, so a 16 MB dump scrolls without lag. Search accepts either text or hex (de ad be ef, deadbeef and 0xDE,0xAD all work), and matches are highlighted in both columns.

The checksum panel reports size, the additive 16- and 32-bit sums that Xgpro users will recognise, CRC32, MD5, SHA1, and whether the buffer is entirely 0xFF.

Buffer tab

Notes

  • minipro asks on stdin which database to display when no programmer is attached. Because the GUI runs it behind a pipe, database lookups always pass an explicit -q: the programmer you selected, the detected one, or TL866II as a fallback. Pick the right programmer in the toolbar if you are browsing the database with nothing plugged in.
  • Progress is reported by minipro on stderr as \r<ESC>[K<label> NN% with no trailing newline. The output reader splits on CR as well as LF so progress updates overwrite in place instead of filling the log.
  • Reading with no memory page selected writes the code page to the file you chose and puts <name>.eeprom.bin / <name>.fuses.conf next to it when the chip has those pages. That is minipro's behaviour, not the GUI's.
  • Access to the programmer over USB normally needs the udev rules shipped with minipro; without them you will get permission errors in the log.
  • Settings (binary path, last programmer, last device, last directory) are kept in ~/.config/minipro-gui/settings.json.
  • On a T76, current minipro builds support NAND and eMMC. Elsewhere those parts (and VGA) still appear in the device search but are refused with "This chip is not supported yet." For T76 eMMC, pick the target area with the eMMC partition selector in the chip options.
  • Requires a minipro new enough to have the options the GUI passes. --partition and -B/--skip_blank arrived after the 0.7.4 tag; on an older build they will be rejected as invalid options. Leave the partition selector on "(default)" and the skip-blank box unticked and everything else works as before.

Known minipro issues seen on a T48

Both of these were reproduced from the command line as well as through the GUI, so they are minipro behaviour rather than anything this front-end does. Observed with minipro 0.7.4, an ATtiny85, and a T48 on two different firmware revisions — 00.1.31 and 00.1.39 (minipro 0.7.4 expects 01.1.35 and warns in both directions that "T48 support is not yet complete").

Flash writes were corrupted, and a current minipro fixes it. On the 0.7.4 release the code page write reported Writing Code... OK and then failed verification at address 0x0000 with File=0x4D, Device=0x00, while EEPROM writes on the same chip verified fine. Updating the programmer's firmware made no difference — the failure was identical on two revisions. Building minipro from current master fixed it outright: the same write now reports Verification OK and the read-back is byte-identical to the file. If you see this, update minipro rather than chasing the programmer.

AVR fuses read back as 16-bit garbage on current master. On an ATtiny85, -c config -r returns lfuse=0xff62 hfuse=0xffff efuse=0xfffe lock=0xffff where 0.7.4 correctly returns lfuse=0x62 hfuse=0xdf efuse=0xff lock=0xff. Commit 2cc2b5a started setting word_size = 2 for these parts, which is right for AVR flash (it is what fixes the write bug above) but wrong for fuses, which are byte-organised — minipro's fuse code reuses the device word size, so it reads a 2-byte stride over a 1-byte-per-fuse buffer. Reverting that commit fixes the fuses and re-breaks the writes; the two share one change.

The Fuses tab detects this: if a fuse reads back wider than the database says it is, the values are flagged and writing is refused, because writing hfuse=0xff where the chip holds 0xdf clears SPIEN and disables further serial programming. Genuine 16-bit config words (PIC and similar) have 16-bit masks and are unaffected.

A full blank check misreports fuses. Still present on current master. minipro -p ATTINY85@DIP8 -b says "Fuse bits aren't in their default value!" on a chip whose fuses are provably at their defaults, while -b --fuses and -b -c config on the same chip both say "Fuse bits are in their default value." Reading the code and data pages first appears to disturb the fuse comparison. If a blank check surprises you, re-run it against a single page or section.

Licence

MIT — see LICENSE. minipro itself is a separate GPL-licensed project; this GUI only invokes it as an external program.