How to update Netduino with 4.2 firmware on Windows 8 and VS 2012

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 ๐Ÿ™‚

โž™ Quick link to the fix

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)

  1. Uninstall the .NET Micro Framework SDK v4.1.
  2. Uninstall the Netduino SDK v4.1.0.

Get new stuff

  1. Install Visual Studio 2012, if you haven’t already
  2. Download and install the latest .NET Micro Framework SDK 4.3.
    (the 4.2 available from Netduino doesn’t support VS 2012)
  3. Download and install the Netduino SDK v4.2.1.0.
    (32-bit or 64-bit depending on your Windows version)
  4. Download and install SAM-BA 2.13 for Windows.
    (you’ll have to register and log in, but it’s free)
  5. Download and unzip the new Netduino firmware.

Erase the Netduino

  1. Connect your Netduino so it has power.
  2. 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.
  3. 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

  1. Start the SAM-BA 2.13 tool.
    (should be at C:\Program Files (x86)\Atmel\sam-ba_2.13\sam-ba.exe)
  2. Select the connection.
    (for me it was just one selection available)
  3. Select your board.
    (should be at91sam7x512-ek for the regular Netduino)
  4. Press Connect.
  5. Run the ‘Boot from Flash’ script.
  6. Run the ‘Enable Flash access’ script.
  7. Make sure you’re on the Flash tab and send the ‘TinyBooterDecompressor.bin’ file.
    (came with the Netduino firmware you downloaded earlier)
  8. Select ‘No’ on the question about locked regions.
  9. When done, close the SAM-BA tool.
  10. Disconnect and reconnect the Netduino.

Install the new firmware

  1. Start the MFDeploy tool.
    (should be at C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.3\Tools\MFDeploy.exe)
  2. Select USB as device and you should get a Netduino_Netduino device.
  3. Click the Ping button to see if it answers.
    (should answer with TinyBooter)
  4. 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)
  5. 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 (v4.2.0.1) 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.

  • Xinj

    Dude, you’re the shit!.. This guide was awesome! ๐Ÿ™‚ ..

    • Sounds like it worked for others than myself. Great! Thanks for letting me know ๐Ÿ˜€

  • Patrick McClory

    Very good stuff…solved a ton of problems with my netduino plus (1) -same board id as yours (at91sam7x512-ek).

  • Pingback: Netduino sobre Windows 8 « Soloelectronicos()

  • Made my night! Thank you for your time putting this together. Upgrade succeeded ๐Ÿ™‚

  • Pingback: Cรณmo actualizar Netduino con firmware 4.2 en Windows 8 y Visual Studio 2012 « Soloelectronicos()

  • Gareth Conner

    Thanks so much for taking the time, helped me bring my Netduino back to life after I erased it!

  • bmwagle

    tell me how to do erase and loading for neduino 2 plus which uses st chip

    • Eh… I don’t have one of those. How about you see if you can figure it out and let me know if you do?

  • Rick F.

    umm. I followed to the word and all was good until after I flashed. I got Chk s.

    Ignored that crap, unplugged and replugged in for your last instruction, which was to device capabilities..

    I got: Error: Can not connect to device

    Awesome. :/ Cant even ping it without putting it into bootloader mode.

    • Tired to erase it again and redo the following steps? Otherwise I don’t know what the problem could be. The steps listed worked fine for me and seems to have worked fine for others as well.

  • Peter Joosten

    Thanks a lot for putting these steps nicely in order. At first I got a little bit in trouble as after erasing my netduino was not recognized as a GPS Camera, but rather as a Lego NXT device updater. Consequently SAM-BA could not connect. Then I tried following your steps on another computer, worked perfectly.

    • Weird! Good to hear you managed to get it to work then.

  • Pingback: Blog J.Schweiss | Netduino Plus Firmware update on Windows 8 to .NET MF 4.3()

  • Strillo

    Thank you so much for putting this guide together! Managed to restore my Netduino Plus after months of messing with it! ๐Ÿ™‚

  • ericvt

    Well done, this tutorial is clear and doesn’ miss a step. Works the same way if you intend to load with Sam-ba 2.13

    • Cool! I’ll update the post then so people know they can use latest version ๐Ÿ™‚

  • Jeff Estival

    Thank you for this man ! It worked like a charm !

  • thanks for your tutorial.

  • edgar

    i downloaded the firmware for netduino1 but apears a file TinyBooterDecompressor.proj is it the same than .bin?

  • Pingback: Netduino Plus ใฎใƒ•ใ‚กใƒผใƒ ใ‚ฆใ‚งใ‚ขใ‚’ ver. ใซๆ›ดๆ–ฐใ™ใ‚‹ |

  • Kelvin davis-smith

    I know it’s really late (2 years since anyone last commented), but does anyone here still have a copy of the 4.2 firmware? the netduino forum seems to be a bit messed – can’t login, reset, etc

  • Joe Schroedl

    It all works until the part where I have to use MFDeploy. I don’t see any devices in USB.