AM18x/OMAP-L138 WinCE BSP Quick Start Guide

'''  Content is no longer maintained and is being kept for reference only! '''



Introduction
This is the Quick Start Guide for the Windows Embedded CE 6.0 BSP for the Texas Instruments OMAP-L138 and AM18x processor. The BSP has been designed to run on the Zoom™ OMAP-L138 / AM1808 Development Kit produced by the Logic Product Development Company.

For information on the functionality and features provided in the BSP see the ARM9 WinCE BSP User Guide.

'''Note: In this document, the term "OMAP-L138 Development Kit" or "OMAP-L138 Kit" always refers to either an OMAP-L138 Evaluation Module (EVM) or eXperimenter Kit. The term "AM1808 Development Kit" or "AM1808 Kit" always refers to an AM1808 eXperimenter Kit. When there is no danger of confusion, the term "Development Kit" or just "Kit" refers to one of the above development kits.'''

Important: For release BSP_WINCE_ARM9_01_10_00, please see section " BSP Source Code Installation " on this page for update information before compiling the BSP.

Scope
This document describes how to install, build and configure the BSP for the Texas Instruments OMAP-L138 and AM18x processor. Further information on Windows CE development can be found on the Microsoft website.

Windows Embedded CE Developer Centre:

http://msdn.microsoft.com/en-us/windowsembedded/ce/default.aspx

Windows Embedded CE 6.0 Technical Documentation:

http://msdn.microsoft.com/en-us/library/ee504799.aspx

To jumpstart Windows CE design, use the Windows CE installation CD included in the development kit. You can also use the Windows CE evaluation tool kit available via web download from Microsoft http://www.microsoft.com/windowsembedded/en-us/products/windowsce/default.mspx.

