.NET Micro Framework

Porting Kit Version 4.1

Technical Data Sheet

September 3rd, 2009

 

 

Purposes of the Porting Kit

Porting To a New Hardware Platform

You can port the .NET Micro Framework to hardware based on any supported processor. A full port to new hardware involves writing the device drivers largely from scratch.[1]

Adding Peripherals to Existing Hardware

The porting kit enables you to add peripherals to an existing port of the .NET Micro Framework. You do this by adding a device driver for the peripheral and compiling it into the existing firmware.

Extending the Framework with Native Code

Through interoperation between application-level C# libraries and native-level C++ drivers, you can extend the framework in many ways. These include:

·          Adding hardware functionality that the .NET Micro Framework does not support.

·          Providing access to memory-mapped and i/o-mapped devices.

·          Enabling streaming I/O.

·          Connecting the .NET Micro Framework to existing software stacks.

·          Providing faster, more direct hardware access.

Porting to an Operating System

You can port the .NET Micro Framework so that it runs on an existing operating system instead of running directly on a hardware device.

 

 

Hardware and Firmware

Supported Processors

Currently the framework runs on these 32-bit processor cores.

·          ARM v4,

·          ARM Thumb

·          Thumb-2

·          Blackfin

·          SH2/2A

The framework supports both little-endian and big-endian byte order.

Development Boards

The porting kit provides sample ports available for the development boards listed below. These sample ports include the source code.

·          Atmel SAM9261-EK development board (ARM core AT91SAM9261)

·          Atmel SAM9RL64-EK development board (ARM core AT91SAM9RL64)

·          Atmel SAM7X-EK development board (ARM core AT91SAM7X512)

·          Phytec phyCORE-ARM7/LPC2294 (Rapid Development Kit PCM023, ARM core LPC2294 by NXP)

·          Embedded Artists EA-LPC2478 development board (ARM LPC2478 by NXP)

·          Crossbow MOTE2 platform from Crossbow (for Marvell PXA271 processor)

·          Freescale i.MXS development kit (Freescale MC9328MXS)board for i.MXS processor

·          Renesas SH7264 RSK development board (SH2A core)

·          Renesas SH7216 RSK development board (SH2A core)

·          Renesas SH7619 EVB development board (SH2 core)

Memory Requirements

The memory requirements for the .NET Micro Framework depend entirely on which features you use. In its smallest form, the framework requires 64 Kb of RAM and 256 Kb of flash memory.

Other Firmware

In addition, there are some pilot ports available. Pilot ports do not include the code for hardware drivers.

·          Generic Blackfin processor, both native and OS-based

·          Generic Cortex M3         

The porting kit provides executable images, complete with independent memory mapping, for:

·          A sample image to write validation tests or sample code.

·          A development-time simple boot image that works with our desktop side tools.

·          A production ready boot image that allow trusted code deployment.

·          A utility to erase flash memory.

·          The Micro Framework common language runtime (CLR).

Supported Toolsets

To port the framework to new hardware or to add new hardware to existing ports, you can use one of the following 3rd-party toolsets.

·          ARM RealView Development System versions 3.0, 3.1 and 4.0 for ARM

·          Keil MDK 3.1 and 4.0 for ARM

·          CodeSourcery GCC 4.2.1 for ARM

·          Analog Devices Visual DSP++ 5.0 for Blackfin

·          HEW 9.2 for Renesas SH2/2A

In addition, the porting kit provides you with these Windows-based development tools.

Porting Kit contents

The porting kit contains the following binaries, scripts, source code and information.

·          All code for the Runtime libraries, object model and device drivers.

·          Configuration scripts for all supported toolsets.

·          TCP/IP support code and stack pre-compiled libraries (not included in the Blackfin port, see below for further details).

·          Device driver source code (see Sample Drivers for more information).

·          Windows USB driver source code.

·          Managed code samples and validation tests.

·          Rigorously-tested sample ports for ARM processors. This includes:

