Porting WinCE 5.0 to your NXP BlueStreak MCU Board

Similar documents
WinCE for LPC3250. BUMMS China Nov PDF created with pdffactory Pro trial version

Module 6: Device Driver Architecture

CHAPTER 1: EMBEDDED DEVELOPMENT 3

For the Windows Embedded CE 6.0 R3 and Windows Embedded Compact 7 Image and BSP

ADENEO WINDOWS CE 6.0 PORT ON AT91SAM9263EK TECHNICAL DESIGN DOCUMENT

TQ2440 Development Platform Manual

Developing i.mx Multimedia Applications Processors with Windows Embedded CE 6.0 WinCE 6.0 on the i.mx25 and i.mx35 PDK s

Topaz Release Notes. Table Contents. For the Windows Embedded CE 6.0 R3 Image and BSP. CE 6.0 R3 Release 822 Wednesday, 27 March 2013

ARMed for Automotive. Table of Contents. SHARP and ARM Automotive Segments SHARP Target Applications SHARP Devices SHARP Support Network Summary

Getting Started. With Windows CE and the Topaz i.mx25 Development Kit

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

SBC8140 Single Board Computer

DevKit8500D Evaluation Kit

Customizing the CEPC BSP in Windows Embedded Compact 7. Douglas Boling Boling Consulting Inc.

ADENEO WINDOWS CE 5.0 PORT ON AT91SAM9260EK TECHNICAL DESIGN DOCUMENT

Cirrus Logic Announces New ARM9-Based Embedded Processor Family Press Presentation February 2004

DevKit7000 Evaluation Kit

ebox-3300-msjk Windows Embedded CE 6.0 R2 JumpStart Guide

Quick Start Guide for i.mx28 EVK. i.mx28 EVK Multimedia and connectivity

Installation and Maintenance

ebox-3310a-msjk Windows Embedded Compact 7 CTP Jump Start

Developing a Camera Application with i.mx RT Series

COPYRIGHTED MATERIAL. Contents. Chapter 1: Windows Embedded CE 1. Chapter 2: Development Environment and Tools 15. Introduction

Kinetis SDK Release Notes for the TWR-K24F120M Tower System Module

Windows Embedded Compact Test Kit User Guide 1

EMX Module Specifications

Chapter. Overview. Tornado BSP Training Workshop Copyright Wind River Systems 1-1 Wind River Systems

Embest SOC8200 Single Board Computer

Module 8: Customizing the OS Design

Hands-on with the Sitara Linux SDK

Introduction to the TenByTen6410

DevKit8000 Evaluation Kit

iw-rainbow-g3 / G3V FAQs:

Installation Guide for MV320 (Windows CE 5.0)

Advanced Embedded Systems

BRDS ( , WS 2017) Ulrich Schmid

MBC-SAM9G25 Core Board Overview

Hands-On Workshop: ARM mbed : From Rapid Prototyping to Production

ID 730L: Getting Started with Multimedia Programming on Linux on SH7724

Windows Embedded Compact Test Kit User Guide

VDX-6318 Windows Embedded Compact 7

AT91SAM9G45-EVK WinCE User Manual

How-to Build: Windows Embedded Compact 7 Network Projector Adapter

Product Technical Brief S3C2440X Series Rev 2.0, Oct. 2003

Pro Windows Embedded Compact 7

System Energy Efficiency Lab seelab.ucsd.edu

Developing Applications using Universal Driver 6.0x in Windows CE 6.0

Chapter 5 Input/Output. I/O Devices

Hands-On Workshop: Freescale MQX Drivers and BSP s

FriendlyARM. Mini2440.

9/19/18. COS 318: Operating Systems. Overview. Important Times. Hardware of A Typical Computer. Today CPU. I/O bus. Network

Integration for exdi2 on Windows CE Platform Builder

ebox-2300sx Windows Embedded CE 6.0 R2 Jump Start Guide

Kinetis SDK v Release Notes for the MK21DA5 and MKW24D5 Devices

Embedded Design without an OS. By Peter de Ruiter D&E September 21 st, Transfer BV

December 1, 2015 Jason Kridner

Intel Galileo gen 2 Board

PXA270 EPIC Computer with Power Over Ethernet & Six Serial Protocols SBC4670

