C#

Hello
Wich will be the best compiler for C# using the beaglebone ?
I tried mono with some bad experiences in other platforms.

Thanks

Hi,

I don’t know if any Beaglebone developers are using C# – Mono is just too slow for the Beaglebone. You’d be better off porting your code to GCC C++, but even that will prove frustrating if your C# code uses .Net libraries.

Dan.

Thanks, unfortunatly yes; I use serial comms http server and xml reads; I did in VS for windows and now I would like to implement this in the BB, but some incompatibility is arrived …
Thanks anyway

It’s simple. C# was designed for fancy Windows stuff. The correct way to implement your project on the BeagleBone is to use something else.

–Bence

2013/1/4 JCtuga <jcosta.carlos@gmail.com>

I’m a .Net developer myself, and a big fan of the C# language, and I wish it was supported on embedded Linux. But C# is too dependent on the .Net CLR, and the .Net CLR will likely never work well on embedded Linux platforms.

Although the syntax is completely different, I’d suggest you take a look at rewriting your code in Python. It has many of the same advantages features as .Net, like garbage collection, Windows compatibility (i.e. you can debug most of your code on a Windows PC), Visual Studio support (http://pytools.codeplex.com/) and a vast collection of libraries. Things like HTTP and XML are Python’s strengths, and serial COM I/O works well on the Beaglebone and Beagleboard. Speed and memory usage aren’t as good as GNU C, but it’s probably a lot better than Mono.

Dan.

I haven’t tried it, but there is a Windows Embedded Compact 7 image available for the Beaglebone. With that you could use the .NET Compact framework.

We are using C#/mono in all our products that are OMAP3 and OMAP4 based. The performance is very good. In fact the same application running on the OMAP4 hardware uses 25% less CPU time than on duel core Atom hardware.

All our code is compiled using VS on windows and works fine. There is a mono remote debugger you can get if you need to debug directly on the target hardware.

If I were you I’d install the mono runtime and give it a go.

If you have performance issues then you can use the mono AOT compiler that will grind everything down (including the .Net libs) to a single native executable thus avoiding any JIT overhead. This should be as good as GCC C/C++ if you still have performance problems I doubt that recoding in C/C++ will get you anywhere.

We are using C#/mono in all our products that are OMAP3 and OMAP4 based. The performance is very good. In fact the same application running on the OMAP4 hardware uses 25% less CPU time than on duel core Atom hardware.

All our code is compiled using VS on windows and works fine. There is a mono remote debugger you can get if you need to debug directly on the target hardware.

If I were you I’d install the mono runtime and give it a go.

If you have performance issues then you can use the mono AOT compiler that will grind everything down (including the .Net libs) to a single native executable thus avoiding any JIT overhead. This should be as good as GCC C/C++ if you still have performance problems I doubt that recoding in C/C++ will get you anywhere.

We are also using mono, on RCN’s Ubuntu build for Beagle Bone. This was specifically because we had .NET windows applications that we really did not want to totally rewrite from scratch. So far, no big problems. A bit of platform specific adaptations and replacing of low level drivers for CAN bus and Serial communication, which was to be expected. In some cases third party windows DLLs are being (or have been) replaced with our own code. Testing up to this point shows no performance concerns, using only the run time. I have no experience with the AOT compiler.

Every case is different, but my feeling is that the productivity advantages using of a high level language like c# in a comprehensive framework like mono go a long way to countering any potential disadvantages such as increased overhead. This is even more likely to be true if you have a large body of existing code you want to reuse.

Mickey

Yes, Angstrom built with Openembedded.

Well crap. I’ve been programming in Java for nothing I guess… :wink: I wish I would have known this 6 months ago. I hadn’t heard of any success with Mono so I didn’t bother looking into it. Are you able to consume WCF services?

Dear Brent,

Yes, WCF is fully implemented.

The latest version of mono is .Net 4.5 the only thing I’m aware of that isn’t supported is WPF.

Cheers Mike.

Dear Brent,

Yes, WCF is fully implemented.

The latest version of mono is .Net 4.5 the only thing I’m aware of that isn’t supported is WPF.

Cheers Mike.

At first I thought you were kidding, but there actually is a D language!

Hello Mickey,

I have being trying to run a simple Windows.Forms application using mono on Beaglebone. I was able to complie and run Windows.Forms application on Ubuntu running on PC, was able to compile a simple application on Beaglebone but runtime gives Errors.

System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in :0

[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentException: A null reference or invalid value was found [GDI+ status: InvalidParameter]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000] in :0

I have GDIPlus installed.
Are there any extra Installation/configuration changers that need to be done.
I am using mono 3.2.8 hard float.

Highly appreciated if you can provide any support.
thank you.

Mono on BB has been working fine for us for a couple of years now, but our app does not have a user interface on the Beagle. It talks to a web server and has a local display on HDMI. I have not even tried to use WindowsForms on Linux. You might also try the Mono forum. Perhaps someone there has some insights.

http://www.go-mono.com/forums/