o    Atmel SAM9261-EK development board

o    Atmel SAM9RL64-EK development board

o    Atmel SAM7X-EK development board with the latest 512KB flash processor part, currently sampling.

o    Phytec PCM023 for NXP LPC2294 processor

o    Embedded Artists EA-LPC2478 development board for NXP LPC2478 processor

o    MOTE2 platform from Crossbow for Marvell PXA271 processor

o    i.MX development kit board for i.MXS processor

o    Renesas SH7264 RSK development board (SH2A core)

o    Renesas SH7216 RSK development board (SH2A core)

o    Renesas SH7619 EVB development board (SH2 core)

·          Pilot ports (ports without driver source code) for

o    General Blackfin processor, both native and OS-based

o    General Cortex M3        

·          Executable images, complete with independent memory mapping, for the following:

o    A sample image to write validation tests or sample code

o    A development-time simple boot image that works with our desktop side tools

o    A production-ready boot image that allows trusted code deployment

o    A utility to erase flash memory

o    The Micro Framework runtime

·          A set of Windows based tools

o    A flashing and diagnostics tool that works against the development and production-time boot image and the runtime for image re-flashing, trusted code authoring, and device and runtime diagnostics.

o    Build processing tools

o    A wizard to create, edit, or clone a port

 

TCP/IP StackS Requirements and Features

The .NET MF porting kit supports two TCP/IP stacks. Both TCP/IP stacks expose a Barkeley style Socket API and can be fully substituted by any other commercial implementation.

 

RTIP

The RTIP stack from EBSnet Inc.  is provided as a pre-compiled set of libraries for ARM, Thumb, Thumb2 and SH2/2A instruction sets.  The RTIP TCP/IP stack requires at least 26 KB of runtime memory and a minimum of 72 KB of ROM memory to operate with TCP, UDP, DHCP and DNS.  Other protocols such as ICMP and IGMP are included as they are required for the TCP part of the stack.

DHCP can be optionally factored out of the stack for a 10% or less code size saving.  (all sizes are measured for ARM instruction set and RVDS 3.1 compiler and are subject to wide variations depending on the tool chain used, the instruction set and the usage of the stack).  The RTIP stack comes with SSL support as a set of add-on libraries on top of the TCP/IP stack.  The SSL support will require additional 64 KB of runtime memory and 256 KB ROM.

 

lwIP

The lwIP stack is an open source project whose details and implementation are freely available on the web.  It is provided in source code format and test for ARM, Thumb, Thumb2 and SH2/2A instruction sets, both in big endian and little endian mode.  The lwIP stack can be configured with any memory displacement and it  provides the following features: TCP, UDP, DHCP and DNS.  Other protocols such as ICMP and IGMP are included as they are required for the TCP part of the stack.

DHCP can be optionally factored out of the stack for a 10% or less code size saving.  (all sizes are measured for ARM instruction set and RVDS 3.1 compiler and are subject to wide variations depending on the tool chain used, the instruction set and the usage of the stack).  The lwIP stack comes with SSL support through OpenSSL.  OpenSSL has been tested on all instruction sets mentioned above.

 

Sample ports

The table below lists the details for the sample firmware configurations (“ports”) offered in the porting kit. 

Legend:

ü

The functionality is supported by the hardware and implemented in the framework.

û

The functionality is supported by the hardware but not implemented in the framework.

û

The hardware does not support this functionality.

 

ARM and Thumb processor

 

Item

\

Port

Atmel SAM9261-EK kit for Atmel AT91 SAM9261

and SAM9RL64-EK for  

SAM9RL64

Atmel SAM7X-EK kit for Atmel AT91 SAM7X512 and SAM7S256

Phytec PCM023 kit for NXP LPC2294

Embedded Artists EA-LPC2478 kit for

NXP LPC2478

Crossbow MOTE2 kit Marvell PXA271

Freescale i.MX kit for Freescale i.MXS/L