M-606 Linux ARM9 Single Board Computer User Guide

Advanced Virtual CEPC 1

Spartan-6 and Virtex-6 FPGA Embedded Kit FAQ

Chapter 9 Windows CE 6.0 Developer's Guide

AN2637 Application note

The Early System Start-Up Process. Group Presentation by: Tianyuan Liu, Caiwei He, Krishna Parasuram Srinivasan, Wenbin Xu

Hands-On Workshop: ARM mbed

ML410 VxWorks Workbench BSP and System Image Creation for the BSB Design Using EDK 8.2i SP2. April

CORRIGENDUM ISSUED FOR NATIONAL COMPETITIVE BIDDING UNDER TEQIP PHASE-II

ARM Cortex-M4 Architecture and Instruction Set 1: Architecture Overview

How to Enable Boot from HyperFlash and SD Card

Module 7: Device Drivers Examples

Getting to know the Arduino IDE

SOFTWARE ARCHITECT MICROSOFT CORPORATION BLOGS.MSDN.COM/MIKEHALL

StrongARM SA-1100 Development Board Firmware Kit

User Manual. LPC-StickView V3.0. for LPC-Stick (LPC2468) LPC2478-Stick LPC3250-Stick. Contents

Freescale Kinetis Software Development Kit Release Notes

Section 0 1: Clone a BSP Create, Build, and Run a New OS Design

SmartFusion2 SoC FPGA Demo: Code Shadowing from SPI Flash to SDR Memory User s Guide

Celeron EPIC Computer with GUI and Dual Ethernet SBC4685

Track Two Building an Internet Radio with the TI Sitara AM3517 using LinuxLink

Rudi Swiontek Dipl. Inf. MCTS Senior Trainer and Developer. HILF!GmbH Bajuwarenring Oberhaching

CEC 450 Real-Time Systems

Overview. 1/13/ Preliminary Product Brief

NS115 System Emulation Based on Cadence Palladium XP

Component validity and internal error checking functionality to ensure reliable operation

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Diploma in Embedded Systems

Developing a simple UVC device based on i.mx RT1050

Zatara Series ARM ASSP High-Performance 32-bit Solution for Secure Transactions

EZ Touchscreen CE Computer. User Manual

M16C/62P QSK QSK62P Plus Tutorial 1. Software Development Process using HEW4

MYD-SAMA5D3X Development Board

Nios II Embedded Design Suite Release Notes

The task of writing device drivers to facilitate booting of the DSP via these interfaces is with the user.

CHAPTER 2 BASIC OPERATING SYSTEM CONCEPT MANAGEMENT

MYD-IMX28X Development Board

MYD-IMX28X Development Board

PM9263 Getting Started with Windows CE 6.0

NXP Semiconductors, 6501 William Cannon Drive West, Austin, Texas Kinetis SDK 2.0 Transition Guide Rev.

FPQ6 - MPC8313E implementation

AT-501 Cortex-A5 System On Module Product Brief

Transcription:

Porting WinCE 5.0 to your NXP BlueStreak MCU Board Durgesh Pattamatta Staff Systems Engineer, Product Line Microcontrollers, NXP Semiconductors. http://www.standardics.nxp.com/support/microcontrollers/ October 2 nd, 2007

Agenda Overview of Windows CE 5.0 Architecture Overview of Windows CE development Development Tools Developing a Board Support Package Boot-loader OEM Abstraction Layer (OAL) Configuration files Device drivers Porting LH7A404-SDK BSP to custom boards 2

Overview of Windows CE 5.0 Architecture 3

Windows CE 5.0 Architecture Layer view 4

Windows CE 5.0 Architecture Process view Custom Application.exe GWES.exe - GUI process - Display driver - keyboard/mouse - Touch-screen Device.exe - Most device drivers - USB - SD/MMC - Audio - HKEY_LOCAL_MACHINE \Drivers\BuiltIn - FileSys.exe -Storage Manger -FATFS -MS Partition -Registry store -HKEY_LOCAL_MACHINE \System\StorageManager Explorer.exe Services.exe Shell.exe Nk.exe (OAL + Kernel library) 5

