.NET micro framework ... end of embedded world???

NOT true. Look at the thread. You added the line "That appears to be..."

Reply to
larwe
Loading thread data ...

One thing I have not seen discussed yet: What are the realtime capabilities of C# ?

Can you do hard realtime (as opposed to soft realtime) ?

Can you guarantee that a section of code will complete execution within X clock cycles ?

How do you estimate the number of clock cycles a section of C# code will take to execute ?

What kind of latency is there before an interrupt handler written in C# starts executing ? (IE: does the interrupt have to pass through the runtime first ?)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980's technology to a 21st century world
Reply to
Simon Clubley

Perhaps someone who is familiar with using C# with low-level embedded systems can answer (if such a person exists). My guessed answers to all your questions would be "no" or "you can't".

Reply to
David Brown

The question might be more precisely phrased as,

"What is the uncertainty of the execution duration (or start of execution relative to an external or internal event) for a given code fragment considered 'important' to an application?"

What makes my day is being able to _know_, a priori, that some code will execute over some finite, predictable duration and/or that some code will begin execution relative to some event with some predictable delay. Preferably where execution times are predictably within a required window and delays consistently within the range where I need them. (On some processors, like the ADSP-21xx, a timer interrupt event will reach the first instruction of the interrupt vector with zero cycles of uncertainty -- it is _always_ exactly the same delay each and every time relative to the cycle where the timer overflows. Now that is beauty to me.)

I suspect c# has it's meat-and-potatoes applications where .NET has features important to the application. What makes c# _not_ so good, to me, is the garbage collection -- I gather this is mark and sweep and, if I remember correctly, this method effectively suspends the application during collection. Pretty much killing the idea of predictability, to my way of thinking, and thus it's suitability for real-time use.

For folks with a .NET application that can tolerate mark and sweep GC, I say have at it.

Jon

Reply to
Jon Kirwan

Ummm---- you just used the word "microcontroller" for two different systems. I think the second usage should have been "microprocessor". And you wonder why other people are confused!!!! ;-)

Mark Borgerson

Reply to
Mark Borgerson

Here we go again. Define "realtime"... ;) Can we use C# , for example, for a GPS mapping application? (such as Think Garmin,TomTom, etc. car nav toys.) Sure. Can we use C# , for example, for an aircraft autopilot? I wouldn't. (ignoring for the moment the issue of the underlying operating system)

See "Performance Implications of Crossing the P/Invoke Boundary" for some of the pitfalls of using C# in an industrial control application. (

formatting link
)

For those unfamiliar with C#, "P/Invoke" (Platform Invoke) means calling a regular library or OS function ("not-managed") from C# code ("managed")

In addition to the performance and timing issues discussed in the paper, P/Invoking also suffers from incomplete coverage (not all language data types are marshaled correctly), loosing any "object- orientation" across the call, (only plain old function style is supported) and don't even get started with issues such as memory buffers being relocated while transferring data to/from them. (Unless special precautions are taken)

Of course, real or perceived C# limitations will not stop Microsoft from convincing managers that it is the way of the future, and those managers telling developers that C# is official language from now on.

Roberto Waltman

Reply to
rwaltman

To be fair, there are valid reasons why PC software development works the way it does. Mostly complexity: if typical user applications were developed using rigorous engineering, they would cost more than anyone was willing to pay and be obsolete long before they were released.

How would you feel about paying $1000 per copy for a web browser which never crashed but only handled HTML 1.0 and HTTP 1.0 and only ran on OS/2?

Being limited to 2K of flash and 192 bytes of RAM does wonders for keeping complexity under control.

Reply to
Nobody

OOps, yes - however did that happen ? :o

-jg

Reply to
-jg

There are various kinds of realtime, but I define them as falling into one of two categories: "soft realtime", when it's ok to miss a goal sometimes, and "hard realtime", when Bad Things Happen :-) when you miss a goal.

The OP stated that C# was on it's way to making traditional environments obsolete. In order to be able to accurately make such a statement, one of the things he needs to be able to show is how his environment will handle the issues associated with current environments.

So far, I've seen little evidence for the suitability of C# for hard realtime type applications.

Although I'm a professional programmer, I'm a hobbyist when it comes to electronics, and even as a hobbyist I have zero interest in using it as it doesn't meet many of my requirements.

At the low end, I am doing hard realtime on AVRs and going up the scale I'm currently using Ada and C under RTEMS on ARM boards. (There's also the fact that I use Linux as my development environment.)

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980's technology to a 21st century world
Reply to
Simon Clubley

Althought I don't do much assembly programming anymore, aside from the occasional asm("nop"); or something like that, intimate knowledge of assembly language is and will always be essential for debugging an embedded system, at least for me, for the foreseeable future.

.NET ? I can't see using that in any embedded system that I would design.

boB

Reply to
boB

:

at

es

Here's a resource from 2007 that may answer some of your questions. It's a 23-page white paper in .DOC format that introduces the .NET Micro Framework and describes its structure and components:

formatting link

80gLKP
Reply to
Wayne Farmer

formatting link

Thank you for the link. I've added it to my list of things to read.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980's technology to a 21st century world
Reply to
Simon Clubley

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.