Matthew Smith

Field upgrades, for the non-technical

Discussion created by Matthew Smith on Jan 21, 2013

I have been trying to figure a way to allow the upgrade of HCS08/Kinetis firmware with as few user dependencies as possible.Ideally, all I would want to expose the user to is:

  • Power off system.
  • Remove an SD card.
  • Put in a new SD card.
  • Power on system.

...based on the old concept used in early game devices and other equipment, where the software is essentially an EPROM (or OT-PROM) fitted to a pluggable PCB - but with the crucial difference that what I would like to do is to have a bootloader on the MCU that will take the contents of the SD card and programme it to internal FLASH. Boot sequence being something like this:

  • Check card is inserted (if not, boot normally.)
  • Search card for file with a specific name, which contains a serial number, a target code, and the checksum of a firmware image.
    • Serial number is checked against something in FLASH, to see if this software is newer than what's running.
    • Target code is essentially a way of saying "suitable for this device" - so it doesn't try loading Kinetis firmware onto an HCS08, for example.
    • Checksum is compared with calculated checksum of firmware image on SD card.
  • Assuming all of the above pass, new firmware is loaded into FLASH, system re-starts. Otherwise, boot from existing firmware.

I know that Erich Styger has Processor Expert beans for SD card access and a FAT filesystem, but is there a reference design/recipe for something like this that can be worked from, rather than re-inventing the wheel?

The idea is that devices would be incorporated into interactive art exhibits, with upgrades being possible for people with zero technical knowledge, and without having to lug a computer and/or cables around.

Outcomes