What s it for? What s the.net Micro Framework? How it Works. .NET Micro Framework Context 6/29/ :44 AM. Microsoft.NET on a TINY Footprint device

Similar documents
Making Gadgets. Rob Miles. Department of Computer Science University of Hull

Vision V sion o n I n n 1975 V sion o n T o T d o a d y A c o c m o pu p t u er e o n o n e v e e v r e y E po p w o er e p e p o e p o l p e

10/18/2010 ' ( )* +, ('')* +, !" #$ % !""#$

422L: Introduction to the.net Micro Framework

Introduction to.net. The path. The Distributed Group University of Seville Spain - España. Introduction The elements of.net. Assessments Conclusions

Porting the.net Micro Framework

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

Windows Presentation Foundation Visual Studio.NET 2008

Learn to develop.net applications and master related technologies.

Andrew Coates Microsoft Australia Session Code: OFC343

Migrate Your Skills to Microsoft.NET Framework 2.0 and 3.0 using Visual Studio 2005 (C#)

Developing Microsoft.NET Applications for Windows (Visual C#.NET)

10262A VB: Developing Windows Applications with Microsoft Visual Studio 2010

An Introduction to.net for the J2EE Programmer

DEVELOPING WINDOWS APPLICATIONS WITH MICROSOFT VISUAL STUDIO 2010

HCIM SUMMER WORKSHOP Introduction to C#

10265: Developing Data Access Solutions with Microsoft Visual Studio 2010 Duration: 5 Days Method: Instructor-Led

DE Developing Windows Applications with Microsoft Visual Studio 2010

Transactions of the VŠB Technical University of Ostrava, Mechanical Series. article No. 2002

A NET Refresher

Analysis of the Benchmark while Extracting Data from Database or XML File for Different Platforms

An Overview of Microsoft Visual Studio 2008

ALPHAPRIMETECH 112 New South Road, Hicksville, NY 11801

Developing Windows Applications with Microsoft Visual Studio 2010

Windows Presentation Foundation Programming Using C#

Windows Presentation Foundation (WPF)

Unit 1: Visual Basic.NET and the.net Framework

Build Better WPF & Silverlight applications using Prism v2

"Charting the Course... MOC A Developing Data Access Solutions with Microsoft Visual Studio Course Summary

Building Rich Interactive Applications with Silverlight

The information contained herein is subject to change without notice. Revisions may be issued to advise of such changes and/or additions.

Demystifying.NET Standard and.net Core. Presented by Steve Ives

Building Windows Applications with.net. Allan Laframboise Shelly Gill

Ronnie Saurenmann Architect Microsoft Switzerland

1. I NEED TO HAVE MULTIPLE VERSIONS OF VISUAL STUDIO INSTALLED IF I M MAINTAINING APPLICATIONS THAT RUN ON MORE THAN ONE VERSION OF THE.

COPYRIGHTED MATERIAL. Contents. Part I: C# Fundamentals 1. Chapter 1: The.NET Framework 3. Chapter 2: Getting Started with Visual Studio

Top 40.NET Interview Questions & Answers

Solution overview VISUAL COBOL BUSINESS CHALLENGE SOLUTION OVERVIEW BUSINESS BENEFIT

Break Through Your Software Development Challenges with Microsoft Visual Studio 2008

Xiaoying Guo Program Manager Microsoft Server and Tools China Session Code: DEV377

Dot Net Framework 4.0: Advanced Microsoft C#.NET Web Development

Introduction to.net Framework Week 1. Tahir Nawaz

ASP.NET Web Forms Programming Using Visual Basic.NET

EMX Module Specifications

Intel Authoring Tools for UPnP* Technologies

ExecuTrain Course Outline MOC 6460A: Visual Studio 2008: Windows Presentation Foundation


Developing Data Access Solutions with Microsoft Visual Studio 2010

Introduction to Web Development with Microsoft Visual Studio 2010

Java Embedded on ARM

ASP.NET Using C# (VS2017)

.NET Secure Coding for Client-Server Applications 4-Day hands on Course. Course Syllabus

Exploring.Net Orcas. Contents. By Punit Ganshani

EMAC SoM Presentation.

Apex TG India Pvt. Ltd.

Office as a development platform with Visual Studio Daniel Moth Developer and Platform Group Microsoft

DOT NET Syllabus (6 Months)

Introduction to Mobile Development

10267 Introduction to Web Development with Microsoft Visual Studio 2010

Developing Microsoft.NET Applications for Windows (Visual Basic.NET)

ArcGIS Runtime: Building Cross-Platform Apps. Rex Hansen Mark Baird Michael Tims Morten Nielsen

.NET Micro Framework. Devices Profile For Web Services DPWS. Jim Mateer Program Manager.NET Micro Framework

Real-time for Windows NT

Visual Studio 2015: Windows Presentation Foundation (using VB.NET Language) Training Course Outline

Using WebGallery, WebDeploy and some IIS Extensions

10267A CS: Developing Web Applications Using Microsoft Visual Studio 2010

C# Syllabus. MS.NET Framework Introduction

Programming and Design Patterns for the ArcGIS Mobile SDK

An overview of mobile and embedded platforms

DE Introduction to Web Development with Microsoft Visual Studio 2010

Visual studio 2008 overview

Mastering VB.NET using Visual Studio 2010 Course Length: 5 days Price: $2,500

Certified Enterprise Applications Integration Specialist (With Microsoft BizTalk Server) Sample Material

Choosing a Development Tool

Gadgeteer 101 Hands on Lab BLAKE MCNEILL

UNIT 1. Introduction to Microsoft.NET framework and Basics of VB.Net

Developing.NET Applications for ArcGIS Engine. Deep Dhanasekaran and John Hauck

This tutorial is designed for software programmers who would like to learn the basics of ASP.NET Core from scratch.

EMAC SoM Presentation

Microsoft..NET Framework. Overview

STARCOUNTER. Technical Overview

Course Outline: Course 10267A: Introduction to Web Development with Microsoft Visual Studio 2010 Learning Method: Instructor-led Classroom Learning

EMX Development System

Yoon Joong Kim. Department of computer Engineering Hanbat National University

Developing Web Applications Using Microsoft Visual Studio 2008 SP1

TOUCH CONTROLLER CUWIN

Developers Road Map to ArcGIS Desktop and ArcGIS Engine

"Charting the Course... MOC A Introduction to Web Development with Microsoft Visual Studio Course Summary

Introduction to.net Framework

Level: M.Ed. Credit Hour: 3 (2+1) Semester: Third Teaching Hour: 80(32+48)

Who Should Read This Book?

Program Contents: DOTNET TRAINING IN CHENNAI

Lesson 6 Intel Galileo and Edison Prototype Development Platforms. Chapter-8 L06: "Internet of Things ", Raj Kamal, Publs.: McGraw-Hill Education

Introduction to Web Development with Microsoft Visual Studio 2010

VIGNESH DORAISWAMY PRINCIPAL CONSULTANT AXIOM ETC

DOWNLOAD OR READ : VISUAL STUDIO ADD PROJECT TO SOLUTION PDF EBOOK EPUB MOBI

Implementing ArcGIS Mobile Applications for the Enterprise

Now you can Microsoft Visual Studio 2010 with MSDN

Mitchell Bosecke, Greg Burlet, David Dietrich, Peter Lorimer, Robin Miller

ASP.NET 2.0 p. 1.NET Framework 2.0 p. 2 ASP.NET 2.0 p. 4 New Features p. 5 Special Folders Make Integration Easier p. 5 Security p.

Transcription:

OTT201 Building Embedded Solutions with.net Micro Framework Dave Baker Architect Evangelist Microsoft UK Session Objectives The challenge of embedded development How the Microsoft.NET Micro Framework fits in.net Micro Framework Platforms Developing for the.net Micro Framework platform with Visual Studio 2005 Emulators Why you should be writing embedded code Embedded Devices Embedded Devices are tiny platforms Remote Controls Data loggers Device Controllers Single Purpose Device The processor is there just to drive the device High volume/ Low cost No need for an operating System Writing Embedded Code You may be forced to work in C or C++ at a very low level of abstraction You may need to use an ad-hoc collection of tools and device drivers You may need to interact with hardware devices in strange and poorly documented ways You may find it difficult to debug your code when it breaks You may find it hard to emulate the solution You may find it hard to reuse your collections Enter the.net Micro Framework The aim of the.net Micro Framework is to make it as easy to write code for devices as it is for the desktop Write in C# in a managed environment Code against a familiar API Develop and debug in Visual Studio 2005 Use powerful and extensible hardware emulation Desktop developers can easily move into the embedded space Embedded developers can make use of modern language and platform features MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 1

What s the.net Micro Framework? Microsoft.NET on a TINY Footprint device <400 KB of RAM No memory management hardware requirement No Operating System overhead Applications run from Flash memory (EEPOM) Programs run in a managed environment Programmers can use a subset of the full.net Framework What s it for? Intended to power small devices Connected, small, wearable, Integrated, graphical UI, Very low power consumption Not High Performance Not hard real time but useable and useful Wide range of potential applications Sensor nodes, Auxiliary displays, health monitoring, remote controls, data logging, device controls, robotics Because it is easy to create solutions, we see great potential in realising new ideas.net Micro Framework Context How it Works Device Features.NET Micro Framework Connected, Small, Wearable, Graphical UI Footprint ARM 7, ARM 9, No MMU, 250-500KB, Managed Code Windows CE Connected, Graphical UI, Server, Browser, RAS DirectX X86, MIPS, SH4, ARM, with MMU, 12 MB Managed Code Windows XP Embedded PC Class Performance, PC Class Networking Power Very Low Power Low Power Mains Mains X86 Windows Vista PC Class Performance, PC Class Networking X86 Dual Core, 64 Bit, Multi Processor C# source compile to Microsoft Intermediate Language (MSIL) MSIL downloaded in compressed form and interpreted in Micro Framework device From a code perspective it is running in a standard.net assembly Application runs as soon as device is powered up.net Micro Framework Architecture The Missing Operating System Device powered by.net Micro Framework does not have or need an operating system Applications run natively on the hardware using a Bootable Runtime System Simplifies deployment Reduces the demands on the target platform Applications still have access to much of the.net API Provided by the runtime system rather than the operating system MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 2

.NET Framework System.Web Services Description Discovery Protocols Cache UI Controls HTML Web Session state System.Windows.Forms System.Drawing Drawing 2D Imaging Component model Printing.NET Compact Framework System.Web Services Description Discovery Protocols Cache UI Controls HTML Web Session state System.Windows.Forms System.Drawing Drawing 2D Imaging Component model Printing System.Data ADO.NET SQL Client SQL ServerCE System.XML XML Document Xslt/XPath Reader/writers System.Data ADO.NET SQL Client SQL ServerCE System.XML XML Document Xslt/XPath Reader/writers System Collections Globalization IO Net Reflection Service process Diagnostics Threading Runtime Interop Remoting System Collections Globalization IO Net Reflection Service process Diagnostics Threading Runtime Interop Remoting.NET Micro Framework System.Web Services Description Discovery Protocols Cache System.Data ADO.NET System Collections Globalization UI Controls HTML Web Session state SQL Client SQL ServerCE IO Net Reflection System.Windows.Forms System.Drawing Drawing 2D Imaging System.XML XML Document Xslt/XPath Service process Diagnostics Threading Component model Printing Reader/writers Runtime Interop Remoting Platforms Freescale imxs Development Kit Fully Featured Device ARM920T core 32MB SDRAM 8MB Burst Flash I2C, RS232, SSI 2.5 inch QVGA screen 11 keys Windows Sideshow development platform Great for Prototyping Platforms Digi Connect ME Small embedded device ARM NS7520 core 8MB RAM 2/4 MB Flash Network connected Network powered GPIO/ Serial Can be used for embedded control and data logging Building Your Own Platform Porting the.net Micro Framework to your platform is generally a simple exercise Integration can be performed at either the PAL (Platform Adaptation Layer) or the HAL (Hardware Adaptation Layer) Depends on Target Less than 3 weeks. Contact.NET Micro Framework team directly if you wish to do this. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 3

.NET Micro Framework Application Development All components are written in managed code Ease of development with C# Fully integrated into Visual Studio Debugging support UI design tools Access to a subset of the full desktop.net Framework libraries Managed code development story for both the application and the emulator. Hardware and C# Code If you write embedded code you will be familiar with the issues involved with coding for specific hardware Strange bit masks Arcane values for control registers Bind software to physical memory locations.net Micro Framework abstracts you away from this Interact with the hardware using an object model and standard C# constructions such as delegates Reading an Input Pin Objects and Hardware // Map the pin to the software Cpu.Pin switchpin = Cpu.Pin.GPIO_Pin2; // Create a port connected to a pin InputPort switchinput = new InputPort( switchpin, //pin false, //no glitch filter Port.ResistorMode.PullUp); // Use the pin If (switchinput.read()) Debug.Print( input high ); Input and Output connections are managed by objects The output port object provides a method you can use to set the state of the pin You can also create ports which generate interrupts when they are triggered These make use of delegates to dispatch the interrupt event Built in hardware abstractions for RS232, I2C, SPI, LCD Graphical displays The.NET Micro Framework has comprehensive graphical output for driving device displays The facilities are provided at two levels: Bitmap class provides a range of simple drawing facilities (shapes, images, text) Windows Presentation Foundation (WPF) set of display elements that can be used to create complex displays. The default template uses a standard WinForm Persistent Storage.NET Micro Framework v2.0 does not have a file system Store information in memory using standard.net objects and value types To persist these objects and values between sessions, Microsoft.SPOT.ExtendedWeakReference will prioritize which data to keep around Priority levels range from throw this away anytime to keep this around no matter what ID values act as filenames, allowing you to persist these values between system reboots MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 4

x86 HAL / PAL TinyCLR (x86) HAL / PAL TinyCLR Code Challenges Power Requirements.NET Framework, developers often create a low-cpuusage loop using System.Threading.Thread.Sleep( ) to wait for an asynchronous condition or for a callback.net Micro Framework and battery-powered devices, need to use callbacks and interrupt-based events Only execute code when necessary Debugging and Performance Tuning Similar to headless Windows CE applications, may not have a graphics display to write out code run-time intervals Debug.Print uses approx. 30ms of CPU time to execute. Write out performance measurements but only aggregate statistics (or subtract the Debug.Print execution time) The Emulator Ease of development Parallel hardware and software development Develop application when hardware is limited and/or non-existent Easier and faster deployment We need to emulate the environment The core chipset we emulate is often just a controller for various other devices connected to the system We provide all the basic components out of the box GPIO, Serial Ports, SPI, I2C, Display etc Emulator Architecture Versus Actual Hardware Microsoft.SPOT.Emulator.dll EmulatorComponents GpioPort GpioPort EmulatorNative.dll Microsoft.SPOT.Hardware.pe Microsoft.SPOT.Native.pe Microsoft.SPOT.Graphics.pe MFApplication.pe Microsoft.SPOT.Hardware.pe Microsoft.SPOT.Native.pe Microsoft.SPOT.Graphics.pe MFApplication.pe Engine MyEmulator.exe UI my.config MyComponent The Emulator Emulation at the PAL level. An x86 version of PAL / HAL is used for the emulator. Above PAL, the emulator is running the same code (our CLR libraries and the applications) built for the devices The CLR are recompiled to run in Windows The same Micro Framework applications run on both PAL and HAL development cannot be tested on the emulator. PAL / HAL not needed for application development Extending the Emulator Building a custom emulator All this is done in C# by extending the existing emulator and component classes in the project Mainly consists of editing the XML to replicate your board s features: GPIO Pin Assignments, Flash size, Components Using VS forms, you can make your emulator resemble your devkit You can easily build up a library of device and component emulations which can be shared across projects MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 5

Summary Building a Solution using a Custom Emulator. The.NET Micro Framework makes it very easy to target embedded platforms No new skills required Familiar development environment Comprehensive and flexible emulation technology Makes it easy to move from idea to solution quickly and easily Brings desktop development experience to embedded coding Quickly and easily incorporate new technology Developer centre SDK Download, Newsletter, Samples & Tools http://msdn.microsoft.com/embedded/netmf/ Book Embedded Programming with Microsoft.NET Micro Framework, Donald Thompson & Rob Miles. Microsoft Press, ISBN 0-7356-2365-1 Blogs http://blogs.msdn.com/davbaker www.dotnetmicroframework.com conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. 6