General Cortex M3

General Blackfin

Processor status

Available

Available

Available

Available

Available

Available

Available

Available

Development board status

Available

Available

Available

Available

Available

Ask manufacturer

Available

Available

 

 

 

 

 

 

 

 

 

CPU Frequency

198 Mhz

55 Mhz

60 Mhz

72 Mhz

208 Mhz

96 Mhz

n/a

n/a

Cache

16 kB data, 16 KB code

-

-

-

16 kB data, 16 KB code

16 kB data, 16 KB code

n/a

n/a

External bus support

Yes

No

Yes

Yes

Yes

Yes

n/a

n/a

On board RAM size and usage

160 kB, currently unused

128 kB for application and drivers, 64Kb for SAM7S256

16 kB, currently unused

96 KB, 64 KB for general purpose

-

-

n/a

n/a

On board FLASH size and usage

32 kB, currently unused

512 kB for all code, 256Kb for SAM7S256

256 kB, currently unused

512 KB for all code

-

-

n/a

n/a

Development board RAM size and usage

64MB

-

2MB

32 MB

64MB

32MB

n/a

n/a

Development board NOR FLASH size and usage

8MB

-

1MB

4 MB

32MB

8MB

n/a

n/a

Development board NAND FLASH size and usage

256MB

-

-

128 MB

-

-

n/a

n/a

 

 

 

 

 

 

 

 

 

Managed libraries support for hardware and I/O

Serial, USB, SPI, GP I/O, Timers, Graphics

Serial, USB, SPI, GP I/O, Timers.  Ethernet on SAM7X only

Serial, SPI, I2C, GP I/O, Timers

Serial, SPI, I2C, GP I/O, Timers, Graphics, Ethernet

Serial, USB, SPI, I2C, GP I/O, Timers

Serial, USB, SPI, I2C, GP I/O, Timers, Graphics, Ethernet

none

none

 

 

 

 

 

 

 

 

 

ARM instruction set

ü

ü

ü

ü

ü

ü

û

û

THUMB instruction set

ü

ü

ü

ü

û

ü

û

û

THUMB2instruction set

û

û

û

û

û

û

ü

û

BLACKFIN instruction set

û

û

û

û

û

û

û

ü

SH2 instruction set

û

û

û

û

û

û

û

û

SH2A instruction set

û

û

û

û

û

û

û

û

 

 

 

 

 

 

 

 

 

GCC compiler

ü

û

ü

ü

û

ü

û

û

RVDS3.1 compiler

ü

ü

ü

ü

ü

ü

ü

û

MDK 3.1 compiler

ü

ü

ü

ü

û

û

ü

û

Visual DSP 5.0 compiler

û

û

û

 

û

û

û

ü

HEW 9.2 Compilter

û

û

û

û

û

û

û

û

 

 

 

 

 

 

 

 

 

Debug transport

USB/UART

USB/UART

UART

UART

USB/UART

USB/UART/TCP

n/a

n/a

 

 

 

 

 

 

 

 

 

HAL Ethernet drivers

û (DM9000E)

ü (on SoC)

û

ü (on SoC)

û

ü (on external ENC28J60 module)

n/a

n/a

HAL Display drivers

ü (TX09D71VM1CCA)

û

û

ü (TFT-G240320LTSW)

û

ü (A025DL02)

n/a

n/a

HAL block storage drivers

ü (K9F2G08)

ü (on SoC)

ü (AM29DL_32)

ü (SST39F)

ü (I28F_16)

ü (I28F640J3)

n/a

n/a

HAL FAT32 and FAT16 drivers

ü

ü

ü

û

ü

ü

ü

ü

HAL touch panel drivers

ü (ADS7843)

û

û

û

û

ü (TSC2046)

n/a

n/a

HAL Backlight drivers

û

û

û

û

û

ü

n/a

n/a

SoC support

 

 

 

 

 

 

 

 

SoC Bootstrap driver

