We wanted to make it work with Mac and Linux. This afternoon, we successfully flashed the .NET Micro Framework runtime onto a Netduino using Mac OS X--and using Ubuntu Linux.
[ NOTE: We have also posted MFDeploy v4.1 (alpha 1) for Mac and Linux. MFDeploy enables firmware flashing of Netduino via its GUI. ]
WARNING: this is prototype code. It is meant for our "early adopter hackers" who would like to see some of the community's preliminary work getting .NET Micro Framework support working natively on the Mac and Linux. If you are not a power user, do not use this code.
I have attached an early prototype console version of this tool. It has the following limitations:
1. The serial port is manually specified in code (in two places)
2. The path to the Netduino firmware (ER_CONFIG and ER_FLASH) is manually specified in code
3. MAC OS X: the Mono runtime on Mac requires a patch file for serial support to work (patch is attached).
We tested using Mono v2.6.7 and MonoDevelop 2.4 on a Macbook running OS X 10.6.4 and on a notebook running Ubuntu Linux 10.10 (beta). We used a KeySpan USA-19HS serial adapter plugged into a CuteDigi RS232 shield. The Netduino was flashed with the v188.8.131.52 "serial" TinyBooterDecompressor.
This is prototype code. Your results may vary.
1. Make sure you have Mono v2.6.7 installed on your computer (it comes with Ubuntu 10.10)
2. Make sure you have MonoDevelop v2.4 installed on your computer
3. MAC OS X ONLY: Download the libMonoPosixHelper.dylib.zip file. Unzip and write over the existing file in /Library/Frameworks/Mono.framework/Versions/Current/lib. This patchfile is for Mono v2.6.x on the Mac only.
4. Download the Netduino "SERIAL" TinyBooterDecompressor and Netduino firmware. v184.108.40.206 firmware is here.
5. Flash your Netduino using the "SERIAL" TinyBooterDecompressor. On Mac OS X, you'll need to use a Virtual Machine using Windows (sorry, we're working on making a tool for Mac to do this too). SAM-BA is available for Linux so you can do this natively--but there may be compatibility issues with SAM-BA and various serial adapters (so you may want to use a VM with Windows instead).
6. Download the NetduinoUpdate_Mono_Proto1.zip file (attached). Unzip it to a folder on your computer. We recommend "/Users/[username]/Projects" on Mac and "/home/[username]/Projects" on Linux.
7. Open the NetduinoUpdate.sln file in MonoDevelop.
8. In the NetduinoUpdate project, modify Program.cs as follows:
8[a]. Replace the two "selFiles.Add(...)" function calls in lines 27-28 with the full path to your Netduino SERIAL firmware files
8[b]. Replace the "new MFSerialPort(...)" constructor call in line 48 with the full path to your serial port.
9. In the Debugger, project, modify Streams.cs as follows:
9[a]. Replace the "CreateInstanceForSerial(...)" function call in line 638 with the full path to your serial port.
10. Build your project in MonoDevelop, attach your Netduino via serial cable, and run the sample.
You should now see your Netduino being flashed with the serial firmware using 100% C# code, running natively under Mono on the Mac/Linux.
That's "first light" for us. More to come. Enjoy, and please let us know how this works for you.