views:

153

answers:

5

Hi, 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 low. My company where I am doing my internship is really .NET minded. But the new developments of mono, they asking themself if they can target linux for smaller projects, too avoid the high licensing cost for people they design the softwaren and hardware for.

I already looked in what mono can do (and not yet can do). Now I reached the embedded question. I am kinda lost in the story in how an embedded linux is build.

I saw some stories where they just took some standard linux libraries to make the emmbedded linux on the hardware. I saw too their exist special linux distributions like uClinux (aka µClinux). So whats the diffrence, or is it just the same. How does the process looks like typically when I want to use embedded linux on a target deivce?

ok, than the mono part, so bassically I want to be able to run c# in embedded linux. Here mostly they use uclinux, I am able to use mono for this? SInce I looked on some specifications, and they got no Memory Management Unit (MMU).

SO basically I am worrying on that no MMU. Since how will the garbage coller react?

I hope i didnt give an overload of questions,

Regards, and I thank you already for reading it,

Benjamin

A: 

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.

mhutch
It would be a solution, but its not a solution for my question since they want it on linux
Benjamin
+1  A: 

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.

supercheetah
Neither of these will work if Mono doesn't run normally. All AOT removes is the need to JIT - you still need the Mono runtime for GC, IO, metadata, etc. And all mkbundle does is to embed Mono and your app into a single executable.
mhutch
+3  A: 

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

lupus
<Other people reported using mono on uclinux>
Benjamin
This is the actual problem I had, I didnt found any people who actually tried it, I tried to search here, but I didnt found nobody, any idea were you saw that reports?
Benjamin
It was on IRC, IIRC.
lupus
+1  A: 

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.

avra
A: 

I would suggest looking at http://monotouch.net/

Amigable Clark Kant