Microsoft is attempting to bring the benefits of its .Net framework to embedded device developers, but with it come a new methodology and object-oriented programming language. Is there a place for the C# language in the embedded world?
Microsoft recently rolled out a free software development kit (SDK) for the .Net Micro Framework, aimed at resource-constrained embedded devices. While not a true real-time operating system (RTOS), the .Net Micro Framework includes an execution engine and threading. It promises such advantages as garbage collection, code protection, memory management and easier, robust application development.
The SDK lets users develop embedded applications in C# by using a subset of the .Net libraries that are available for the desktop. The C# language--developed by Microsoft as part of the .Net initiative and later approved as an ISO standard--is claimed to have fewer symbolic requirements than C++ and fewer declarative requirements than Java. Thus far, however, its use has been limited to the desktop.
I asked Colin Miller, Microsoft director of the .Net Micro Framework, how many embedded designers are using C# today. "None, and that's the point. We're trying to bring that sort of capability into a new environment," he said.
Compared with C/C++, Miller said, C# runs inside a managed environment and is "much more foolproof." It also simplifies debugging. The bottom line, he said, is that it will enable desktop developers to move to deeply embedded applications.
It's not the first time that C# has been proposed for system design. Several years ago, researchers at the University of Montreal proposed a system-level design approach using .Net and C#. They created a prototype system used in the laboratory for simulation and hardware/software partitioning.
El Mostapha Aboulhamid, a professor at the University of Montreal, said at the time that C# combines "what is nice in Java and what is nice in C++." One feature is the programmer's ability to use "attributes" to describe processes, parallelism, modules and signals.
Whether for hardware design, software design or both, new languages are always a hard sell. But the shortcomings of ANSI C are apparent to anyone who tries to make it run on embedded hardware. And embedded developers have not yet warmed to SystemC.
Could C# someday sound a pleasant note for embedded applications?
Richard Goering is software (EDA and embedded tools) editor for
EE Times. Contact him at (firstname.lastname@example.org).