Windows CE 5.0 Architecture Memory Architecture Kernel Space 0xE0000000-0xFFFFFFFF 0xC4000000-0xE0000000 0xC2000000-0xC4000000 0xC0000000-0xC2000000 0xA0000000-0xC0000000 0x80000000-0xA0000000 Trap area, others Statically Mapped additional OEM virtual address Slot 97: NK.exe (secure slot) Unused Statically Mapped virtual address - UNCACHED Statically Mapped virtual address - CACHED User Space 0x7E000000-0x80000000 Slot 63: Resource mappings 0x42000000-0x7E000000 0x04000000-0x42000000 0x02000000-0x04000000 0x00000000-0x02000000 Slot 33 62: Object store & memory mapped files Slot 2 32: Processes Slot 1: XIP Dlls Slot 0: Current Process 6

Overview of Windows CE 5.0 Development Process 7

Overview of Windows CE Development To develop an OS design based on the Microsoft Windows CE OS, you must complete the following major tasks: Create a board support package (BSP) for your specific target device. Create an OS design, based on a standard or custom BSP, that you can use to create a run-time image that you can download to a standard development board (SDB), which is also called a hardware platform. Create and customize device drivers for your target BSP. Customize the OS design with additional projects and Catalog items. Build the run-time image, download it to your SDB, and debug the run-time image by using the debugging tools found in the Microsoft Platform Builder integrated development environment (IDE). When the run-time image is complete, export a software development kit (SDK) for your application developers. 8

Overview of Windows CE Development Device Bring-up Platform Development Application Development Hardware Design Debug Hardware Create Boot loader Develop Custom Drivers Boot Minimum Kernel Custom WinCE OS features Test & Integration OAL Development BSP Development Develop & Integrate OS features Application & Middleware 9

WinCE 5.0 Development Tools Platform Builder 5.0 Develop Board Support package Develop Device drivers Develop Custom OS design Develop software development kit (SDK) for Visual Studio Develop Applications embedded Visual C++ 4.0 Develop Applications Limited support Visual Studio 2005 Professional Develop Applications Supports WinCE 6.0 Platform builder plugin 10

WinCE 5.0 Development Tools WinCE based OS-design OEM Adaptation Layer (OAL) Platform Builder Runtime libraries Header & libraries SDK documentation Custom SDK Runtime files OS design extensions Platform manager Microsoft Embedded development software Microsoft embedded Visual C++ 4.0 Microsoft Visual Studio 2005 11

Developing a Board Support Package 12

Developing Board Support Package Developing a Boot-loader Developing an OEM Adaptation Layer (OAL) Creating Device drivers Creating OS design configuration files 13

Developing Board Support Package Board bringup using ICE, ROM Monitors Clone Reference BSP Develop Boot loader Develop OAL (Tiny Kernel) Package BSP or Design custom OS Power management Add Device drivers 14

Developing a Board Support Package Boot-loader 15

Developing a Boot-loader A boot loader manages the boot process of the target device by initializing the target device, downloading the run-time image, and booting the run-time image on the target device. Using the boot loader during the board support package (BSP) development process saves time. Final products may not have the boot loader hardware platforms that need to perform pre-boot tasks, such as run-time image updates, might include the boot loader in the final product 16

