Lesson Summary

Power management is an important Windows Embedded CE feature that ensures efficient power consumption on target devices. OEMs should implement power management features in the OAL to enable transitions from full-power mode to Idle and Suspend modes and Critical Off state for battery-powered devices. Implementing power management support involves re-synchronizing timer-related kernel variables, powering down peripherals, putting RAM into self-refresh mode, setting wakeup conditions, and suspending the CPU. It is not trivial to implement these low-level routines, yet Microsoft provides sufficient reference code in the sample BSPs to get a better understanding of the implementation details.

Lab 5: Adapting a Board Support Package

In this lab you clone a reference BSP in Visual Studio 2005 with Platform Builder and use it to build a run- time image. As the underlying platform, this lab uses the Device Emulator because this platform can run on the Windows Embedded CE development computer. Microsoft included the Device Emulator BSP in Platform Builder as a reference BSP.

NOTE Detailed step-by-step instructions

To help you successfully master the procedures presented in this Lab, see the document 'Detailed Step- by-Step Instructions for Lab 5' in the companion material for this book.

> Clone a BSP

1. In Visual Studio 2005, open the Tools menu, click Platform Builder For CE 6.0, and then click Clone BSP.

2. In the Clone Board Support Package window select Device Emulator: ARMV4I as the Source BSP from the drop-down list.

3. Under New BSP Information enter the information shown in Table 5-12 (see also Figure 5-10):

Table 5-12 New BSP details

Parameter Value
Name DeviceEmulatorClone
Description Clone of the Device Emulator BSP
Platform Directory DeviceEmulatorClone
Vendor Contoso Ltd.
Version 0.0

4. Select Open New BSP Catalog File In Catalog Editor check box and then click Clone.

5. Verify that Platform Builder clones the Device Emulator BSP successfully, and then in the corresponding Clone BSP dialog box, click OK.

6. Verify that Visual Studio automatically opens the DeviceEmulatorClone.pbcxml catalog file. Close the catalog editor without making any changes.

Figure 5-10 BSP cloning information

> Create a Run-Time Image

1. In order to validate our cloned BSP, create a new OS design based on the DeviceEmulatorClone BSP. Call the OS design DeviceEmulatorCloneTest, as illustrated in Figure 5-11 (see also Lab 1 in Chapter 1 for details on how to accomplish this step).

2. Choose Industrial Device in the Design Templates and Industrial Controller in the Design Template Variants. Accept the default options in the subsequent steps of the wizard.

3. After Platform Builder generates the DeviceEmulatorCloneTest project, verify the OS design by examining the catalog items in Catalog Items View.

4. Verify that the Debug build configuration is enabled by opening Configuration Manager on the Build menu and seeing if the Active Solution Configuration list box displays DeviceEmulatorClone ARMV4I Debug.

5. On the Build menu, click Build Solution.

6. After the build is completed, configure the Connectivity Options to use the Device Emulator.

7. Open the Target menu and click Attach Device to download the run-time image to the Device Emulator and start Windows Embedded CE. Notice the debug messages in the Output window of Visual Studio 2005. Wait until the device has started up completely.

Figure 5-11 A new OS design based on the DeviceEmulatorClone BSP

NOTE BSP adaptation

Device Emulator emulates the same hardware platform for both the reference BSP and the cloned BSP. For

Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату