Skip to content
This repository was archived by the owner on Jun 5, 2019. It is now read-only.

Architecture

Steve Maillet edited this page Mar 25, 2015 · 15 revisions

Architecture of the .NET Micro Framework

The .NET Micro Framework consist of several loosely coupled layers that leverage and build upon one another to form the complete framework. The following layer diagram illustrates the basic layers and their relationships to one another:

.NET Micro Framework Layers

Layers

  • [Physical hardware](Hardware Layer) (not shown in diagram)
  • CPU Support layer (CPU)
  • Hardware Abstraction Layer (HAL)
  • Operating System (OS)
  • Platform Abstraction Layer (PAL)
  • Common Language Runtime (CLR)
  • Interop
  • Base Class Libraries
CPU Support

The CPU support layer provides a thin abstraction over base functionality for a CPU/SoC. Especially timers, watchdogs, GPIOs and the interrupt controller, all of which are tightly dependent on the particular CPU core and SoC used.

Hardware Abstraction Layer

This layer, as the name implies is responsible for abstracting out the hardware from the rest of the system. In effect it serves the role of an OS in providing Device Drivers for the rest of the system. If you have a full OS with its own driver model then a FULL HAL is usually not necessary. (The Windows port for the emulator uses a minimal HAL with most of the abstraction coming from the underlying OS)

Operating System

Generally speaking the .NET Micro Framework does not require an OS. However, as of v4.4 the updated port of the lwIP network stack requires a minimal pre-emptive thread scheduler and basic synchronization primitives. While the support is portable to just about any micro controller scale threading kernel the currently tested implementation is the CMSIS-RTX implementation from ARM.

Platform Abstraction Layer (PAL)

The PAL is responsible for abstracting the differences between using a full OS or a FULL HAL or various combinations of the options for abstracting the hardware. It provides a consistent lower level API surface for the rest of the runtime to work on.

The Common Language Runtime (CLR)

The CLR contains the core of the run-time including the interpreter engine, the overall type system support as well as the garbage collector and managed heap.

Interop

The interop layer is an extensible set of native code libraries that enable managed code libraries to expose functionality that is ultimately implemented in the native code of the system (much like P/Invoke does on the Mobile and desktop variants of the .NET Runtime).

Base Class Libraries (BCL)

These are the standard .NET Assemblies that are part of the framework. These provide the base types like strings and collections along with more advanced support such as networking etc...

Clone this wiki locally