280 likes | 544 Views
FT28. Microsoft .NET Micro Framework and Intelligent Devices. Lorenzo Tessiore Development Manager Microsoft Corporation. Trends for Devices . Devices are complementary to desktop and web applications Devices are more and more connected and intelligent
E N D
FT28 Microsoft .NET Micro Framework and Intelligent Devices Lorenzo Tessiore Development Manager Microsoft Corporation
Trends for Devices • Devices are complementary to desktop • and web applications • Devices are more and more connected and intelligent • Devices require a fast time-to-market turnaround • Fast growing business for 32 bits MCU/MPU • Highly innovative market
Trends for Devices Application fields are diverse and require specific hardware programming skills Connectivity must address peer devices, desktop and services transparently Very diverse toolset, no standard programming model Few standard communication protocols and little support Code is generally difficult to port
Agenda • What is the .NET Micro Framework (aka .NET MF or MF) • How the MF bridges embedded and desktop programming • Architecture • Demo • Tool set and programming model • The latest version • Distribution and community • Getting started
The Devices Continuum .NET Framework Full Windows XP Embedded Device Capabilities .NET CF Win Embedded CE .NET Micro Limited MCU Example: ARM7 / Cortex-M3 / SH2 ARM9 / Cortex-A8 ARM11 / Cortex-A9 / Atom Centrino Large Small Device Category
The .NET Micro Framework • The .NET Micro Framework is a re-implementation of the desktop CLR for embedded devices that are unable to run a high-end embedded OS such as WinCE • Very small memory footprint: • Completely modularized by feature • 512KB ROM / 256KB RAM for the full feature set • WinCE and CF may require more than 10MB ROM / 10MB RAM • Typical price point of the MCU between $2 and $10 • Supports all ARM MCU from ARM7 and up, Analog Devices Blackfin and Renesas SH2/SH2A MCU. No MMU restrictions • Entirely independent code base: this is not the Compact Framework
Bridging the Gap with Desktop Programming • The programming model is entirely managed code • The programming environment is the latest VS2008 SP1 • Interoperability is supported • Object Model offers a sub-set of the same namespaces of the .NET Framework for the desktop • Object Model is tailored for small embedded devices
Architecture and Tool Set Managed Application SDK enables: SDK Application Services Extended Object Model: Web Services, … • coding and deploying applications • targeting any emulator or device • extending the emulator • leveraging full VS debug support • using VS Express edition Managed Libraries Basic Object Model: Threading, I/O, … Porting Kit (PK) Managed Run-Time CLR, Interpreter, Executive, and Interop PK enables: • Coding drivers for the .NET MF • Supporting additional processors • Coding interoperability components • Customizing the runtime and OM Platform Abstraction Layer (PAL) HW independent facilities (preferred) Hardware Abstraction Layer (HAL) (optional)Host OS Hardware
Scenarios: Energy Management .NET Micro Framework Domain
Scenarios: Actual Garbage Collection .NET MF battery powered RFID access control Microsoft and SQL Server backend Developed for the municipality of Venice, Italy, with the help of the Microsoft Innovation Center at the Polytechnic of Torino
.NET Micro Framework SDK • Contains everything you need to get started! • Add-in installer for the latest VS 2008 SP1 • Post-processing of assemblies into the .NET MF compact format • Project wizards • Full .NET MF object model • Standard emulator • Deployment and debugging against the emulator or any device • Samples • Font editor tools • Device Diagnostic tools • Help (also available online at MSDN) • Compatible with VS2008 Express Edition
.NET Micro Framework Porting Kit • Contains everything you need to port the MF onto any device! • With the Porting Kit you have full source code access to: • Code and build device drivers for the .NET MF • Code interoperability components and expose them to the OM • Customize the runtime and object model for special needs • Add support for additional instruction sets • Assisted creation of new drivers and processor support packages • Supports mainstream embedded tool chains such as ARM RVDS, Keil MDK, GCC, HEW, Visual DSP++ • Includes extensive sample libraries coded by silicon vendors such as Atmel and NXP for mainstream MCUs
The Object Model HTTP(S) Managed Application SDK Application Services Advanced Graphics XML Parser DPWS SSL Managed Libraries Threading Collections Reflection Sockets USB client I/O: USB, UART, SPI, I2C Basic Graphics File System Porting Kit (PK) Security Touch Panel Managed Run-Time CLR, Interpreter, Executive, and Interop PAL – Platform Abstraction Layer approximately 40 functions (preferred)HAL - Hardware Abstraction Layer approximately 60 functions (optional)Host OS Hardware
The Programming Model • Managed Code Device Drivers, abstracted I/O and virtualized input for maximum portability • Encourages event based programming and provides advanced sleep-on-HW-event support for maximum battery life public static class BatterySaver { public static void WaitOnSerialInput( SerialPort sp ) { sp.DataReceived += new SerialDataReceivedEventHandler( this.DataOnSerial ); PowerState.Sleep(SleepLevel.DeepSleep, HardwareEvent.SerialIn); } private static void DataOnSerial(object sender, SerialDataReceivedEventArgs e) { … ((SerialPort)sender).Read(...); ... } }
Communication and Messaging • HTTP(s) • HttpWebRequest, HttpWebResponse and HttpListener • Supports HTTP/1.1 with chunking and keep-alive • Supports SSL with X.509 certificates • DPWS • Supports WSDL 1.1, SOAP 1.2, WS-Addressing, WS-MetadataExchange, WS-Transfer, WS-Discovery, WS-Eventing • Compatible with WCF Soap bindings • Code generation tools to/from WSDL and assembly • Code generation compatible and interoperable with desktop tools • Wired and Wireless • Ethernet, Serial and USB • 802.11 configuration support • 802.15.4 stack available (not yet documented)
UI Support • Inspired to WPF, supports dynamic layout, rendering , and event dispatching • Basic types • Application • Windows • Basic layout controls • StackPanel • Canvas • InkCanvas • Basic controls • Text • ScrollViewer • ListBox • Event routing and input providers support • Integrated Touch Panel and Inking support
Distribution The v4.0 version changes the business model from the ground up As of 11/16/2009 the .NET Micro Framework version is available as source code under the Apache 2.0 license All the code of the runtime, the object model and device drivers is available free of charge TCP/IP stack code is provided under the restriction that it must be used in conjunction with MF only Crypto code is pre-compiled for the supported instruction sets, but replaceable
Community Ideal for both professionals and hobbyists Co-operative development inside the community Microsoft will oversee and approve the feature set together with the community leaders Community Web for exchanging components and solutions Microsoft will officially support any latest version of the .NET MF Anybody is welcome to participate to whatever extent, contributions are encouraged but not required
Additions for the 4.0 version HTTP(S) Versioning Faster XML parser and System.Collections support Faster Graphic/Touch/Inking support Power Level control Wear Leveling for Block storage devices Time Sync Arbitrary Display Size Support for Atmel AT91SAM9RL64 ARM9 processor Support for NXP LPC2478 AR7 processor Renesas SH2/A support for SH7619 RTM date: Yesterday!
Roadmap • Version 4.1 is tentatively scheduled for End of Third Quarter 2010 (March 2010) • Priorities: • Keep release in sync with Visual Studio 2010 support • Big Endian Support • Open TCP/IP stack • Extensive Cryptographic support • 802.15.4 (with 6lowPAN) and 802.11 drivers • Remote Firmware Update • Remote logging and diagnostics
Resources The .NET Micro Framework eco-system relies on a network of partners Partners own reference hardware, ports, library extensions and specific solutions Many reference ports are published and documented in the Porting Kit and provided free of change Atmel and NXP substantially contributed to the PK reference ports Some partners can also assist developing custom solutions, independently or in conjunction with the .NET Micro Framework team
Resources Access the eco-system at http://www.microsoft.com/netmf Review our partners’ HW solutions Download the SDK and start prototyping in a few clicks
YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com
Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….