The Netduino forums have been replaced by new forums at community.wildernesslabs.co.
This site has been preserved for archival purposes only
and the ability to make new accounts or posts has been turned off.
Here are some preliminary notes on running MetaDataProcessor.exe on WINE. This will let Linux and Mac users run the version of MetaDataProcessor.exe that comes with the .NET Micro Framework. Eventually we'll want to port MetaDataProcessor to portable C, but this will work in the meantime.
This takes the compiled assembly from the C# compiler (Linux instructions; Mac instructions), minimizes it to fit on the CPU, and gives you a PE file that can load dynamically or bundle into a hex file for MFDeploy. It is not a complete solution for compiling or deploying to Netduino on Mac and Linux, but is one of a few steps in that direction.
Install Wine
Configure wine by running winecfg at the command line.
Use winetricks to install the following libraries/packages: vcrun2010, vcrun2008, dotnet30
Copy the "le" versions of mscorlib.dll and Microsoft.SPOT.Native.dll into your working directory (where you plan to invoke MetaDataProcessor.exe from).
For your convenience, I have attached a zip file containing these DLLs (as well as some that are needed by the Mono compiler, including a couple of Netduino-specific DLLs) and MetaDataProcessor.exe from NETMF, which is an open source project distributed under the Apache 2.0 license.
Now you can run MetaDataProcessor.exe like this (all on one line):
If MetaDataProcessor.exe is somewhere else, change Tools/ to point to its location. Also, replace ASM.dll with the DLL you want to process and ASM.pe with the name of the desired PE output file.
Now that you've tracked down the WINE dependencies, we have a working post-processor and deployment tool working on Mac/Linux. Next step: getting the Mono C# compiler (dmcs.exe) to output DLLs using the .NET MF mscorlib.dll instead of the desktop's version.
BTW, I put the .pe file you sent me onto an SD card and loaded it onto my Netduino Plus using Fabien Royer's assembly loading sample code. The PE file from your Mac matches the PE file I made on Windows exactly, and the assembly loads without a hitch under .NET MF. Fantastic!
I installed winetricks via Macports ($ sudo port install winetricks), but that doesn't seem to be entirely up-to-date. There's an error when winetricks tries to install vcrun2010.
If you also have such an error, this is what I did:
change
w_download msxml3 http://download.micr...33dd/msxml3.msi d4c2178dfb807e1a0267fce0fd06b8d51106d913
to
w_download msxml3 ftp://ftp.uni-rostock.de/pub/tools/microsoft/XML/US/msxml3.msi
in the winetricks file (in the executable Unix file).
msxml3.msi doesn't seem to be available any more from that initial location.
I found this solution on http://www.zonalivre...ling-vcrun2010/
Possibly, you will have to delete or rename a file with the name "msxml3.msi" somewhere in a hidden folder (.cache) before you can retry to install vcrun2010.
[quote name='Brian Jepson' timestamp='1295221476' post='7782'] Here are some preliminary notes on running MetaDataProcessor.exe on WINE. This will let Linux and Mac users run the version of MetaDataProcessor.exe that comes with the .NET Micro Framework. Eventually we'll want to port MetaDataProcessor to portable C, but this will work in the meantime. .... like this (all on one line):
Hey Brian! I am coming in a little late (but better than never?) to the party, but I had a quick Q regarding this. Since I first did a full Win7+VS2010 VM install to do Netduino dev, and now I want to try Mono, I can use the MDP in Windows instead of (having to do the WINE thing,.. further, the mscorlib here should be from Mono or does it matter? (Haven't checked yet)
Hey Brian! I am coming in a little late (but better than never?) to the party, but I had a quick Q regarding this. Since I first did a full Win7+VS2010 VM install to do Netduino dev, and now I want to try Mono, I can use the MDP in Windows instead of (having to do the WINE thing,.. further, the mscorlib here should be from Mono or does it matter? (Haven't checked yet)
DrDz,
I'm not sure if that command-line would work to run MetaDataProcessor.exe on Windows. I haven't played around with running MetaDataProcessor.exe from the command line on Windows (I just let VS2010 deal with it).
replace ASM.dll with the DLL you want to process and ASM.pe with the name of the desired PE output file.
Sorry, I still do not understand what to do with the dll, or the "asm.dll". Is it optional, to include the dll-file, or for what do I need the file?
Can you, or somebody give me an detailed explanation, to solve my problem, please?
Sorry, I still do not understand what to do with the dll, or the "asm.dll". Is it optional, to include the dll-file, or for what do I need the file?
Can you, or somebody give me an detailed explanation, to solve my problem, please?
The first of those posts will tell you how to compile your code to an assembly on Linux, the second will tell you how to do it on Mac OS X.
When you have compiled your C# code to an assembly, you'll have a .dll file.
Specify that filename instead of asm.dll when you run MetaDataProcessor.
- Brian
Thanks for the quick and detailed reply. Now I got you. I thought: I have to compile the assembly file first, that I'm able to compile my code. Now everything is clear.
Hi Mike, you can find documentation on winetricks here: http://wiki.winehq.org/winetricks
But you would type winetricks vcrun2010 to run vcrun2010, for example.
Hello!
Sorry Brian Jepson, not quite correct. Running the script on my Slackware 13.37 with an earlier release of WIne installed allowed me to install the runtime directly. It was quite a kick watching the whole business work itself out on my Linux box, via VNC and on this laptop who's running Windows Seven. It worked well enough on a VM containing Slackware 14.0 caused it to run as expected. I'm presently (trying to) build a newer release of Wine on the 13.37 one to see if the problems surfaced trying to building things on 1.5.2 go away.
Remember: Linux is Linux. The big differences are only the distributions and the hardware. Some of us are Slackware users, and a lot of people are using what you are....... Then there are Fedora users.
Chris what is needed is a FAQ outlining what to do for Mono on Linux in general.
Group, I examined the entry in the script which doesto a location the one shown isn't the one indicated above. In fact our friend found a completely new location for the installer file. It, ah, isn't the one shown above, it is not even one shown in the linked blog.