InfoQ

News

Return to the Days Of 640K With The .NET Micro Framework

Posted by Jonathan Allen on Feb 12, 2007 09:39 AM

Community
.NET
Topics
Tags
.NET Micro Framework

The .NET Micro Framework is being positioned by Microsoft for very small devices such as sensors, actuators, and wearable electronics.

Running on as little as 256K RAM and 512K of flash memory, the .NET Micro Framework represents the smallest OS released by Microsoft in over a decade. The beta currently a number of ARM7 and ARM9 processors, even ones without a Memory Management Unit (MMU).

Unlike previous versions of the .NET framework, the Micro Framework is bootable. Or in other words, the runtime can effectively be its own operating system complete with interrupt handling, threading, process management, and heap management. The .NET Micro Framework Hardware Abstraction Layer (HAL) weighs in at a tiny 20 to 30K.

If you run the Micro Framework CLR on the Micro Framework HAL instead of another operating system, there are some limitations. For example, only cooperative multitasking is supported so kernel threads will have to explicitly call yield on a regular basis. The CLR's execution will simulate threading by "offering time-sliced context switching using 20ms quantum".

An extension to Visual Studio will include emulators for a wide variety of platforms and will allow developers to alter features such as available memory and clock speeds.

The assemblies produced by the compiler are not directly usable. Rather than using IL directly, a post-processor converts the binaries into a special format needed by the Micro Framework CLR. This isn't a form of hardware specific machine code, as the CLR interprets it. Unlike other .NET frameworks, just-in-time compilation will not be available.

Reflection will be supported, as will multiple AppDomains. Only single dimension arrays will be supported and the garbage collector is non-generational. Object meta-data is stored on the heap with the object itself so that garbage collection will be faster.

One interesting note is that under omitted features is states, "No virtual tables for method resolution saves RAM". What this means for inheritance isn't spelled out.

Serialization has been reworked to provide very compact representations.

Extended weak references allow objects to pushed to and retrieved from persistent storage depending on memory demands. Objects used this way even survive reboots.

Globalization is supported via resource files. Unlike other .NET frameworks that use strings, this one uses Int16 keys to reduce space. Visual Studio generates type safe code for accessing resources to reduce the change of error.

If performance becomes an issue, individual methods may be written in native code.

A beta program is currently available.

3 comments

Reply

Very cool by Dan Diephouse Posted Feb 12, 2007 11:00 AM
Re: Very cool by R M Posted Feb 12, 2007 1:51 PM
Re: Very cool by Jonathan Allen Posted Feb 12, 2007 10:34 PM
  1. Back to top

    Very cool

    Feb 12, 2007 11:00 AM by Dan Diephouse

    This is actually pretty cool. Embedded devices are such a pain and I could see this making development a lot easier. I used the .NET CF for a while with PocketPC/SmartPhone devices. It was a good experience. It beats the heck out J2ME development. Especially if you're dealing with phones as you don't have to get your app signed by your phone provider - which is one of the most inane things ever IMO.

  2. Back to top

    Re: Very cool

    Feb 12, 2007 1:51 PM by R M

    Your website tagline is "Tracking chnages..." and you are just reporting this? Have you ever heard of SPOT? Do you know that the beta program on the .NET MicroFramewortk is just about "over"? Does your editor know how behind the times you are? Here's a fact for you: This is my 1st time and last time at your website.

  3. Back to top

    Re: Very cool

    Feb 12, 2007 10:34 PM by Jonathan Allen

    SPOT, and the related service MSN Direct, seems to be rather limited and targeted at makers of watches and coffee makers. As that is not really InfoQ's target audience, I don't think you can expect much coverage from us. As for .NET Micro, I have to admit that I only heard about it a couple of days before I published the article. Now that we know it exists, we will be sure to watch it closer for new developments. If in the future you think that we are missing something interesting or we are not going into enough depth on a topic, feel free to send us a note at news@infoq.com.

Exclusive Content

Typemock: Past, Present and Future

Eli Lopian of Typemock answers a few questions on Typemock origins and where Typemock is headed.

Agile in Practice: What Is Actually Going On Out There?

Scott Ambler talks about actual data resulting from surveys made during 2006-2008, showing how Agile is perceived and implemented within organizations.

Building Smart Windows Applications

From QCon 2008, Daniel Moth presents on using Visual Studio 2008 and .NET 3.5 to create compelling rich Windows applications.

Joshua Kerievsky about Industrial XP

Joshua Kerievsky, founder of Industrial Logic, talks about Industrial Extreme Programming which extends XP by including practices dealing with management, customers and developers.

Jeff Barr Discusses Amazon Web Services

Amazon Web Services (AWS) Evangelist Jeff Barr discusses SimpleDB, S3, EC2, SQS, cloud computing, how different Amazon services interact, origins of AWS, AWS globalization and the March AWS outage.

More Than Just Spin (Up) : Virtualization for the Enterprise and SaaS

Cloud services have helped bring virtualization to the forefront. Its full power however, also includes other benefits such as high availability, disaster recovery, and rapid provisioning.

Ruby Beyond Rails

John Lam talks about his path to dynamic languages, some of the problems of making IronRuby run fast, and how the DLR helps with implementing languages.

VMware Infrastructure 3 Book Excerpt and Author Interview

VMware Infrastructure 3: Advanced Technical Design Guide and Advanced Operations Guide provides a wealth of practical insights into setting up virtualization in todays corporate environments.