ü

ü

ü

ü

ü

ü

ü

ü

SoC cache driver

ü

ü

ü

ü

ü

ü

û

n/a

SoC interrupt management driver

ü

ü

ü

ü

ü

ü

ü

n/a

SoC clock management driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC DMA driver

û

û

û

 

û

ü

n/a

n/a

Soc Ethernet driver

û

ü

û

ü

û

û

n/a

n/a

SoC External bus controller driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC GP I/O driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC I2C driver

û

û

ü

ü

ü

ü

n/a

n/a

SoC interrupt controller driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC LCD controller driver

ü

ü

û

ü

û

ü

n/a

n/a

SoC power management driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC SPI driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC timer driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC UART driver

ü

ü

ü

ü

ü

ü

n/a

n/a

SoC USB driver

ü

ü

û

û

ü

ü

n/a

n/a

SoC watchdog driver

û

û

ü

ü

ü

ü

n/a

n/a

 

 

SH2/2A processors

 

<>

Item

\

Port

Renesas  SH7264 Renesas Starter Kit (RSK) for SH7264 SH2A processor

Renesas  SH7264 M3A HS64 for SH7264 SH2A processor

Renesas  SH7216 Renesas Starter Kit (RSK) for SH7216 SH2A processor

Renesas

SH7619 EVB

 

 

 

 

Processor status

Available

Available

Available

Available

 

 

 

Development board status

Available

Available

Available

 

 

 

 

 

 

 

 

 

 

 

 

CPU Frequency

144 Mhz

144 Mhz

200 Mhz

125MHz

 

 

 

Cache

8 kB data, 8 KB code

8 kB data, 8 KB code

-

16KB data /code

 

 

 

External bus support

Yes

Yes

Yes

Yes

 

 

 

On board RAM size and usage

64KB  high speed RAM

64KB  high speed RAM

Built-in RAM 128KB,

 

-

 

 

 

On board FLASH size and usage

-

-

1MB

DataFlash 32KB

-

 

 

 

Development board RAM size and usage

64MB SDRAM

16MB SDRAM

16MB SDRAM

8MB SDRAM

 

 

 

Development board NOR FLASH size and usage

8MB

(S29GL512P)

4MB

(S29GL032)

-

8MB

(S29GL064)

 

 

 

Development board NAND FLASH size and usage

1GB NAND Flash

(K9NBG08U5M)

8MB Serial Flash

(M25PX64)

256MB NAND Flash (K92FG08)

2MB Serial Flash

(AT26DF161A-SU)

-

-

 

 

 

 

 

 

 

 

 

 

 

Managed libraries support for hardware and I/O

Serial, Timers, Graphics, ethernet

Serial,, Timers, Graphics,Ethernet  

Serial,  Timers,

Serial,, Timers, Graphics,Ethernet, GPIO 

 

 

 

 

 

 

 

 

 

 

 

ARM instruction set

û

û

û

û

 

 

 

THUMB instruction set

û

û

û

û

 

 

 

THUMB2instruction set

û

û

û

û

 

 

 

BLACKFIN instruction set

û

û

û

û

 

 

 

SH2 instruction set

ü

ü

ü

ü

 

 

 

SH2A instruction set

ü

ü

ü

û

 

 

 

 

 

 

 

 

 

 

 

GCC compiler

û

û

û

û

 

 

 

RVDS3.1 compiler

û

û

û

û

 

 

 

MDK 3.1 compiler

û

û

û

û

 

 

 

Visual DSP 5.0 compiler

û

û

û

û

 

 

 

HEW 9.2 Compilter

ü

ü

ü

ü

 

 

 

 

 

 

 

 

 

 

 

Debug transport

UART

UART

UART

UART

 

 

 

 

 

 

 

 

 

 

 

HAL Ethernet drivers

ü (on SoC)

ü (on SoC)

û

ü (on SoC)

 

 

 