Developing a Boot-loader Implement StartUp function Set SVC mode, clear caches & TLBs, disable interrupts, Initialize memory controller & PLLs Implement OEM functions called by the BLCOMMON library (http://msdn2.microsoft.com/en-us/library/ms903758.aspx) Control flow, debug, ethernet, flash, initialization, timer Create a sources file and makefile file Create the.bib file, which will be used by Romimage.exe to convert the boot loader.exe file into.bin and.nb0 files Check Platform builder help for complete list of steps to implement (http://msdn2.microsoft.com/en-us/library/ms903967.aspx) 17

Developing a Board Support Package OEM Adaptation Layer (OAL) 18

Developing an OEM Adaptation Layer (OAL) An OEM adaptation layer (OAL) is a layer of code between the Windows CE kernel and the hardware of your target device. Contains code to handle interrupts, timers, power management, bus abstraction, generic I/O control codes (IOCTLs) Creating the OAL is one of the more complex tasks in the process of getting a Windows CE based OS to run on a new hardware platform. In general, the easiest way to create an OAL is to copy the OAL implementation from a working OS design, and then modify it to suit the specific requirements of your hardware platform. 19

Developing an OEM Adaptation Layer (OAL) Implement the Startup function for the OAL Create a sources file and a makefile Implement required OAL function. Check (http://msdn2.microsoft.com/en-us/library/ms903786.aspx) Implement required kernel independent transport layer (KITL) functions (http://msdn2.microsoft.com/en-us/library/ms903776.aspx) Implement ILTiming and profiling function Create config.bib, platform.bib, platform.reg, platform.db, platform.dat files. Check Platform builder help for complete list of steps to implement (http://msdn2.microsoft.com/en-us/library/ms903969.aspx) 20

Developing a Board Support Package Device Drivers 21

Device Drivers A device driver is software that abstracts the functionality of a physical (eg. UART, network, audio) or virtual device (eg. File system) Many Windows CE device drivers implement the stream interface XXX_Open (Device Manager), XXX_Close (Device Manager), XXX_Read (Device Manager), and XXX_Write (Device Manager). Determine the driver type FileSys.exe loads file system drivers Device.exe loads audio drivers, battery drivers, keyboard drivers, mouse drivers, NDIS drivers, notification LED drivers, serial drivers, PC Card drivers, USB drivers, and any other driver that exposes the stream interface. GWES.exe loads a device driver if GWES is the only client of a driver. Device drivers loaded by GWES present a standard set of functionality for all similar devices. Drivers that GWES loads might expose the stream interface or they might expose other interfaces. Having alternatives make accessing the drivers much faster. GWES loads display drivers, printer drivers, and touch screen drivers. 22

Device Drivers Concepts Monolithic vs Layered Most Windows CE device drivers consist of a platform dependent driver (PDD) and a model device driver (MDD). A monolithic driver combines all PDDs and MDDs into one driver. MDDs Code common to all drivers Call PDD functions Expose device driver interface (DDI) functions to the operating system (OS) Contain any interrupt service threads (ISTs) PDDs Hardware platform specific code Work with specific MDD implementations Device driver service-provider interface (DDSI) functions that the MDD calls Check (http://msdn2.microsoft.com/en-us/library/ms923714.aspx) 23

Developing a Board Support Package OS design Configuration Files 24

OS Design Configuration Files Run-time Image Configuration Files Run-time image configuration files are used by a number of tools that are called by the Make Binary Image Tool to create the run-time image. Binary Image Builder File (.bib) Defines the modules and files to be included in the run-time image. Registry File (.reg) Defines the registry keys and values for a run-time image created during a cold boot. File System File (.dat) Defines the RAM file system directories, files, and links for a run-time image created during a cold boot. Database File (.db) Defines the databases to be included in the object store of a run-time image created during a cold boot. String File (.str) Defines locale-specific string replacements for text that is visible to a user in.reg,.dat, and.db files. Each line in the.str file must end with a <CR> to enable correct processing. 25

OS Design Configuration Files Source Code Configuration Files Source code configuration files are used by the Build tool (Build.exe) to build modules and features and to build the source code for your run-time image. Dirs File (dirs) A text file that specifies the subdirectories that contain source code to be built. Makefile File (makefile) Each subdirectory in a source code tree should have this file. In platform builder always refers to common makefile file, Makefile.def. Module-definition File (.def) Contains the statements defining an executable or dynamic-link library. Used by the linker tool to create.exe files and DLL files Sources File (sources) Contains the macro variables and source files list needed to build source code. 26

Platform Builder 5.0 - Build System 27

Catalog Item Files After you create BSP or project, you can use a Catalog item (.cec) file to associate it with a Catalog item that you can display in the Platform Builder Catalog. For more information (http://msdn2.microsoft.com/enus/library/aa448620.aspx) 28

Porting LH7A404-SDK BSP to custom boards 29

Porting LH7A404-SDK BSP to custom boards Boot-loader changes OAL changes Device driver changes Display driver USB function USB host SD/MMC Audio Touch-screen Modifying run-time image configuration files 30

LH7A404 Customer BSP You could use Microsoft s Cloning a BSP method or modify existing LH7A404 BSP with your board specific changes. Cloning Cloning a BSP creates a new BSP in catalog. Check http://msdn2.microsoft.com/enus/library/aa448478.aspx Clean-up and modify the reference to BSP_KEV7A404_BOARD, BSP_LPD7A404_BOARD and BSP_FIREFLY_BOARD with your board specific changes. Merging new BSP release from NXP will be little confusing. Modify Existing BSP Add new reference BSP_CUSTOMER_BOARD. Add new board type in lh7a404.cec file Search for BSP_KEV7A404_BOARD, BSP_LPD7A404_BOARD & BSP_FIREFLY_BOARD references and code for BSP_CUSTOMER_BOARD Merging new BSP release from NXP will be easier. 31

Boot-loader changes Cloning Rename wince500/platform/lh7a404/src/bootloader/kevboot or fireflyboot to your board name. Modify the functions which are different for your board. Modify exisiting BSP Create new directory for your board under wince500/platform/lh7a404/src/bootloader/ Change wince500/platform/lh7a404/src/bootloader/dirs file to add your directory Add bootloader code use kevboot as an example. 32

OAL Changes Create new intr_cust.c file similar to intr_lpd7a404.c file in WINCE500\PLATFORM\CUSTLH7A404\SRC\KERNEL\OAL directory. Add the new file to sources file Contains board specific interrupt handler If you have custom IOCTLS, create a file similar to ioctl_firefly.c file. Modify all header files in WINCE500\PLATFORM\CUSTLH7A404\SRC\INC except header files with names lh7a404_*.h Search for BSP_KEV7A404_BOARD, BSP_LPD7A404_BOARD & BSP_FIREFLY_BOARD references and add code for your board if those function effect your board. KITL changes Modify WINCE500\PLATFORM\CUSTLH7A404\SRC\KERNEL\KERNKITL\eth_drv.c file with ethernet driver specific to your board. If don t plan to use KITL in your developement process ignore this step. 33

Device Drivers Display Create new cust_panel.c file similar to kev_panel.c file in WINCE500\PLATFORM\CUSTLH7A404\SRC\DRIVERS\DISPLAY directory. Add the new file to sources file Contains board specific LCD panel parameters 34

Device Drivers USB function Create new cust_usbfn.cpp file similar to kev_usbfn.cpp file in WINCE500\PLATFORM\CUSTLH7A404\SRC\DRIVERS\USBFN directory. Add the new file to sources file Contains board specific implementation Dplus pull-up handling Cable detect handling 35

Device Drivers USB host Modify WINCE500\PLATFORM\LH7A404\SRC\DRIVERS\USBHCD\PDD\syst em.c file With board specific 5V regulator handling Search for BSP_FIREFLY_BOARD in that file to Firefly board handlers as an example 36

Device Drivers SD/MMC Create new cust_impl.c file similar to kev_impl.c file in WINCE500\PLATFORM\CUSTLH7A404\SRC\DRIVERS\SDHC directory. Add the new file to sources file Contains board specific implementation Card detect handling (insert/remove) Card write protect handling 37

Device Drivers Audio Create new cust_xxxx.c file similar to kev_cs4201.c file in WINCE500\PLATFORM\CUSTLH7A404\SRC\DRIVERS\WAVEDEV directory. Add the new file to sources file Contains board specific AC97 CODEC driver implementation Codec vendor specific register handlers Codec specific initialization routines Codec specific volume, sample format and power handlers 38

Device Drivers Touch-screen Create new cust_board.cpp file similar to kev_board.cpp file in WINCE500\PLATFORM\CUSTLH7A404\SRC\DRIVERS\TOUCH directory. Add the new file to sources file Contains board specific implementation Change initialization routine based on 4-wire or 5-wire touch screen used on the device Add other routines to handle any other Analog-to-digital-converter functions implemented on board. Check firefly_board.cpp file as an example to see how ambient light sensor and battery monitor ADC functions are implemented. 39

Modifying run-time image configuration files Update WINCE500\PLATFORM\LH7A404\FILES\config.bib with on board SDRAM sizes & planned OS image sizes. Update WINCE500\PLATFORM\LH7A404\FILES\platform.bib with any new on board driver files. Update WINCE500\PLATFORM\LH7A404\FILES\platform.reg with any board specific changes to various driver registry values. 40

References Platform Builder 5.0 Help Windows Embedded CE How-tos and Tutorials http://msdn2.microsoft.com/en-us/embedded/aa731296.aspx Big Book of BSP http://channel9.msdn.com/wiki/default.aspx/cedeveloper.windowsceb SP 41

42