c# (mono, dotgnu) for arm embedded questions - c#

Has anyone experience with c# or .net based languages for arm based boards?
Are there compilers that make my code ready for the arm board?
Is it recommed to develop with linux or windows?
Are there advantages having a Linux, or Windows OS on the target board?
any help appreciated.
Thx

You can download Mono and compile it for ARM. The managed code (C#, etc) does not have to be recompiled for ARM, so you can develop it however you want, only the runtime needs to be ARM specific.
Mono (Novell) has commercial products for writing .Net apps for the iPhone/iPod/iPad (MonoTouch), and soon Android (MonoDroid), so ARM is a very well tested platform.

Take a look at my answer here:
Using mono in embedded linux for hardware

Related

should i use mono to develop linux app

I have years of experience developing on microsoft development stack primarily visual studio 2012/c#. But right now, im required to develop app on linux. While i know c++, its been years since i really touch that. I have few questions.
Can i develop using mono and compile binary for linux and windows with no code(or minimal) code changes?
Can i develop on windows platform using visual studio 2012, compile for linux on window platform? do i need to use virtual machine for compiling for linux in windows platform?
How do you setup your development environment if you want to develop linux app on windows platform(develop on windows, compile for linux and windows. my linux box use for testing is a separate machine.)
Some info on what im working on.
My project is about network channel analysis. The client is cheap industrial linux box most probably with no ui. Im using mono/c# to develop the client. The server would be windows develop using vs2012 c#. Most probably using wpf as ui. Im planning to share network/communication library between linux(client) and windows(server). My primary concern for using linux is for cost saving since the client is almost thousand units.
thank you.
Mono runs executables in PE (Portable Executable) format, the native file format of Windows. There's no need to "compile for Linux", as long as your app is pure MSIL. And even if you use native DLLs through p/invoke, Mono and Wine work together to run the Windows files on Linux.
(The a.out and ELF executable formats used by native Linux applications don't have mechanisms for storing .NET metadata, the PE format was modified to support .NET, so that's what .NET Framework (not Micro Framework) implementations use regardless of platform)
The most important things to consider at the beginning are,
WinForms of Mono is problematic. Not only most third party controls won't work properly, but also libgdiplus itself is not 100% compatible with Microsoft's GDI+. It might appear to be a sweet option, but later you might still need to fight hard against the incompatibilities.
WPF is not an option as Mono does not support it yet.
GTK# is your best choice for UI, which blends naturally with Linux distros. If you refactor your Windows project properly, you should be able to share the non-UI code between your Windows and Linux solutions. This is what Mono guys recommend (not only use native UI frameworks for Windows, Linux, but also for Mac/MonoMac, iOS/Xamarin.iOS, and Android/Xamarin.Android).
So go back to your questions,
You should never wish for no code change for a real world project. No, that's impossible. As I said earlier, you have a chance to share most non-UI portion.
You can develop the non-UI portion and the Windows only portion using VS2012 and test them out on Windows. If you plan to use Mono's WinForms or GTK#, you must develop and debug on Linux using MonoDevelop. Thus, you need either a virtual machine or physical machine of Linux.
For me, I frequently switch between Linux/MonoDevelop and Windows/VS.
As Mono + C# is much more productive than using C/C++, many successful Linux apps are developed on Mono, such as Banshee and Tomboy.
You can use Visual Studio without problems but for example you cannot use WPF, while Windows Forms are ok. For more information what you can use visit: http://www.mono-project.com/Compatibility
Moreover there exists Mono tools which integrates with VS: http://www.mono-project.com/GettingStartedWithMonoTools

Is it possible to install mono or similar (C# compiler like AIDE) on android machine?

I was searching for a while, but didn't get the solution.
If you want to write mobile applications with c#, you can install mono as I understand.
It can be found on the following site http://xamarin.com/monoforandroid
.
So they support both Windows and IOS.
But I think they don't support to run their software on android
My question is:
Is there any tool to write code with c# on an android device?
I mean I want to write C# code and compile directly on my android device.
I know AIDE for java, but it seems there isn't exist any tool like AIDE for C#
Thank you..
The Mono for Android project allows you to write code in C# and run it on the Android platform. It will install a Mono runtime along with your app.
The Mono runtime run along side the Dalvik virtual machine, so performance is comparable to writing your app in Java and running it inside of Dalvik.
Take a look at C# To Go, a simple C# compiler that runs on Android. The Mono C# compiler has been ported to Mono for Android for it, and that port is also available for you to use.
Note that the compiler is not perfect. Introducing C# To Go details some of the problems you may face. Nevertheless, it may be sufficient for your needs.
I am not aware of a tool like AIDE where you can write code in C# on Android, compile on Android, and deploy to the same device. Such a tool would have to come from Xamarin as they hold the IP and sell licenses for MonoDroid.

Compile C# on a (not for) Windows 8 ARM Tablet

Would it be possible to code and compile C#, on a Windows 8 Tablet (WinRT) (the ARM processor edition)?
Basically it comes down to this:
Is there a C# compiler that runs on ARM?
Is there and IDE that can run in WinRT?
If the above is true, I don't see any issue, but I currently can't find if the C# compiler runs on ARM (only a lot of posts about compiling for ARM). I've also looked at SharpDevelop, and found that their source code compiles for "Any CPU", which according to this post: Windows RT and c#, means that it'll run on ARM.
Sharpdevelop however requires .NET 4.0 "Full" runtime, which I couldn't find if WinRT has or not. I'm betting it doesn't, as WinRT is supposed to be a really lightweight edition of Windows.
As a sidenote, I know that Windows tablets will come in two editions, one for ARM and one for classic processors. The classic processors will run a normal Windows 8 edition, which means it can run all the native applications. Compiling C# wouldn't be an issue here - so the question is rather, can I do the same on ARM?
This would be awesome for travelling and trying out new ideas quickly.
Currently: no, and no.
It would certainly be possible to build a Windows Store app that contains an IDE and a C# compiler. However, you would not be able to run any programs built using such an app. Windows Store apps run with reduced privileges in a sandbox. In this sandbox, the CLR will only load system assemblies and assemblies contained in the app package. The app package is immutable and cannot be modified at runtime.
Actually, the .Net framework on the surface includes csc.exe, the Csharp compiler.
I've gotten code to compile, but WinRt doesn't seem to like it being run without proper signing.
The IDE won't happen for a while, not yet at least. I'm sure that with proper signing, it is possible to run a compiled executable.
Or the other guy might be right and it isn't just an issue of signing.
I've ported SharpDevelop to run on unlocked Windows RT devices, it works at least for C# Windows Forms apps. http://chentiangemalc.wordpress.com/2013/03/18/sharpdevelop-rt-edition-beta-code-windows-forms-directly-on-windows-rt/

Is there any way to develop Silverlight applications on OS X?

While all of my machines are Macs, I actually really enjoy working in .NET. I thought it would be fun to try my hand at writing a Silverlight application. Unfortunately, as near as I can tell, Silverlight is not a part of Mono that actually works on OS X.
Is it possible to develop Silverlight on OS X, or will I need to use a VM? If it's possible, is Mono the only option, or is there some other way?
Have you heard of Moonlight?
Taken from the project page:
Moonlight is an open source
implementation of Silverlight
(http://silverlight.net), primarily
for Linux and other Unix/X11 based
operating systems. In September of
2007, Microsoft and Novell announced a
technical collaboration that includes
access to Microsoft's test suites for
Silverlight and the distribution of a
Media Pack for Linux users that will
contain licensed media codecs for
video and audio.
According to go-mono.com, you can use MonoDevelop to develop for Silverlight/Moonlight on Mac OS X.
I'd probably stick with a VM - I use VM's on my mac all the time, and Visual Studio is perfectly usable (obviously that does depend on your mac's spec)...
If you want it all for free, you can use VirtualBox, install windows on there (you can always use an evaluation if you don't own it), and then use Visual Studio Express - this SO question tells you how to set Visual Studio Express up for SL dev... Developing Silverlight in Visual Studio Express?
There was a Silverlight development tool that ran in Eclipse called Eclipse tools for Silverlight. It has a Mac version. It looks a bit stagnant though, so I don't know it's current status.
http://www.eclipse4sl.org/
MonoDevelop does have moonlight projects built-in, so there shouldn't be any issue.
Also- while this prob doesn't fit your case, I bootcamped my MBP and while it's freaky running Win7 + vStudio on mac hardware, it works quite well.
Silverlight is comptatible for MAC OSX via a separate project, whose name I forget. Microsoft release the source code for silverlight to some people that are working on implementing on other platforms, including MAC
However, this means that it's always at least one version late, so MAC users can have access to silverlight 3, but not 4.
Old Mac that are not intel processors, only have access to silverlight 1.
Look at this page for a compatiblity list.
http://en.wikipedia.org/wiki/Silverlight#Silverlight_4

Iphone C# development

I wanted to use monotouch, but unfortunately I don't have $400 to spend.
So I found xmlvm http://www.xmlvm.org/ and I it seems It can crosscompile .net bytecode to objective c.
But, I'm not sure, are there any wrappers? What else would I need to start developing for the iphone using xmlvm??
For the record: note that with the recent release of the iPhone OS version 4.0 SDK, Apple have outlawed using all forms of using cross-compiled languages on the iPhone OS family of devices.
You could use Unity 3D, with C# Scripts.

Categories