Search code examples
.netmonoembedded-linuxuclinux

Using mono in embedded linux for hardware


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


Solution

  • 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.