HAL Display drivers

ü (on SoC)

(LCD-TX06D57VM0AAA)

ü (on SoC)

(LCD- SD1602A)

û

HD6673R

 

 

 

HAL block storage drivers

ü (S29GL032)

ü (S29GL032)

ü (SoC)

ü (S29GL064)

 

 

 

HAL FAT32 and FAT16 drivers

û

û

û

û

 

 

 

HAL touch panel drivers

û

û

û

û

 

 

 

HAL Backlight drivers

û

û

û

û

 

 

 

SoC support

 

 

 

 

 

 

 

SoC Bootstrap driver

ü

ü

ü

ü

 

 

 

SoC cache driver

ü

ü

û

ü

 

 

 

SoC interrupt management driver

ü

ü

ü

ü

 

 

 

SoC clock management driver

ü

ü

ü

ü

 

 

 

SoC DMA driver

û

û

û

û

 

 

 

Soc Ethernet driver

ü

ü

û

ü

 

 

 

SoC External bus controller driver

ü

ü

ü

ü

 

 

 

SoC GP I/O driver

û

û

û

ü

 

 

 

SoC I2C driver

û

û

û

û

 

 

 

SoC interrupt controller driver

ü

ü

ü

ü

 

 

 

SoC LCD controller driver

ü

ü

û

ü

 

 

 

SoC power management driver

ü

ü

ü

ü

 

 

 

SoC SPI driver

û

û

û

û

 

 

 

SoC timer driver

ü

ü

ü

ü

 

 

 

SoC UART driver

ü

ü

ü

ü

 

 

 

SoC USB driver

û

û

û

û

 

 

 

SoC watchdog driver

û

û

û

û

 

 

 

 

Although the code for the ports is sample code, each driver is thoroughly code reviewed and tested, and support is available through several sources, including a dedicated porting kit newsgroup.  

Sample Drivers

Each sample port is composed of a set of drivers for the specific processor or development board. Each driver is built into a library that can be included or excluded from a port, either manually or by using the wizard tool. Some drivers are structured into a hardware-independent platform abstraction layer (PAL) and a hardware-specific hardware abstraction layer (HAL).

PAL drivers are available and compile for every port. They do not generally require modifications. PAL drivers only require configuration, which is supplied in a separate library, following the model supported by solution wizard.

Among the HAL drivers it is also useful to make a distinction between the ones that are implemented for the development board peripherals and the ones that are implemented for the SoC. Some HAL or SoC drivers might not be supported for a specific SoC or development board, or the SoC or the development board might not have any matching device for the driver.

Each sample port contains a set or subset of the following drivers.

Driver Type

Drivers

PAL system

Asynchronous procedure calls, events driver for system-level events, events driver for PAL-level events, native heap management, C runtime minimal support

PAL I/O

Serial port driver, USB driver, TCP/IP driver, SSL driver, I2C driver, block storage driver, block storage driver, buttons support, file system driver, piezo driver, state de-bounce driver, events driver for PAL level events

PAL graphics

Touch panel driver, ink support driver, gesture driver

HAL I/O peripherals

Ethernet drivers, display drivers, block storage drivers, FAT32 and FAT16 drivers, touch panel drivers

Other HAL peripherals

Backlight drivers, battery charger drivers, battery measurement drivers, battery model drivers, thermistor drivers

HAL SoC

Bootstrap driver, cache driver, clock management driver, DMA driver, external bus controller driver, GP I/O driver, I2C driver, interrupt controller driver, LCD controller driver, power management driver, SPI driver, timer driver, UART/USART driver, USB driver, watchdog timer driver

 

Support and Community

For more information on development hardware, support issues, the .NET Micro Framework development community, and more, see http://www.microsoft.com/netmf/hardware/default.mspx .

 



[1] Porting to a previously-unsupported processor or processor architecture can be done. However, requires interaction with the .NET Micro Framework team by emailing netmfbiz@microsoft.com.