Skip to content

bcr/FezBootloaderUtil

Repository files navigation

Overview

This is a utility that will update a FEZ to the latest firmware. Tested with exactly one FEZ Domino on exactly one machine.

In general, you can just put your FEZ board in bootloader mode and run it, and the magic happens.

Two potential limitations right now:

  1. It looks for the USBizi firmware in a fixed location, namely "C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.1 SDK\USBizi\Firmware\USBizi_CLR.GHI". This may not work on every machine.
  2. It looks for a USB device with a description of "GHI Boot Loader Interface". If it doesn't find that, it stops.

Happy to hear any guidance about how to address these potential limitations.

Principles of Operation

  1. Find the COM port for the FEZ in bootloader mode
  2. Transmit the new firmware using XMODEM-1K to the board over the COM port

One clever bit (well, I think it's clever) that I found was the serial port identification code:

    private SerialPort OpenFezBootloaderSerialPort()
    {
        var searcher = new ManagementObjectSearcher("select DeviceID,MaxBaudRate from Win32_SerialPort where Description = \"GHI Boot Loader Interface\"");
        foreach (var obj in searcher.Get())
        {
            return new SerialPort((string) obj["DeviceID"], (int) (uint) obj["MaxBaudRate"]);
        }
        throw new Exception("Unable to find FEZ device. Is it in bootloader mode?");
    }

This uses Windows Management Instrumentation (WMI) to find the associated COM port with the FEZ, and then creates a SerialPort object preconfigured for the MaxBaudRate advertised by the device.

About

FEZ bootloader utility. Good for updating firmware.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages