July 2009 Developing i.mx Multimedia Applications Processors with Windows Embedded CE 6.0 WinCE 6.0 on the i.mx25 and i.mx35 PDK s Eric Gregori Sr. Software Specialist
Class Abstract This presentation will cover using and developing for WinCE6.0 on the i.mx25 and i.mx35 PDK platforms. i.mx25pdk i.mx25 ARM9 Processor 5.7 VGA display 128MB DDR2 256MB NAND Flash i.mx35pdk i.mx35 ARM11 Processor 7 WVGA display 256MB DDR2 2G NAND Flash 64MB NOR Flash 1
i.mx25pdk features i.mx25 Processor Freescale PMIC MC34704 128MB DDR2 256MB NAND Flash 5.7 VGA display Touch screen support CMOS image sensor CAN connector USB ports SD card interface 2
i.mx25pdk Block Diagram 3
i.mx35 PDK Features 4
i.mx35pdk Block Diagram 5
Links for details on i.mx25 or i.mx35 SOC s www.freescale.com/imx35pdk www.freescale.com/imx25pdk On these Landing pages you can get access to the SOC ( System On a Chip ) reference manuals, PDK reference manuals, BSP s, Schematics, 6
www.freescale.com/imx35pdk 7
www.freescale.com/imx35pdk 8
www.freescale.com/imx35pdk 9
WIN60DOCS_BUNDLE Freescale BSP s ( both Linux and WinCE60 ) are very well documented. CE Fundamentals ebook introduction to WinCE6.0 Reference Manual a BSP reference manual providing a chapter for every device driver, and details on the overall BSP. User Guide A quick start guide for the BSP and PDK. Release Notes Release notes for the BSP 10
BSP Reference Manual A chapter for each driver 11
BSP Reference Manual 12
Getting up and running with WinCE6.0 is as easy as ordering a kit The i.mx25pdk and i.mx35pdk hardware support either Linux or WinCE ( the hardware is the same ). The board can be ordered pre-loaded with either a Linux or WinCE6.0 BSP. The WinCE6.0 pre-loaded BSP Using the pre-loaded BSP you can develop applications and download them via activesync. The pre-loaded BSP includes our ARM11 optimized (for the i.mx35) Audio/Video/Image CODEC s. 13
Pre-Loaded WinCE6.0 BSP Features ( i.mx35 ) Audio Player Demo Test: proper playback for 2 minutes per stream MP3 AAC ACCPlus WMA Video/Audio Player Demo Test: proper playback for 2 minutes per stream avi (H.264+MP3), (MPEG4+MP3) mp4 (H.264+AAC), (H.264+MP3), (MPEG4+MP3), (MPEG4+AAC) asf (WMV+WMA) PCM encoding Demo: encode 30 seconds stream from WAV file MP3 WMA8 Picture Viewer BMP GIF JPEG PNG Drivers ASRC Audio (SGTL5000) Camera CSPI1 WVGA ESAI I2C1 MCU SDHC1 IPU Backlight MC13892Touch USB OTG USB Host ATA NAND Storage 14
HAB High Assurance Bootloader What do you do if you have a Linux PDK that you want to Flash With WinCE6.0? What do you do if the board is accidently bricked? Answer: Freescale provides a free bootloader programmed into ROM on all i.mx parts since the i.mx21. Freescale provides a free Windows tools for flashing, or downloading into RAM. 15
ATK + HAB = Solution for Quick Prototyping Using the ATK + HAB solution you can: Program NAND Program NOR Download to RAM Execute out of RAM or FLASH Program custom NAND Program custom FLASH Configure Custom RAM This allows you to flash a board with WinCE6.0 or Linux using only a Windows host and the free ATK tool from Freescale. Platform builder, or a Linux host ( for Linux ) is NOT required! 16
ATK + HAB = Solution for Low-Cost Prototyping Flashing a board with WinCE6.0 is as easy as 1,2,3 1. Download and install the ATK and BSP binaries. www.freescale.com/imx35pdk 2. Configure the PDK for HAB boot 3. Use the ATK to flash the board with the BSP binaries. 17
The BSP User Guide walks you through the Steps 18
ATK Screen Shots 19
Additional Information In addition to the User Guide you can download a complete pictorial on flashing the PDK with WinCE6.0 using the ATK from here: www.emgrobotics.com/imx35_wince_flashing.pdf 20
Using the WinCE6.0 BSP Source To build your own BSP, you will need Platform Builder from Microsoft. With WinCE6.0, Platform builder is a plug-in for Visual Studio 2005. When you buy Platform Builder you will also get Visual Studio 2005. A six month free trial of Platform Builder and Visual Studio 2005 is available from Microsoft, and comes as a DVD with the WinCE versions of the i.mx25 of i.mx35 PDK s. The BSP source can be downloaded from www.freescale.com/imx35pdk. It is downloaded as a msi files, and should be installed on your host. 21
After installing Visual Studio 2005 + Platform Builder The following must be installed in order to create and debug a Windows Embedded CE 6.0 BSP Environment for i.mx25/i.mx35 3-Stack WinCE 6.0 BSP: 1. Visual Studio 2005 2. Visual Studio 2005 SP1 3. Visual Studio 2005 SP1 Update for Vista (if applicable) 4. Windows Embedded CE 6.0 Platform Builder 5. Windows Embedded CE 6.0 SP1 (required if PB 6.0 Tools have been installed) 6. Windows Embedded CE 6.0 R2 7. Windows Embedded CE 6.0 Platform Builder Cumulative Product Update Rollup Package (through 12/31/2008) 8. Windows Embedded CE 6.0 Monthly Update (January 2009) 9. Windows Embedded CE 6.0 Monthly Update (February 2009) 22
The BSP project file We created a bas project for your BSP. You can start with this project by clicking on the.sln file. Then you can add or subtract to the project depending on your needs. 23
Getting the Catalog Items view to show up View -> Other Windows -> Catalog 24
Visual Studio 2005 with Platform Builder 25
Close-up of Catalog Items 26
BSP Contents and Organization The Freescale BSP is a collection of code and support files that can be integrated into the Microsoft Platform Builder development environment to create Windows Embedded CE 6.0 OS images for the i.mx25 3-Stack-based platforms. A BSP contains the following elements: Boot loader for downloading OS images OEM Adaptation Layer (OAL) for providing the kernel hardware interface Device drivers to support on-chip and on-board peripherals Image configuration and build files The BSP includes a set of directories and files that are installed into an existing Windows Embedded C 6.0 source tree. The BSP directory structure follows the production-quality OAL (PQOAL) and production-quality drivers (PQD) structure recommended by Microsoft. The i.mx25 3-Stack system-on-a-chip (SoC) leverages a common Freescale ARMbased platform architecture. This platform is found in a series of ARM-based SoCs available from Freescale. In order leverage source code that is portable across multiple Freescale ARM-based SoCs, a common directory called COMMON_FSL_V2 is used to store shared OAL and driver components. 27
Production Quality Driver (PQD) Windows Embedded CE 6.0 supports PQD components that simplify and shorten the process of developing a Driver. For more information on PQQL development concepts, refer to the topic Production-Quality Drivers in the Windows Embedded CE 6.0 Help. The following directories contain the SOC driver source code for the i.mx25 3-Stack: WINCE600\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V2 WINCE600\PLATFORM\COMMON\SRC\SOC\MX25_FSL_V2 SOC code in the COMMON_FSL_V2 directory is reusable across all Freescale ARM-based SoCs. SOC driver code in the MX25_FSL_V2 directory is reusable across all platforms based on i.mx25 3-Stack. 28
Production Quality OAL (PQOAL) Windows Embedded CE 6.0 supports PQOAL components that simplify and shorten the process of developing an OAL. For more information on PQOAL development concepts, refer to the topic Production-Quality OAL in the Windows Embedded CE 6.0 Help. Where possible, the Freescale BSP leverages the PQOAL architecture and components provided by Microsoft to reduce the OAL code that needs to be modified and maintained by the OEM. In addition, PQOAL components customized for the i.mx25 3-Stack are available in the following directories: WINCE600\PLATFORM\COMMON\SRC\SOC\COMMON_FSL_V2\OAL WINCE600\PLATFORM\COMMON\SRC\SOC\MX25_FSL_V2\OAL PQOAL code in the COMMON_FSL_V2\OAL directory is reusable across all Freescale ARM-based SoCs. PQOAL code in the MX25_FSL_V2\OAL directory is reusable across all platforms based on i.mx25 3-Stack. 29
i.mx25 3-Stack Platform Files The i.mx25 3-Stack BSP provides direct support for the interfaces and peripherals found on the i.mx25 3-Stack board. All of the driver and OAL content that is specific to the underlying hardware platform is located in the following directory: WINCE600\PLATFORM\iMX25-3DS The i.mx25 3-Stack platform directory implements the hardware abstraction routines invoked by driver code in the Freescale SOC directory. In addition, this directory implements certain aspects of the PQOAL that may need to be modified by the OEM for their specific platform. 30
WinCE6 Block Diagram OAL Platform SOC 31
Sample Applications CAMAPP TVIN TVOUT OWIRETest SIMapp Sample Camera Application Sample TVIN display / snapshot application Demonstrates how to setup hardware for TVOUT Sample One Wire Driver Application Demonstrates how to read SIM card 32
Driver TEST Application CANBUS CSPI I2C ASRC Connect 2 i.mx35 together and they communicate via CAN. Demonstrates how to use the CAN driver. Demonstrates how to use the SPI driver. Demonstrates how to use the I2C driver. Simple WAV file player. 33
DEMO: i.mx35pdk running WinCE6.0 34
WinCE Computer Vision 35
Q&A Thank you for attending this presentation. We ll now take a few moments to review the audience questions, and then we ll begin the question and answer session. 36