Firmware Update - The Achilles Heel of FEZ!

As a newbe to FEZ development having just bought a Domino board I was very impressed with it, especially the ease of development, the extensive driver coverage and the excellent documentation. I was very quickly able to get digital inputs and outputs, timers and a serial link to a LCD display working. The whole thing was even event driven without a polling loop is sight! Great!

Then I tried to add Real Time Clock support (I had already added a Super Cap to my own IO shield following the schematic for the new Panda II network shield). Now it all fell apart - program would not run, messages about checksum errors, a message about a component failing to load because version ‘x’ was found while version ‘y’ was required - but ‘x’ and ‘y’ are identical!

Now I remembered in my reading several times comming across comments about the importance of updating the firmware - problem was none of the docs explained how to do that or even how to check whether or not the versions match! With no clear way forward, I had ignored these warnings and just tried it and it seemed to work OK - at first!

The otherwise excellent “Beginners Guide to NETMF” is particularly irritating in this respect - an entire chapter on “Assembly/Firmware Matching” manages to talk round the subject at great length without ever explaining how to actually do the job! Much searching later the best I can find is a link to a YouTube video on updating the Cobra - But that is “video no longer available because user account was cancelled”. Good hint though - searching on YouTube itself finds a two part, 20-minute epic on “Updating the Firmware on a FEZ Domino” - trouble is it is in Russian! But I do then find a shorter English video from GHIElectronics which gets me going. Problem is dispite being very verbose on other matters, it glosses over the very part that gives me problems - getting the virtual com port to appear on my PC. Having finally got that sorted (not sure how - I fiddled about for a bit and it eventually came right!). But the specific firmware file it references for the Domino is nowhere on my PC, USBizi is the nearest I can find, so I use that. OMG! I Bricked my Domino! “Download completed sucessfully” but then “bad firmware” and I am still in the bootloader. An extensive search and a re-install of the SDK fails to reveal to find a specific Domino firmware, so in some desperation I retry with the same USBizi file. To my considerable releaf it works this time!

Problem solved, only moderate further hair loss!

Surely this could be improved to give a better user experience? Is it not possible to hook the deployment process in Visual Studio to at least do a version comparison and show an explicit error message, but preferably guide the user through a semi-automated update process if necessary?

Meantime I will post a step-by-step tutorial in a follow-on message to help others (including myself when I have to do this again!).

Did you take a look in the Downloads section, specifically this:
http://www.tinyclr.com/dl/

I’m glad you got it figured out. Updating the firmware does seem to be tricky the first time for many folks. I think it might be because we users look to hard for the answer, this is FEZ and it should be easy to do. :smiley:

For future reference if someone is reading this thread: If you look at the top of the downloads page there is some big red text about updating your firmware. If you click on the text you go to a you tube video that shows you how to do so,

I like to use FEZ Panel, which you can find on the Wiki: [url]http://wiki.tinyclr.com/index.php?title=FEZ_Panel[/url]

UPDATE: The good folk at GHI have responded superbly to this thread and I suggest you follow the instructions here: [url]GHI Electronics – Where Hardware Meets Software rather than using this posting - JohnH.

How to check your Firmware Versions:

  1. With your board connected to the PC and the device driver installed, start the “MFDeploy” program from the Microsoft NETMF SDK Tools directory (i.e. NOT the GHI SDK). Select “USB” and “USBizi_USB_izi” in the “Device” box.

  2. Select the “Target” menu and then “Device Capabilities”. In the results box, find the line “SolutionReleaseInfo.SolutionVersion:” and note down the value (“4.1.5.0” in my case).

  3. Start Visual Studio/Visual Studio Express and create a new project for your specific board (Domino in my case).

  4. In Solution Explorer window, right-click on “References” and select “Add Reference”. On the .NET tab, scroll down to one of the “GHIElectronics” components. Check the “Version” column. This must EXACTLY MATCH the version noted down in step 2. If the Visual Studio version is greater, the device needs updating (see below). If the MFDeploy version is greater, you need to download and install the latest SDK from the GHI web site.