Hardware
To use the BSP you will require the following hardware:


 * Zoom™ OMAP-L138/AM1808 Development Kit or OMAP-L138/AM1808 eXperimenter Kit. Available from Logic PD (http://www.logicpd.com/).
 * Logic PD 4.3" WQVGA Display Kit (optional)
 * UART expansion board (optional). Available from Mistral Solutions Pvt. Ltd
 * Development PC with the following minimum system requirements:
 * 1 GHz processor; 2 GHz recommended
 * 1 GB of RAM
 * Microsoft Windows XP Professional Service Pack 2 (English or Japanese recommended) or Windows Vista
 * 18 GB of available space required on installation drive
 * 1 GB of available space required on system drive
 * DVD-ROM Drive
 * Display monitor that supports 1024 x 768 high color or better
 * Keyboard and Microsoft mouse or compatible pointing device

Software
The following development tools and versions are recommended for building the BSP:


 * Microsoft Visual Studio 2005 Professional Edition
 * Microsoft Visual Studio 2005 Professional Service Pack 1
 * Microsoft Visual Studio 2005 Professional SP1 Update for Vista (if applicable)
 * Windows Embedded CE 6.0 Platform Builder
 * Windows Embedded CE 6.0 Service Pack 1
 * Windows Embedded CE 6.0 R2
 * Windows Embedded CE 6.0 R3
 * Windows Embedded CE 6.0 Cumulative Product Update Rollup Package (through 12/31/2009)
 * Windows Embedded CE 6.0 Monthly Updates (May 2010 onwards)
 * Serial Terminal application (e.g. Tera Term Pro Web v3.1.3 or HyperTerminal)

Follow the installation instructions included in the Development Kit to install the software from the Windows CE installation CD [Under Construction]

If an installation CD is not available, a Windows Embedded CE 6.0 Trial download and the required updates can also be found from Microsoft:

http://www.microsoft.com/windowsembedded/en-us/products/windowsce/default.mspx

Development Kit Setup
Set up the Development Kit as described in the Quick Start Guide supplied with the board (reference 2). The minimum set up required is:


 * OMAP-L138/AM1808 SOM-M1 plugged into the base board (do not use the TMS320C6748 SOM-M1)
 * Null-modem serial cable connected to the Kit and the development PC
 * Ethernet cross over cable connected to the Kit and the development PC (or both the Kit and PC connected to a switch via standard Ethernet cables)
 * 5V power supply connected to the Kit and the mains supply
 * All DIP switches in banks S2 and S7 switched to the off position

USB Hardware
USB client devices such a mouse, keyboard or flash drive can be attached directly to the Kit via the full speed USB 1.1 port (J27). To attach client devices via the USB OTG high speed port (J6) you will require:


 * USB type A socket to mini-A plug (the mini-A plug has the ID pin grounded).

To attach the Kit to a PC (for ActiveSync for example) the OTG port (J6) can be used with the following cable:


 * USB A plug to mini-B plug (suitable cable is supplied with the Kit)

Audio Hardware
To use the audio features in the BSP you will require the following hardware connected to the 3.5mm audio jacks:


 * Line in source (some microphones may not work) – LINE IN (J11)
 * Headphones / speakers – LINE OUT (J12)

SD/MMC Cards
The SD card driver in the BSP supports use of SD cards (including high capacity cards) and MMC cards. The card slot can be found on the underside of the Kit base board (J14).

Display Hardware
The BSP supports the following display hardware:


 * Hantronix 24x2 HDM24216L-2-L30S character mode LCD, available on the UI Board supplied in the Kit Development Kit
 * Sharp TFT-LCD LQ043T1DG01, available as the 4.3" WQVGA Display Kit from Logic Inc

Attach the UI Board or Display Kit as described in the Quick Start Guide supplied with the board.

Note: Only one display device can be supported at one time.

PWM Hardware
The BSP contains a driver and sample application for the Pulse Width Modulator peripheral. The PWM peripheral pins can be accessed via the J30 connector on the base board.

UPP Hardware
The BSP contains a sample application and Universal Parallel Port driver that can communicate with the A/D and D/A chips on the UI Board supplied in the Kit Development Kit. To use this functionality the UI Board should be attached to the base board as described in the Kit Quick Start Guide.

NAND Hardware
To use the NAND features in the BSP you will need to attach the UI Board supplied in the Kit Development Kit to the base board, as described in the Kit Quick Start Guide.

The UI Board NAND socket should be populated with the following NAND chip:


 * Micron Technologies MT29F4G08AAC Flash

PRU Soft UART
The BSP supports PRU Soft UART serial ports by attaching the UART expansion board to the 'Audio Expansion' connector on the base board.

Tools Setup
Connect the development PC to the Kit using the serial cable and configure your chosen serial terminal application for 115200 baud, 8 data bits, 1 stop bit, no parity:



IMPORTANT: If you have other development tools installed on your PC check that they have not defined environment variables that may conflict with VS2005. For example, check if MAKEFLAGS or INCLUDES have been defined and un-define them before starting VS2005.

BSP Source Code Installation
Extract the BSP source code from the release installation file. By default, the BSP source code is extracted to C:\TI\BSP_WINCE_ARM9_XX.YY.ZZ\ (where XX.YY.ZZ is the version number)

Important: If you installed release BSP_WINCE_ARM9_01_10_00, please follow these 2 steps to update the BSP before continuing: 1. In files PLATFORM\OMAPL138_AM18X\FILES\platform.bib and PLATFORM\OMAPL137_AM17X\FILES\platform.bib uncomment the following lines ;IF BSP_PRU ;ENDIF BSP_PRU to become IF BSP_PRU ENDIF BSP_PRU 2. In directories PLATFORM\OMAPL137_AM17X\SRC\DRIVERS\PRU\firmware\ and PLATFORM\OMAPL138_AM18X\SRC\DRIVERS\PRU\firmware\ create an empty "bin" directory  

Move the OS designs and BSP platform files into the relevant locations for Windows Embedded CE 6.0:

Move extracted folder:   PLATFORM\OMAPL138_AM18X To:   C:\WINCE600\PLATFORM\

Move extracted folder:   PLATFORM\COMMON\SRC\SOC\OMAPL13X_TI_V1 To:   C:\WINCE600\PLATFORM\COMMON\SRC\SOC\

Move extracted folders:  OSDesigns\OMAPL138_AM18X_SAMPLE OSDesigns\OMAPL138_AM18X_TI_DEFAULT To:  C:\WINCE600\OSDesigns\

Once the BSP is installed the WINCE600 folder tree should look something like this (installed folders arrowed):



BSP Build Notes
Before building and running an OS design there are some checks and configuration changes you may wish to make:


 * TCP/IP settings – The BSP ships with TCP/IP settings for the VMINI and NDIS drivers with DHCP enabled. This can be changed to match your local network configuration, to use static IP addresses for example. See the VMINI and NDIS Ethernet configuration sections below for details of how to change IP settings.
 * Console access – Windows CE does not provide a shell on the UART but you can telnet to the target to get a text console. See the Telnet and FTP section below for details on enabling telnet support.

Building an OS Design
The BSP comes with two OS Designs:


 * OMAPL138_AM18X_SAMPLE – Includes some of the more commonly used CE 6.0 components and support for the peripherals on the Kit.
 * OMAPL138_AM18X_TI_DEFAULT – Includes the Silverlight demos, Windows Media Player and Internet Explorer (see the Demo OS Design section below for more details)

In Visual Studio 2005, open the solution file for the OS design you wish to build. For example:

C:\WINCE600\OSDesigns\OMAPL138_AM18X_SAMPLE\OMAPL138_AM18X_SAMPLE.sln

Before building the BSP the SOC type needs selecting in the catalog. The catalog can be seen by selecting the Catlog Items View tab in VS2005, or selecting View &gt; Other Windows  &gt; Catalog Items View. Expand the catalog tree under:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ SOC Type

Select the SOC type that matches the Kit you will be running the OS image on.

Select a release build by selecting menu option Build &gt; Configuration Manager and selecting OMAPL138_AM18X ARMV4I Release as the Active solution configuration:



To build the OS design select menu option Build &gt; Rebuild Solution. This will build an EBOOT boot-loader image and a CE 6.0 OS image.

Running OS Designs
This section describes how to boot using the Serial Flash on the Kit base board. For details of booting from NOR, NAND or SD card see the User Guide.

Flashing EBOOT to Serial Flash
A new EBOOT image can be flashed to the Kit using the sfh_OMAP-L138.exe tool, which is included in the BSP.

1. Perform a Release build of an OS design, as described above.

2. Connect the development PC serial port to the Kit UART (serial cable is supplied with the Kit). Close your serial terminal application.

3. Set the Kit DIP switches S7-7 and S7-8 to ON and all others to OFF.

4. Open a Windows Command Prompt (cmd.exe)

5. Change directory to the EBOOT tools area: cd C:\WINCE600\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

6. Copy the new EBOOT image to the tools area: copy C:\WINCE600\PLATFORM\OMAPL138_AM18X\target\ARMV4I\retail\EBOOTSPIFLASH.nb0 .

7. Run the flash tool to erase the Serial Flash (change COM port if required): sfh_OMAP-L138.exe -erase -p COM1

8. Power on or reset the Kit. You should see progress being reported, wait until it completes.

9. Run the flash tool to write an appropriate UBL and EBOOT to Serial Flash (change COM port if required). sfh_OMAP-L138.exe -flash -p COM1 -appStartAddr 0xc7f60000 -appLoadAddr 0xc7f60000 [spi-ubl] EBOOTSPIFLASH.nb0

where spi-ubl is:

a. For BSP 01.00.02 and later releases

arm-spi-ais.bin for OMAP-L138 arm-spi-ais-456mhz.bin for AM1808

b. For BSP 01.00.01 and earlier releases

ubl_OMAPL138_SPI_MEM.bin for OMAP-L138 ubl_AM1808_SPI_MEM.bin for AM1808

10. Power on or reset the Kit. You should see progress being reported, wait until it completes.

11. Power off the Kit and set DIP switches S7-7 and S7-8 to OFF.

12. Start your serial terminal application (115200 baud, 8bit, no parity, 1stop).

13. Power on the Kit and check that the new EBOOT image boots

The EBOOT start-up should look something like this:



If the serial output is garbled check the baud rate setting in your terminal application (should be 115200 baud) and check that the correct SOC Type is selected in the catalog (see the OS design building section above).

For more information and the latest version of the sfh_OMAP-L138.exe tool see Serial Boot and Flash Loading Utility for OMAP-L138

Configuring EBOOT
Once EBOOT is flashed and running you can configure the bootloader settings. Use your serial terminal application (115200 baud, 8bit, no parity, 1stop) to access the EBOOT menus by pressing SPACE when EBOOT is booting. Use the Network Settings menu to configure the Ethernet download settings:

1. KITL state – enable this

2. KITL interrupt mode – check that this is set to interrupt

3. DHCP mode – enable or disable as required

4. IP address and mask – must be on the same subnet as the PC

5. VMINI – enable this if using KITL

6. MAC address – enter the MAC printed on the EVM base board (for BSP 01.00.01 and earlier releases only, for later releases, MAC address is read from EEPROM on board during boot up)

A typical configuration used during development is:

Boot: Boot delay .............. 3 Boot device ............. EMAC Debug device ............ EMAC Clean Boot .............. No Write RAM NK to flash: .. No Device ID String ........ (not specified) Allow DSP to Boot: ...... No

Network: KITL state .............. enabled KITL mode ............... interrupt DHCP .................... enabled MAC address ............. 00:08:ee:03:67:d0 IP address .............. 192.168.0.2 IP mask ................. 255.255.255.0 IP router ............... 0.0.0.0 VMINI ................... enabled

When configuration is complete it is recommend that the settings are saved to flash. Setting can be saved using main menu option 6.

Notes:

1. It is recommended that you run KITL in interrupt mode as this gives much faster boot and debug response times than polled mode.

Booting the Kernel
Once EBOOT is configured a CE image can be downloaded as follows:

1. Exit the EBOOT menus (main menu option 0) or reset the Kit and allow EBOOT to enter auto-download

2. In VS2005 select menu option Target &gt; Connectivity Options

3. Set Target Device to CE Device

4. Set Download to Ethernet

5. Set Transport to Ethernet

6. Set Debugger to KdStub

7. Click on Core Service Settings and check that Enable KITL on boot device is enabled.

8. Click on Kernel Service Map to return to the download settings.

9. Click on the Download Settings button. You should see the Kit ID listed in the active target devices (if not, power cycle the Kit and check that EBOOT is sending BOOTME packets), click on the Kit entry to select it and return to the connectivity options.

10. The connectivity dialog should now look something like this:



11. Close the connectivity option dialog

12. Select menu option Target &gt; Attach Device

13. VS2005 should open an OS image download dialog and perform the download. If the download does not start power cycle the Kit and check that EBOOT is sending BOOTME packets.

14. The CE image should run when download is complete.

Note: The VS2005 image download does not always "sync" with the Kit. If the download is not starting try repeating the steps above (particularly step 9). Restarting VS2005 after changing the settings can also help.

Creating and Using a Bootable SD Card (OMAP-L138 Kit Only)
A bootable SD card containing the EBOOT and CE image can be used to start and run the CE image on an OMAP-L138 Kit.

Creating Bootable SD Card
A bootable SD card containing the EBOOT and CE image can be created as follows:

1. Perform a Release build of an OS design, as described above.

Note: If you have the Demo release installed, you can skip this step and replace the files in the following steps by those from the Demo release. Eboot tools area will be the directory where you find diskman.exe in the Demo release installation

2. Copy the new EBOOT image and CE image to the EBOOT tools area:

copy C:\WINCE600\PLATFORM\OMAPL138_AM18X\target\ARMV4I\retail\EBOOTSPIFLASH.nb0 C:\WINCE600\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

copy C:\WINCE600\PLATFORM\OMAPL138_AM18X\target\ARMV4I\retail\NK.nb0 C:\WINCE600\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

3. Change directory to the EBOOT tools area:

cd C:\WINCE600\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

4. Insert a SD card into a Windows PC (may need to use an USB card reader) and notice the drive letter that corresponds to the inserted SD card.

'''WARNING!!! Back up the contents of the SD card before proceeding. The SD card will be erased and re-formatted in next step.'''

5. Execute the diskman.exe command to copy the EBOOT and CE image from C:\temp to the card:

diskman.exe createbootdisk &lt;sd card drive letter (no ':')&gt; .\NK.nb0 .\EBOOTSPIFLASH.nb0

6. Follow instructions on screen. Click “OK” when asked to format the card and “Close” the dialog after formatting finished. 7. The diskman.exe utility creates two partitions, a RAW partition and a FAT32 partition, on the SD card. The EBOOTSPIFLASH.nb0 is saved in the RAW partition and the CE image is saved in the FAT32 partition. Only the CE image in the FAT32 partition will be shown when the SD card is examined in Windows Explorer. 8. If needed, save additional files to the SD card by drag and drop to the FAT32 partition as usual.

Using Bootable SD Card
1. Connect the development PC serial port to the OMAP-L138 Kit UART (serial cable is supplied with the Kit). Close your serial terminal application.

2. Set the Kit DIP switches S7-7 and S7-8 to ON and all others to OFF.

3. Open a Windows Command Prompt (cmd.exe)

4. Change directory to the EBOOT tools area:

cd C:\WINCE600\PLATFORM\OMAPL138_AM18X\SRC\BOOT\TOOLS\bin

Note: If you have the Demo release installed, Eboot tools area will be the directory where you find diskman.exe in the Demo release installation and you can replace the files in the following steps by those from the Demo release.

5. Run the flash tool to erase the Serial Flash (change COM port if required):

sfh_OMAP-L138.exe -erase -p COM1

6. Power on or reset the Kit. You should see progress being reported, wait until it completes.

7. Run the flash tool to write the UBL to Serial Flash (change COM port if required).

sfh_OMAP-L138.exe -flash_noubl -p COM1 arm-mmcsd-ais.bin

8. Power on or reset the Kit. You should see progress being reported, wait until it completes.

9. Power off the Kit and set DIP switches S7-7 and S7-8 to OFF.

10. Start your serial terminal application (115200 baud, 8bit, no parity, 1stop).

11. Insert the bootable SD card created in last section.

12. Power on the Kit and check that the EBOOT image and then the CE image boots.

CE 6.0 Catalog
OS designs are customised by selecting components from the CE 6.0 catalog. The catalog can be seen by selecting the Catlog Items View tab in VS2005, or selecting View &gt; Other Windows  &gt; Catalog Items View:



The catalog is divided into the following sections:


 * BSP – Contains reference BSPs shipped with CE 6.0. You do not generally need to select anything in this section.
 * Core OS – Contains the standard CE 6.0 components. The CE 6.0 features you wish to use in your OS design are selected from this section.
 * Device Drivers – Contains drivers for some commonly used hardware components.
 * Third Party – Contains BSPs not shipped with CE 6.0, such as the OMAP-L138 BSP.

The sections below describe which catalog components need selecting to support particular features or functionality of the OMAPL138/AM1808 Kit.

OS Build Caveats
When Core OS or Device Drivers catalog selections are changed in an OS design you need to perform a clean and full rebuild. This can be done using the build menu in VS2005 by select Clean Solution followed by Rebuild Solution. This should ensure that the correct image is built.

If you change just OMAPL138_AM18X BSP catalog selections (under Third Party \ BSP \ OMAPL138_AM18X) it is usually possible to rebuild just the BSP (menu option Build &gt; Advanced Build Commands  &gt; Rebuild Current BSP and Subprojects). Be warned though that this does not always rebuild every part of the BSP that is affected by the catalog change. If you see unexpected build or run time issues then perform a clean and full rebuild as described above.

BSP Component Conflicts
Due to the extensive SOC pin multiplexing and the Kit design there are some BSP component combinations that are not supported. When customising an OS design the following component conflicts should be observed:


 * Only one display driver can be included in an OS design (the catalog supplied with the BSP enforces this).
 * Cannot include both an LCD driver and the UPP driver.
 * Cannot include both the SDHC driver and the NAND flash driver.

KITL Configuration
KITL over Ethernet is supported by the BSP. Enabling KITL in an OS design enables development tools such as the Target Control and the Kernel Debugger to be used. KITL and the kernel debugger are enabled via the project properties:

Project &gt; Properties  &gt; Configuration Properties  &gt; Build Options

KITL and the Kernel Debugger can be enabled or disabled for both Debug and Release builds.

Rebuild the BSP after changing build options.

VMINI Network Configuration
The virtual network miniport (VMINI) debug-to-NDIS bridge enables the KITL Ethernet support to be used at the product/OS level (for Winsock TCP/IP, etc).

To use VMINI first enable KITL as described above. Enable VMINI in EBOOT (network settings menu, option 8) and save the settings (main menu, option 6).

In your OS design make sure that SYSGEN_ETHERNET is selected. This appears in the catalog as:


 * Core OS \ CEBASE \ Communication Services and Networking \ Networking - Local Area Network (LAN) \ Wired Local Area Network (802.3, 802.5)

VMINI network settings can be configured in the registry. By default VMINI is configured to use DHCP to obtain an IP address at boot time. Alternatively a static IP address can be configured via the platform.reg file:

C:\WINCE600\PLATFORM\OMAPL138_AM18X\FILES\platform.reg

Find the VMINI TCP/IP section:

 [ HKEY_LOCAL_MACHINE\Comm\VMINI1\Parms\Tcpip ] 

Enable/disable DHCP as required and change the IP settings appropriately for your LAN.

NDIS Ethernet Configuration
The NDIS Ethernet driver can be included in an OS Design if KITL is disabled (the VMINI driver can be used when KITL is enabled). KITL can be disabled as described in the ’ KITL Configuration ’ section above.

The TCP/IP settings for the driver are configured in a similar way to the VMINI settings. Edit the platform.reg file:

C:\WINCE600\PLATFORM\OMAPL138_AM18X\FILES\platform.reg

Find the NDIS driver section:

 [ HKEY_LOCAL_MACHINE\Comm\EMAC1\Parms\TcpIp ] 

Change the IP settings appropriately for your LAN.

Enabling the Remote Display
It is possible to attach an LCD display and USB mouse and keyboard but it can also be useful to develop without having to set up this additional hardware. Windows CE 6.0 includes remote display capability that enables the CE screen to be viewed on a PC and for mouse and key presses to be sent from the PC back to the CE device.

There are two different ways to enable this remote display functionality, depending on whether you include a display driver in the OS build or not.

When the OS design does not include the WQVGA display driver the remote display capability can be enabled as follows:


 * Set BSP_DISPLAY_CER=1 in the OMAPL138_AM18X\OMAPL138_AM18X.bat file. This will include a remote display driver in the OS build that will provide a 640x480 colour desktop.

When the OS design does include the WQVGA display driver the remote display capability can be enabled as follows:


 * Navigate to and select the following item in the catalog: Core OS \ CEBASE \ Core OS Services \ Debugging Tools \ Remote Display Application

The OS will need TCP/IP communications so configure the VMINI or NDIS networking configuration as described in the sections above. Build the OS image and download it in the normal way.

If using the second option above the remote display application needs starting:

1. With KITL enabled, open the Target &gt; Target Control and start the CERDISP application with the command: s cerdisp –c

2. Without KITL enabled, telnet to the platform and start the CERDISP application with the command: start cerdisp –c

To use the remote display capability from the development PC:

1. Run the remote display viewer/host on the PC: C:\WINCE600\PUBLIC\COMMON\OAK\BIN\I386\cerhost.exe

2. Connect to the Kit (File &gt; Connect)

3. If you do not see the device listed on the connect dialog then check your VMINI settings, DHCP server settings or try a static IP address.

Telnet and FTP Support
Telnet and FTP servers can be added to an OS design by selecting the following items in the catalog:


 * Core OS \ CEBASE \ Communication Services and Networking \ Servers \
 * Telnet Server
 * FTP Server

USB Host Support
To add support for a USB mouse and keyboard select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ USB \ USB Host
 * Core OS \ CEBASE \ Core OS Services \ USB Host Support \
 * USB Host Support
 * USB Human Input Device (HID) Class Driver
 * USB Human Input Device (HID) Class Driver \ USB HID Keyboard and Mouse

If you want to add USB flash drive support add:


 * Core OS \ CEBASE \ Core OS Services \ USB Host Support \ USB Storage Class Driver
 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \ FAT File System

Rebuild the OS design after changing catalog selections.

The mount point for USB mass storage devices can be changed by adding the following registry entry to the OMAPL138_AM18X\FILES\platform.reg file:

 [ HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\USBHDProfile ] 

"Folder"="HardDisk"

This will tell the Storage Manager to mount a flash drive in the ’ \HardDisk ’ folder.

Note: The USB OTG controller in the SOC supports up to 4 IN and 4 OUT USB endpoints. This limits the number of devices that can be used simultaneously. A hub will typically use 1 IN endpoint, a mouse and keyboard 1 IN each and a flash drive 1 IN and 1 OUT. So it may not be possible to use a large number of devices at the same time.

USB Function and ActiveSync Support
To add support for ActiveSync over USB select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ USB \ USB Function
 * Device Drivers \ USB Function \ USB Function Clients \ Serial
 * Core OS \ CEBASE \ Applications - End User \ ActiveSync
 * Core OS \ CEBASE \ Communication Services and Networking \ Networking - WAN \ Dial Up Networking \ Autodial
 * Core OS \ CEBASE \ Communication Services and Networking \ Networking - WAN \ Telephony API (TAPI 2.0)
 * Core OS \ CEBASE \ Shell and User Interface \ Shell \ Graphical Shell \ Standard Shell
 * Core OS \ CEBASE \ Shell and User Interface \ User Interface \ Network User Interface

Rebuild the OS design after changing catalog selections.

The desktop Windows version of ActiveSync can be downloaded from the Microsoft website.

Note: If you wish to run CETK or the remote applications over ActiveSync (rather than a KITL connection) you may need to duplicate the following directory:

C:\Program Files\Common Files\Microsoft Shared\Windows CE Tools\Platman\target\wce600\armV4i

to a directory called "armV4" in the same location.

NAND Support
To add support for the NAND flash and TFAT file systems, select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ Storage Devices \ MT29F4G08AAC NAND Flash
 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \ FAT File System
 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \ Transaction-Safe FAT File System (TFAT)

If your OS design includes a graphical shell you can also include:


 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \ Storage Manager Control Panel Applet

The NAND flash can be partitioned and formatted using the storage manager control panel applet.

The mount point for the NAND flash can be changed by editing the following registry entry in the OMAPL138_AM18X\FILES\platform.reg file:

 [ HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\NandFlashDisk ] 

"Folder"="NANDFlash"

This will tell the Storage Manager to mount a the NAND in the ’ \NANDFlash ’ folder.

UART Support
Support for each of the three serial UART modules can be added by selecting the following items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ Serial \ UARTx (COMy)

NOTE: The default pin multiplexing settings in the BSP enable only UART 2 to be used.

NOTE: When a serial driver for UART 2 is included in an OS design the OAL debug output is disabled.

PRU Soft UART Support
Support for upto four Soft UARTs can be added by selecting the following items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ PRU \ PRU Software UART
 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ PRU \ PRU Software UART \ Use McASP1 Serializers
 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ Serial \ Soft UARTx (COMy)

Where [Soft UARTx] is one of 0/1/2/3, and [COMy] is one of 4/5/6/7

Note: The PRU Soft UARTs use McASP0 serializers to transmit and receive data on the AM18X / OMAPL-138 EVM.

Note: Only Soft UARTs 0/1/2 are physically connected to the UART Expansion Board.

Note: Audio and McBSP drivers must not be selected at the same time as the PRU Soft UART because they all share the same McASP0 pins. The BSP will fail to build if a conflict occurs.

SD/MMC File System Support
To add support for the SD/MMC slot, select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ SD MMC Card \ SD Host Controller
 * Device Drivers \ SD \ SD Bus Driver
 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \
 * exFAT File System
 * FAT File System

If your OS design includes a graphical shell you can also include:


 * Core OS \ CEBASE \ File Systems and Data Store \ Storage Manager \ Storage Manager Control Panel Applet

SD/MMC cards can be partitioned and formatted using the storage manager control panel applet.

The mount point for SD and MMC cards can be changed by adding the following registry entries to the OMAPL138_AM18X\FILES\platform.reg file:

 [ HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\MMC ] 

"Folder"="MMCCard"

 [ HKEY_LOCAL_MACHINE\System\StorageManager\Profiles\SDMemory ] 

"Folder"="SDCard"

Audio Support
To add support for the audio codec, select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ Audio \ AIC3106 Audio Codec

Support for encoded media file playback (e.g. MP3, WMA) and the CE Media Player can be added to an OS design by selecting these items in the catalogue:


 * Core OS \ CEBASE \ Graphics and Multimedia Technologies \ Media \
 * DirectShow \ DirectShow Core
 * Media Formats \ MPEG-1 Parser/Splitter
 * Audio Codecs and Renderers \ Waveform Audio Renderer
 * WMA and MP3 Local Playback
 * Windows Media Player \ Windows Media Player

The graphical shell also needs to be included in order to use the CE Media Player application:


 * Core OS \ CEBASE \ Shell and User Interface \ Shell \ Graphical Shell \ Standard Shell

VPIF Support
To add support for vpif, select these items in the catalog:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \ Camera\VPIF Capture Driver
 * Core OS \ CEBASE \ Graphics and Multimedia Technologies \ Media \
 * DirectShow \ DirectShow Error Messages
 * DirectShow \ DirectShow Video Capture
 * Video Codecs and Renderers \ DirectShow Video Renderer

Also, due to chip limitation, the following items need to be deselected to avoid pin mux conflicts:


 * Third Party \ BSP \ OMAPL138_AM18X : ARMV4I \ Device Drivers \
 * Display \ Sharp LQ043T1DG01 480x272 LCD
 * Display \ Hantronix HDM24216L-2 Char LCD
 * Parallel Port \ Universal Parallel Port

For running the vpif test application, set BSP_DISPLAY_CER=1 in Platform\OMAPL138_AM18X \ OMAPL138_AM18X.bat.

Running Applications
Applications and test utilities can be run from a telnet session or, when KITL is enabled, using the Target Control.

The target control is available from the Target menu. Entering ’ ? ’ into the target control will display help for the commands available. The ’ s ’ command can be used to run an application. For example, to run the i2ctest utility:


 * s i2ctest

Any output from the application will appear in the VS2005 "output" window.

Audio Samples
When the audio driver is included in an OS design a number of audio utilites will also be built:


 * wavplay – plays a WAV file passed on command line.
 * wavrec – captures audio to a file. Pass -h for command line help.
 * wavevol – Provides output volume control. Run with no parameters for command line help.

Examples:

s wavevol 80 Set master volume to 80%

s wavrec –r 16000 Record 5secs of 16KHz audio

s wavplay wavrec.wav Play the recorded audio

WQVGA Display Samples
The LCD display driver supports DirectDraw software rendering and double buffering. The Microsoft DirectDraw samples can be run:

s ddex1

s ddex2

s ddex3

s ddex4

s donuts

You will need a USB keyboard or remote display to use the DirectDraw samples. Note that only the GDI layer is visible on the remote display.

Character Display Samples
The BSP includes a character mode display sample application called ’ cldtest ’. Run the application with no parameters to get command line help. Example command lines are:

s cldtest -i 9 -a 0 -w "Hello World!"

s cldtest -i b -a 0 -w "Another test"

s cldtest -w " more text" -a 40 -w "Second line"

I2C and SPI Samples
The BSP includes sample applications for the I2C (i2ctest) and SPI (spitest) bus drivers. Run the applications with no parameters to get command line help. Example command lines are:

s i2ctest Get command line help

s i2ctest -t 2 0x21 r 2 Read the PCF8575 settings

s spitest Get command line help

s spitest –b 0 –dlb Run loopback test on bus 0

VPIF Sample
The BSP includes sample test application for the VPIF driver. To build the VPIF sample application, add the following subprojects to the OSDesign:


 * PLATFORM\OMAPL138_AM18X\SRC\TEST\APPS\VPIFTEST\
 * BasicFilters
 * NullSink
 * SampleGrabberFilter

Also, to enable CE Remote Display, set BSP_DISPLAY_CER=1 in Platform\OMAPL138_AM18X \ OMAPL138_AM18X.bat.

The VPIF sample application can be run as follows:


 * Connect camera to COMPOSITE in on Kit UI board
 * Connect LCD display to COMPOSITE out on Kit UI board
 * Start CE Remote Display C:\WINCE600\PUBLIC\COMMON\OAK\BIN\I386\cerhost.exe. If requested, the clientside.exe is located at C:\Program Files\Microsoft Platform Builder\6.00\cepb\wcetk\ddtk\armv4i\.
 * Start Target Control from Platform Builder
 * On Target Control, start sample application:

s \release\MyApp.exe


 * Move mouse pointer onto CE Remote Display window and right click to get focus on the window.
 * Hit "r" key to start video capture.
 * Hit "s" key to stop video capture

Overview
A demonstration OS Design (OMAPL138_AM18X_TI_DEFAULT) is included with the BSP. This OS design includes the following CE 6.0 components:


 * Silverlight sample application
 * Windows Media Player
 * Software audio codecs for WMA and MP3
 * Software video codecs for WMV/MPEG-4 and MPEG-1
 * Streaming media support
 * Internet Explorer 6.0 Sample Browser

The OS design includes an application that launches the Silverlight "Bounce" demo automatically at boot time. Tap/click the screen to exit the demo.

Notes:

1. Internet Explorer 6.0 is a heavyweight application so expect it to run quite slowly.

2. The software video codecs used by Windows Media Player max out the CPU when running so expect playback to be slow and frames to be skipped.

Standalone Boot
The Kit can be configured to boot the demonstration OS design standalone from an SD/MMC card. Perform a Release build of the demo OS design, as described in the sections above. The OS image can then be found in the following location:

C:\WINCE600\OSDesigns\OMAPL138_AM18X_TI_DEFAULT\OMAPL138_AM18X_TI_DEFAULT\RelDir\OMAPL138_AM18X_ARMV4I_Release\NK.nb0

Write the OS image to an SD/MMC card using a PC card reader:

1. Format the SD/MMC card with a FAT32 file system

2. Copy the NK.nb0 file to the SD/MMC card.

3. Delete any file called NK.bin from the SD/MMC card.

Configure EBOOT to boot the image from SD card:

1. Insert the SD/MMC card into the SD slot on the Kit.

2. Power on or reset the Kit. Use your serial terminal application to access the EBOOT menus by pressing SPACE when EBOOT is booting.

3. Enter the Boot Settings menu using option [ 2 ]

4. Enter the Boot Device menu using option [ 2 ]

5. Set the boot device to "NK from SD" using option [ 2 ]

6. Return to the main menu using option [ 0 ]

7. Save the settings using option [ 6 ]

8. Exit the menus to boot the CE image from the SD/MMC card using option [ 0 ]

9. Wait 30 seconds while image is read and booted.