Downloading an OS to a Device over Ethernet (Windows Embedded Compact 7)
After you develop a Windows Embedded Compact 7 OS, you can download the OS image to your target device by using Platform Builder. You can download the OS over an Ethernet, USB, or serial connection. This article describes how to download the OS over Ethernet to a real (physical) device.
For instructions on how to download Windows Embedded Compact to a virtual CEPC (vCEPC), see Getting Started with Virtual CEPC.
In this article:
- Prerequisites
- Step 1: Configure Platform Builder to connect to your device
- Step 2: Prepare your device to connect to Platform Builder
- Step 3: Download the OS image to your device
Prerequisites
Before you begin this procedure, verify that your setup meets the following prerequisites:
Software: Your development computer has Microsoft Visual Studio 2008 and Windows Embedded Compact 7 with Platform Builder installed.
Hardware: Your device is a physical device (not a vCEPC or a device emulator). Both your device and your development computer have an Ethernet port.
Network: Your development computer and your device are connected to the same LAN. Unless your device uses a static IP address, your LAN must have a DHCP server to provide your device with an IP address.
Windows Embedded Compact 7 OS: You have designed and built an OS based on the board support package (BSP) for your device. For information about BSPs or designing and building an OS, refer to the See Also section below.
Caution: If you do not want to debug, and you want to disconnect Platform Builder from your device after you download the OS to your device, you need to disable the kernel independent transport layer (KITL) and the kernel debugger in your OS build settings. If you do not disable KITL and the kernel debugger, the OS will stop working when you disconnect the device from the development computer. To disable KITL and the kernel debugger in the OS image, see How to Keep the OS Functioning When Disconnecting from Platform Builder.
Step 1: Configure Platform Builder to connect to your device
First, you configure Platform Builder to connect to your target device through an Ethernet connection.
To configure connectivity settings in Platform Builder
In Platform Builder, click Target, and then click Connectivity Options.
In the left pane of the Target Device Connectivity Options dialog box, under Device Configuration, click Add Device, and then enter a name for your target device. Click Add.
In the left pane of the Target Device Connectivity Options dialog box, under Service Configuration, click Kernel Service Map.
In the right pane, under Kernel Download, select Ethernet.
If you will be debugging your application, then in the right pane, under Kernel Transport, select Ethernet. Under Kernel Debugger, select KdStub.
In the left pane of the dialog box, under Service Configuration, click Core Service Settings.
In the right pane, under Download Image, choose when you want the image to download.
Under KITL Settings, select the KITL behavior that you want. (If you do not have debugging enabled in the OS image, these selections will be ignored.)
Click Apply and then click Close.
Step 2: Prepare your device to connect to Platform Builder
After configuring Platform Builder to connect to your device, you need to put your device in a state in which it can connect to your development computer and receive the OS. How you do this is very device-dependent. General guidelines follow.
When you built your OS image, you also built a boot loader image. The boot loader image file is in the same directory, the flat release directory, as the OS image. (The flat release directory is a single directory that contains all of the files to be included in the final images, specified as the Release directory in the OS Project Properties.) The name of the boot loader image file depends on your device. You download this boot loader image to your device by using the instructions that are provided with your device.
After you download the boot loader to the device, you need to configure the boot loader to accept the OS image over the Ethernet connection. Most boot loaders have a configuration menu that you can access when you boot up the device. The sample boot loaders that are included with the Windows Embedded Compact 7 BSPs have a command-line configuration menu that you can use to communicate with the boot loader by using a serial connection and a terminal emulator program.
Assuming you are using one of the sample BSPs included with Windows Embedded Compact 7, you configure the boot loader by following the steps below.
To prepare your device to connect to Platform Builder
Turn on the device.
As the device boots up, you can view its output in the terminal emulator program. When prompted, press the spacebar to access the boot loader configuration Main menu. From the boot loader configuration Main menu, do the following:
- Select [2] and set the boot device (sometimes called boot source) to LAN.
- If you will be debugging your application, select [3] from the boot loader configuration Main menu and set the KITL (debug) device to LAN.
- Select [7] from the boot loader configuration Main menu to save your settings.
- Select [0] from the boot configuration menu to exit.
Continue booting so that the boot process reaches the point at which the boot loader is waiting to communicate with the development computer.
Step 3: Download the OS image to your device
Now that Platform Builder is ready to connect to your device, and your device is ready to connect to Platform Builder, you can establish a connection and download the OS to your device.
Because your communication choice is Ethernet, the boot loader broadcasts BOOTME messages that indicate it is available to receive the OS image. The BOOTME message contains the unique name of the device on the network.
Note: |
---|
In the following procedure, BOOTME packets are only broadcast for a limited period of time (about 2 minutes). If you do not make the connection, as described below, you can do a hard or soft reset of your device to try connecting again. |
To download the OS to your device
In Platform Builder, in the Device list box, do one of the following:
- Select your device.
- If you want to use the default Platform Builder Ethernet settings (that is, you did not add a custom device using the Connectivity Options dialog box), then choose (auto) Ether as your device.
(The Device list box is on the Target toolbar. If you do not see the Target toolbar, click View, then click Toolbars, and then click Target.)
In Platform Builder, click Target, and then click Attach Device.
While Platform Builder waits to receive BOOTME messages from your target device’s boot loader over Ethernet, the Ethernet Download Settings dialog box appears. When Platform Builder receives the BOOTME messages from your device, your device’s name and IP address will appear in a red box within the Active target devices window of the Ethernet Download Settings dialog box.
When your device appears in the Active target devices window of the Ethernet Download Settings dialog box, click the device, and then click Apply. (Try to do so before the BOOTME messages expire.)
Platform Builder displays a dialog box indicating the download progress. After the download is complete, your device starts the OS.
See Also
Developing an Operating System Design
Integrated Development Environment Build Process
The Basics of Bringing up a Hardware Platform
Windows Embedded Compact 7 Reference Documentation