Updating the Firmware on a FEZ:

  1. Disconnect the USB connection at the board (and any other source of power). Hold down the “LDR” button on the board while reconnecting the USB connection. Once the Power LED comes on, you can release the button.

  2. Note any messages about device drivers on the PC. If these indicate problems, start Device Manager and repeat step 1. You should see a new COM port appear in the list.

  3. Start the TeraTerm program. If you do not have this on the PC, download it from the GHI site and install.

  4. Select “make new connection” and the “serial” connection type. Select the COM port that appeared at step 2. This may be annotated “USBizi” or it may be the only port. If you cannot identify which port is correct, disconnect the device, note the ports that remain, repeat step 1 and check the list again. the port that was not there before is the right one to select.

  5. With TeraTerm active, type “V” (a single, uppercase letter). The device should reply with a version number (e.g. 1.07) and then “BL” on a new line.

  6. Type “X” (a single, uppercase letter). The device should reply “Start File Transfer” then a continuous stream of “C” characters.

  7. In TeraTerm, select the File menu then: Transfer, XMODEM, Send. In the dialog, navigate to the firmware file “*CLI.GHI”. This will be in the GHIElectronics folder in your ProgramFiles directory (the x86 version on a 64-bit OS). Use the one in the subfolder GHI NETMF xxx SDK/USBizi/Firmware/. IMPORTANT: before pressing “OPEN” button, make sure the “1K” option is checked. The transfer will begin immediately you press OPEN and will take only a few seconds.

  8. You should see a message that the transfer has completed sucessfully and then nothing. Recheck the version number using the procedure above. If the process fails, you may see a message “Bad Firmware” and then the “BL” prompt returns. In this case, re-try the transfer ensuring you selected the correct firmware file for your board or chip.

@ Ravenheart: OK - But I was using the download page on the GHI main site. That is the same YouTube video I eventually found, but it could do with updating. In particular the directory structure and name of the firmware file has changed since it was made.

@ Jeff: The FEZ Panel does look like a better solution - but maybe it should be adopted onto the download pages and be the destination of the link from the “big red box”? But surely having gotten to this stage, it would be possible to hook this into Visual Studio so it gets launched automatically if needed?

Problem is this clunky and poorly documented process is the “first impression” many people will get of FEZ and “freeking easy” it aint!

Maybe someone can do a windows application to automate the firmware update procedure. It should not be difficult.

MS made easy with MFDeploy, but for some reason they elected not to be compat with that tool.
Teraterm method is not that difficult when you get down to it. Just you never remember how to do it. Is is X or v or c? Bootloader mode this and that, blah. New montra. MFDeploy or Bust.

The FEZPanel looks like a good start - but I could not get it to work!

It connects to the board OK, but when I try Firmware|Upgrade it replys “ERROR: GHI SDK is corrupt or missing”. I checked device settings and it seems to assume 32-bit program files directory on C: - really should use the %ProgramFiles% symbol for portability. However I navigated it to the correct directory and it still gave the same result. Even tried editing in quote marks round the directory name - no dice! Stuck!

I’ll have a look at the source code when I get the time unless anyone else has already fixed it.

Also a wizard approach where it guides you through putting the board into LDR mode might be better.

Ah! The thing I hoped to get from FEZ was I could go straight into developing my application rather than spend all my time developing and learning tools as seems to be par for the course in embedded land!

I added a FezFirm.txt file to the desktop to help me remember. Your milage may vary.

Update Fez Firmware

  1. Hold LDR button then plug in USB. New comm port should appear in devices (i.e. comm13)
  2. Open TeraTerm
  3. Erase current with E
  4. Load new firmware with X from location (e.g. C:\Program Files (x86)\GHI Electronics\GHI NETMF v4.1 SDK\USBizi\Firmware)
  5. Use XModem and 1K transfer.
  6. Update your GHI references in your project(s) by removing them and adding them back. Create a screen snip of references before removing

them to help remember which to add back.

Can also use MFDeploy to verify version before and after or just to check what level.

Thanks William,

That is pretty much the process I documented above (which I mostly transcribed from the GHI video). However the ‘E’ step is not on the video. It does not seem to be essential, but looks like good house-keeping.

Can anyone point me to documentation for the bootloader with a full list of the available commands?

There is documentation for about everything but things maybe hard to find for beginners. For example, FEZ Domino is based on USBizi chipset and so the USBizi manual is needed but this may not be obvious.

We are aware of this and been working on making the newcomer experience better by compiling everything they need on one page. We are still working on it but you can take a look to see what we have so far Support – GHI Electronics
You are anyone else is more than welcome if they like to contribute, tutorials are on wiki so anyone can chip in if they like.

I also had the idea of creating a tool to automate the update process. That would also need a Visual Studio plugin that updates old references in projects and I really don’t have a clue on how to do this :slight_smile:

Thanks Gus,

Yes, this page exemplifies the problem I encountered - it links to TeraTerm and mentions that it is used to update the firmware, but does not link to the USBizi manual (or the video) which explains how to actually do the update! And, of course, being a PDF it is not found on a site search for “firmware update” for example. There is a link to “Firmware Update” on the WiKi, but like the NETMF beginners manual it waxes lyrical at considerable length about the need for updates and then rather glosses over how to actually accomplish an update! (I’ll take the hint and try to improve this, but I may be a little limited in only having access to a Domino).

The most important thing that would have improved my new user experience would be a link to the USBizi manual from [url]http://www.ghielectronics.com/catalog/product/133[/url] which was my starting point.

… working on it, thanks for feedback