Here's what you need to install as prerequisites:
- Apple's Xcode for Mac OS X Development. To install this, you'll need to register as an Apple Developer (the free level is fine).
- The current version of Mono for Mac OS X. This is required because Mono needs an existing installation of Mono to compile itself.
- Git for Mac OS X. This is the version control system used for Mono's source code.
- Follow the steps in MetaDataProcessor.exe WINE notes. This sets up the MetaDataProcessor, which prepares your compiled assembly to run on the NETMF.
- Follow Mono's instructions to check out the latest version of the Mono source.
- Compile Mono by following these steps (type these commands at the Terminal):
- Change directory to the Mono source directory:
cd mono
- Configure the Mono source code (change /usr/local to wherever you want to install Mono but do not choose /usr):
./autogen.sh --prefix=/usr/local --with-glib=embedded --enable-nls=no
- Compile Mono:
make
- Install Mono (this uses the sudo command to run the command as the super user; you will need to be logged in as an administrative user and you will need to type your password when prompted):
sudo make install
To try compiling a program, use the attached Makefile. This Makefile expects the following:
- mscorlib.dll, Microsoft.SPOT.TinyCore.dll, Microsoft.SPOT.Native.dll, and MetaDataProcessor.exe must be in the same directory as the Makefile. Those three DLLs and MetaDataProcessor.exe were included with the zipfile you downloaded when you installed MetaDataProcessor in the prerequisites section of this post.
- Your program must be named Program.cs, and your AssemblyInfo.cs file needs to be in the Properties/ subdirectory. You can find example programs in the Mono bootloader for Netduino (and sample apps) post, which also includes information on deploying the assemblies to the Netduino.
- If you want to compile anything other than those sample programs, you will probably need to edit the Makefile.