Porting Embedded Windows CE 6.0 R2 to the OMAP-L138, Part 1
For OS operation, three essential elements are necessary: the bootloader; OEM abstraction layer( OAL); device drivers (Figure 2). Also required are a variety of configuration files (not shown).

Click on image to enlarge.
Figure 2: BSP structure
Bootloader: The Bootloader performs primary initialization of hardware resources. The OMAP L-138 implements multiloading of images to various cores from sources such as UART, NAND, NOR, I2C, SPI, and HPI, which allows the OS loader to start by a variety of means. There are numerous methods of starting SoCs from NAND /NOR-memory. For example, using an internal RAM for loading a small code will initialize programmable logic loop (PLL) and double data rate (DDR) bus controllers in order to copy the master code of the loader and operating system into an external RAM. Another variant is to launch the code directly from NOR-memory, which copies the OS code into the memory after its initialization.
In the OMAP L-138, TI has implemented primary initialization of the processor's operating frequency, memory settings, and other units via a specialized container (Figure 3) called the Application Image Script (AIS) file. Several images for various cores can be added to this container with preliminary indication of the code loading area. Thus, the need to develop a startup code for initialization of the PLL and DDR in the operating system loader is not necessary.

Click on image to enlarge.
Figure 3: AIS-container
OEM abstraction layer (OAL): The OAL contains the startup code for the system (cache and memory management unit initialization), interrupt processing, timers, and power control. Providing an interface to the OS core, it implements a set of subroutines and processor control codes (IOCTL). The system core, in its turn, provides subroutines to the OAL Layer that allow for maximum unification of the interaction between OAL and the system core.
Device drivers: The device drivers implement the unified interface. They abstract the hardware or virtual architecture and enable control of numerous peripherals such as the EDMA controller, I2C, SPI, LCD-controller, video port, PWM controller, USB OTG, USB Host, and network controller.
Configuration files: In addition to a BSP, a multicomponent operating system is necessary to develop the device quickly . Extensive subroutines and basic software components provided by the OS for implementation of numerous devices are important, as are tools for development and debugging of user applications, graphic interfaces, services, and drivers. Microsoft provides ОСРВ Embedded Windows CE 6.0, Platform Builder development tools, Visual Studio, and Expression Blend.
Loading order
In ОСРВ Microsoft Windows Embedded CE 6.0 the loading order is defined in the system registry, which loads device drivers during system start up according to clearly understood priorities and system requirements.
Multicore systems such as the OMAP have significant advantage in handling and loading and offloading tasks such as complex calculations from the main core to other cores, allowing a designer to achieve high performance even in strictly deterministic real-time systems. But CE 6.0‘s default mode is operation in a single processor environment. So it is necessary to extend it for use in multicore designs, such as the OMAP--L138. To do this, Texas Instruments provides loading subroutines and other mechanisms for working with the DSP-core (DSPLink), implemented by the BSP. It presupposes allocation of reserved sections in the RAM for the operating system. As shown in the example illustrated in Figure 4, this makes it simple to find the the code and data for the DSP core in this area.

Click on image to enlarge.
Figure 4: Example of sequential loading of drivers in Windows CE
The example above illustrates sequential loading of drivers in a system for capturing and storage of video data in 720p format with the frequency of 30 frames per second. In this case, Windows Embedded CE 6.0 deals with storage of data on the hard disk using a SATA interface. Additional need to transmit data via the network may arise. In such instances the data is compacted using special video codecs (Motion JPEG, H.264, MPEG4 etc.) in order to reduce the size of the stored and transmitted data. When all operations are assigned to one ARM9 core, that processor is unlikely to cope with the load even at the frequency of 450 MHz, so it is much better to shift to the DSP core for video compaction. (Codecs for such purposes are provided by TI.)

Click on image to enlarge.
Figure 5: Windows CE 6.0 R2 by the AXONIM Devices Company, with the application of the modified BSP based on the OMAP-L138 experimenter kit
The developer needs only to write an application (or service) based on ОС Windows Embedded CE 6.0 (Figure 5), which will provide for storage and transmission of the already compacted data, with the rest implemented on other cores in the SoC.
To read Part 2, go to "The OMAP Programmable Real Time Unit."
To read Part 3, go to "Using the Windows 6.0 Board Support Package."
Artsiom Staliarou and Denis Mihaevich are founders of the AXONIM Devices Company, a Microsoft Embedded Partner and independent embedded electronics system design center and system integrator with 25 engineers based in Minsk, Belarus. E-mail: info@axonim.by, Skype: axonim.by.
Artsiom has a degree in radiophysics and has more than 10 years of experience in embedded system design based on ARM/Blackfin/TI DSP C2x/C5x/C6x)/x86 devices and using Embedded Linux/Windows Embedded OSes.
Denis also has a degree in radiophysics and more than 12 years of experience in embedded system design and video analysis algorithm development, and has a certificate in optoelectronics.


Loading comments... Write a comment