From 81ff282291527178abab4ab63b22065d6eb3cb2f Mon Sep 17 00:00:00 2001 From: Bluebie Date: Thu, 4 Oct 2012 11:26:39 +1000 Subject: Added viral in place upgrader tool, to upgrade bootloaders via the bootloader itself (should work with any attiny85 bootloader I think, in either direction) --- upgrade/readme.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 upgrade/readme.txt (limited to 'upgrade/readme.txt') diff --git a/upgrade/readme.txt b/upgrade/readme.txt new file mode 100644 index 0000000..fceee4b --- /dev/null +++ b/upgrade/readme.txt @@ -0,0 +1,15 @@ +Micronucleus Upgrade +==================== + +Upgrade is a virus-like payload you can upload via micronucleus (or other bootloaders) to install a new version of micronucleus on the target chip. The upgrade program works by copying the contents of a bootloader hex file in to a progmem array, then bricking the device so it doesn't enter the bootloader on reset but instead runs the upgrader program exclusively. Next it erases and rewrites the bootloader in place at the same address the hex file specifies (BOOTLOADER_ADDRESS in the case of micronucleus). Once the bootloader has been rewritten, upgrade rewrites it's own interrupt vector table to point every interrupt including reset straight at the newly uploaded bootloader's interrupt vector table at whichever address it was installed. + +The program then emits a beep if a piezo speaker is connected between PB0 and PB1. If you have no speaker, use an LED with positive on PB0. Premade upgraders are included in releases/ for micronucleus builds. Just upload one in the usual way and wait for the beep. Once you hear the beep, power down the device and turn it back on - it should launch your new bootloader! + + +Creating an Upgrader +==================== + + ruby generate-data my_bootloader.hex + make clean; make + +Next upload the 'upgrade.hex' file generated, via whichever bootloader you're using. If you're using micronucleus and have the command line tool installed: micronucleus --run upgrade.hex -- cgit v1.2.3