Netduino home hardware projects downloads community

Jump to content

The Netduino forums have been replaced by new forums at This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

Setting up a Mono Toolchain for Netduino on Mac OS X

  • Please log in to reply
No replies to this topic

#1 Brian Jepson

Brian Jepson


  • Members
  • PipPip
  • 15 posts
  • LocationKingston, RI

Posted 13 February 2011 - 10:02 PM

Miguel de Icaza and Marek Safar of Mono got in touch with us to let us know that they've incorporated a bunch of improvements to Mono that will let it work with Netduino. Unfortunately, these changes will not be included in the upcoming 2.10 version of Mono. The good news is that it's not too hard to compile Mono yourself, especially if you are familiar with the Mac OS X Terminal.

Here's what you need to install as prerequisites:

Now you're ready to get started. Open a Terminal window (Terminal is in /Application/Utilities). Next:

  • 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):
    ./ --prefix=/usr/local --with-glib=embedded --enable-nls=no
  • Compile Mono:
  • 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
You now have two versions of Mono installed: one in /usr/bin (the version you installed during the prerequisite phase, and the version you just compiled). To use the Mono compiler that supports Netduino, invoke it as /usr/local/bin/mcs (change /usr/local to the prefix you used in step 2 from the last list of steps).

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.

Attached Files

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.