I am doing research for a company as an internship. I had some question in using Mono, the cross platform implementation of .Net platform. My company designs hardware and sotware.
My knowledge of using embedded linux is very limited. My company where I am doing my internship is really .NET minded. But the new developments of mono, they asking themselves if they can target linux for smaller projects, too avoid the high licensing cost for the people for which they design the software and hardware.
I already looked in to what mono can do (and can't yet do). Now I reach the embedded question. I am kinda lost in the story in how an embedded linux is built.
I saw some stories where they just took some standard linux libraries to make the embedded linux on the hardware. I also saw that there exists special linux distributions like uClinux (aka µClinux). So what's the difference, or is it just the same. What does the process look like typically when I want to use embedded linux on a target deivce?
OK, than the mono part, so basically I want to be able to run C# in embedded linux. Here mostly they use uclinux, am I able to use mono for this? I looked at some specifications, and they don't have Memory Management Unit (MMU).
SO basically I worry about that no MMU. Since how will the garbage collector react?
I hope i didn't give an overload of questions,
Regards, and I thank you already for reading it,
Benjamin
The garbage collector doesn't depend on a MMU, though it can be more efficient if there is one.
We currently take advantage of it to generate null reference exceptions without checks: on uclinux you will need to enable the explicit checks (the code is already there, it just needs to be enabled).
Other people reported using mono on uclinux, though there are likely some tweaks required to the sources here and there since we never test it on that platform (of course I'm talking about uclinux on a cpu architecture we already support, like ARM, you didn't specify).
As for other comments, AOT and mkbundle are largely irrelevant for what you need. What you really want is to reduce the mono footprint to fit into what your device allows, see http://www.mono-project.com/Small_footprint for more info.
If it was me making the decision, I'd always choose a regular ARM linux over uclinux for running complex software like mono or whatever program you need to run on mono.
If your devices don't have a MMU, perhaps you might want to use Microsoft's open-source .NET Micro Framework. It's much more limited than .NET/Mono, and it's an interpreter, not a JIT, but it can run on much more limited hardware.
Mono can be as limited as you want it to be. If you're using a device that has no MMU, I'd look into Ahead of Time compilation.
mkbundle may also work as well, but I'm not sure that it can do without an MMU. That said, if you're using AOT, you're going to be using mkbundle first to pull in all the dependencies.
If your company wants to target embedded Linux boards via MONO, and all that is needed is to transfer some application that already runs on desktop windows computer, then you will probably have very little problems. But if you want to talk to some IO, I2C, SPI, 1-Wire and other peripherals, you will have a problem to access them via MONO and you will probably have to make some translator (probably written in GCC) that will be a gateway between real hardware and your MONO application.