Surely there are several similar ways of doing just that, but this is how I did it and it worked well for me. This howto is somewhat of a compilation of several different threads on similar topics and based on the valuable inputs of many.
EDIT: Just found this nice post on reflashing the mini with lots of pictures to go with it.
Note: The procedures described herein are not necessary if you're simply looking to update the firmware of your mini, i.e. it hasn't locked up or anything. If the former is the case, you can just skip directly to 3.9.
Requirements, apart from the mini itself of course, are:
- 1.1. A USB->RS232 cable*, i.e. the real thing, not TTL levels
- 1.2. Preferably a serial cable with female DE9 (also called DB9) plugs in both ends
- 1.3. A pretty crisp 9v battery or a 7-12v wall outlet adaptor
- 1.4. Version 2.10 of SAM-BA, available from the Atmel homepage
- 1.5. The RS232 version of TinyBooterDecompressor.bin**
- 1.6. The firmware version you wish to flash
- 1.7. A breadboard or what have you
**) You could use the TTL version but then you'll have to switch to a USB->TTL cable in between steps 3.8 and 3.9 below.
Now for some preparations before you proceeed:
2.1. Disconnect any and all wires from your mini, this is important!
2.2. Cut off the serial cable (1.2) to reveal the wires inside of it. Sort out the wires corresponding to these RS232 holes/pins:
- RS232 hole/pin 2 = Rx
- RS232 hole/pin 3 = Tx
- RS232 hole/pin 5 = Signal ground (SGND)
_________________ | _____________ | | \ 5 4 3 2 1 / | | O \ 9 8 7 6 / O | | --------- | |______shield_____|Tip: Usually these numbers appear as tiny engravings in the plastic housing of the DE9 just next to each of the holes/pins.
Note: When looking into a male DE9, the pins are mirrored.
2.3. Peel off your bared serial cable (1.2) wires a bit in their end points and use a conduction tester (beeper or similar) to identify what wire corresponds to the holes 2, 3 and 5 above respectively. Do this by sticking one testprobe into a hole while using the other to touch the wires one at a time til you get a beep (conduction). Do this for all the three holes 2, 3 and 5.
2.4. Preferably solder a little soldering material to the peeled off wire ends in order to make them a little more rigid.
2.5. Plug the uncut end of the serial cable (1.2) into your USB->RS232 cable (1.1) and connect the USB end of the latter to a free USB slot on your computer.
2.6. Preferably bridge holes 2 and 3 of the female DE9 (1.2) and use Putty or Hyperterminal to connect to the COM-port exposed by your USB->RS232 cable. Type a few letters and verify that they are echoed back to your terminal. If not, check your wires and correct them until you get an echo. Remember to remove the bridge before proceeding!
Ok, so here follows the actual reflashing of the mini:
3.1. Connect the plus and minus poles of your battery (1.3) to pins 24 and 23 respectively on your mini.
3.2. Connect a jumper wire from pin 21 (5v out) on your mini and hold the other end against the gold pad on your mini for about half a second. This will make sure that the on-board flash of your mini gets completely erased.
3.3. Disconnect power from your mini.
3.4. Connect the cut serial cable (1.2) wires 2, 3 and 5 to pins 1, 2, and 4 respectively on your mini. Optionally also connect the shield of your serial cable to pin 23 of your mini, I found this to make the connection a bit more stable.
3.5. Re-connect power to your mini.
3.6. Launch SAM-BA 2.10 (not CDC-version) and select the COM-port that your USB->RS232 exposes. Also select the chip named at91sam7x512-ek from the drop down list, then proceeed.
3.7. SAM-BA should now connect to your erased mini, if not, repeat from 3.2. After that, follow the exact steps in using SAM-BA as shown in this video by VCSandARM. In short summary:
Make sure the tab "Flash" i selected, then select "Boot from flash" in the command drop down, press execute. Next execute the "Enable flash access" command. Send the TinyBooterDecompressor.bin file (1.5) to flash, select "No" in when promted for lock regions. Use the compare function to verify what can actually be read from flash now matches what you just uploaded. If the data match, proceed to next step. If not, repeat the send and compare routine until they do.
3.8. Exit SAM-BA and power cycle your mini.
3.9. Launch MFDeploy.exe using the same COM-port as with SAM-BA. Try a few pings to make sure you have connection. If not, close MFDeploy.exe and repeat from 3.2.
3.10. In MFDeploy, select the firmware (1.6) you wish to reflash and deploy it to your mini.
3.11. All done, now go about doing some more really cool things with your resurrected Netduini mini - but try doing it a little differently this time since you nealy bricked it before
Should you find something to be incorrect in this howto, please reply to this post and I'll modify the howto accordingly.
Good luck!