Got a Netduino for Christmas from my older brother. It came with Firmware version 4.1 and after playing with it for a while I figured, hey, why not upgrade it. Shouldn’t be that difficult, right? Well, maybe not, but I managed to mess it up pretty good.
This post ended up being a bit of a rant, so I apologize for that. For the step by step guide on how to (hopefully) do this firmware update on Windows 8 with Visual Studio 2012 without problems, click the link below to skip ahead to it
Failing to upgrade the .NET Micro Framework SDK v4.2
Before doing any of this I needed to switch out my .NET MF SDK and Netduino SDK 4.1 with 4.2. So i uninstalled them, downloaded the new ones and tried to install them. No go. Why? No support for Visual Studio 2012. After some searching I found that VS 2012 support was added in the .NET MF SDK version 4.3, so I had to install this instead. After that I could install the Netduino SDK 4.2 without problems. (The .NET MF SDK supports multi-targeting so it can target 4.2 devices too).
Making a mess of the Netduino firmware
Tried to follow the guide on their wiki on Flashing new firmware step by step. Since I was upgrading from 4.1, it said I first had to install the TinyBooterDecompressor. This guide started with telling me to download and install the tool SAM-BA 2.12 CDC. And this is where the problems started. I was supposed to erase the Netduino, reconnect it, and use a driver that came with this tool for the Netduino which would give me a device called AT91 USB to Serial Converter.
This just didn’t happen. First of all, when I connected the device it installed itself as GPS Camera Detect (COM3), whatever that is. No questions asked. And when I tried to update this driver to the one that came with SAM-BA, I was unable to because the driver was unsigned. So I had to do an advanced reboot and disable signed driver enforcing which enabled me to install the driver. And then the fun began. I rebooted and my computer decided to shut itself down instead and remain completely dead for several minutes. Eventually managed to turn it back on, but the Windows 8 boot process crashed. Rebooted again and managed to get to the login screen. Logged in, and got another crash.
So I booted into safe mode and uninstalled this AT91 USB to Serial Converter device and its driver. Another boot and I was luckily back up. But my Netduino was still without firmware of course, since I had erased it. I did manage to fix it though. The solution was to just completely ignore the driver stuff. So here’s more or less how I ended up fixing my Netduino and get its firmware updated to version 4.2.
How to do it properly
Remove old stuff (if you have it installed)
- Uninstall the .NET Micro Framework SDK v4.1.
- Uninstall the Netduino SDK v4.1.0.
Get new stuff
- Install Visual Studio 2012, if you haven’t already
- Download and install the latest .NET Micro Framework SDK 4.3.
(the 4.2 available from Netduino doesn’t support VS 2012)
- Download and install the Netduino SDK v22.214.171.124.
(32-bit or 64-bit depending on your Windows version)
- Download and install SAM-BA 2.12 for Windows.
(you’ll have to register and log in, but it’s free)
- Download and unzip the new Netduino firmware.
Erase the Netduino
- Connect your Netduino so it has power.
- Find a jumper wire and connect one end to the 3V3 pin and touch the small golden square next to the GPIO 0 pin with the other end. Keep touching it for at least 2-3 seconds.
WARNING: This completely erases the Netduino and there is no undo. If you do this, the only way to get it working again is to successfully complete the rest of these steps.
- Disconnect the Netduino, wait a few seconds and reconnect it.
It should now be recognized to Windows as a new device called GPS Camera Detect. We will just ignore this and move on.
Load the TinyBooterDecompressor image
- Start the SAM-BA 2.12 tool.
(should be at C:\Program Files (x86)\Atmel\sam-ba_2.12\sam-ba.exe)
- Select the connection.
(for me it was just one selection available)
- Select your board.
(should be at91sam7x512-ek for the regular Netduino)
- Press Connect.
- Run the ‘Boot from Flash’ script.
- Run the ‘Enable Flash access’ script.
- Make sure you’re on the Flash tab and send the ‘TinyBooterDecompressor.bin’ file.
(came with the Netduino firmware you downloaded earlier)
- Select ‘No’ on the question about locked regions.
- When done, close the SAM-BA tool.
- Disconnect and reconnect the Netduino.
Install the new firmware
- Start the MFDeploy tool.
(should be at C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Tools\MFDeploy.exe)
- Select USB as device and you should get a Netduino_Netduino device.
- Click the Ping button to see if it answers.
(should answer with TinyBooter)
- Browse and select both the ER_CONFIG and the ER_FLASH files under Image File and click Deploy (takes a while).
(came with the Netduino firmware you downloaded earlier. Use the ctrl key to select both files in the file dialog)
- Finally, disconnect and reconnect the Netduino.
To confirm the update, in the MFDeploy tool, go to the Target menu and select Device Capabilities. You should get bunch of info, and among that something which says “Netduino (v126.96.36.199) by Secret Labs LLC”. And that should be it. All left then is to open up your Netduino project in Visual Studio and changing the target framework from 4.1 to 4.2 in the project settings.
You’ll find various screen shots of the steps on the Netduino wiki (here and here. Don’t feel like hot-linking and too lazy to make my own). Most of these steps are from those guides, so this is just a complete list adjusted to make it work in Windows 8 with VS 2012 (hopefully without crashing the computer).
Please let me know if I missed something. Might have, since I wrote this down after I had gotten it all up again.