Download the OS to a Target Device for Debugging (Compact 2013)

3/26/2014

To debug your Windows Embedded Compact OS, you need to download the OS to your device. To do so, you first configure the connectivity options in Platform Builder to enable your development computer and your device to communicate. Then, you can establish a connection and download the OS onto the device. The following instructions create a simple setup to download and debug the run-time image over Ethernet.

Note

These instructions assume that the boot loader on your device broadcasts BOOTME messages over the network, such as the boot loaders of the sample BSPs that are included with Windows Embedded Compact 2013.

To configure a connection between Platform Builder and the device

  1. Create a device profile as follows.

    Note

    These steps only configure the options essential to this particular procedure. For a description of all of the connectivity options, see Target Device Connectivity Options Dialog Box.

    1. In Platform Builder, with your OS design project open, click Target, and then click Connectivity Options.
    2. In the Target Device Connectivity Options dialog box, in the left pane, under Device Configuration, click Add Device.
    3. In the right pane, in the New target device name box, enter a device name, and then click Add. Note that in the left pane of the Target Device Connectivity Options dialog box, the selection has changed to Kernel Service Map.
  2. Select the download, transport, and debugger services for the device as follows.

    In the Target Device Connectivity Options dialog box, on the Kernel Service Map page, set the following options:

    • Target Device. Select the device that you created in the last step.
    • Kernel Download. Select the service by which Platform Builder will download the run-time image to the device. In this example, leave this option at the default setting, which is Ethernet.
    • Kernel Transport. Select the kernel transport that Platform Builder will use to establish a kernel-level connection between your development computer and your device for debugging. In this example, leave this option at the default setting, which is Ethernet.
    • Kernel Debugger. Set this to KdStub so that Platform Builder can establish a connection to the device for debugging.
  3. Prepare Platform Builder to recognize the device as follows.

    • In the Target Device Connectivity Options dialog box, on the Kernel Service Map page, under Kernel Download, next to Ethernet, click Settings. The Ethernet Download Settings dialog box appears.

    Note that the Target device boot name box and the Active target devices box are both empty. The Ethernet Download Settings dialog box will be used in the next few steps, so leave it open.

    At this point, Platform Builder is in a mode in which it listens for the device. In the next step, you start the device, and as the device starts, the device obtains an IP address and then broadcasts BOOTME messages over the network. When Platform Builder receives the BOOTME messages, it recognizes the device. From then on, Platform Builder will automatically recognize the device; you do not have to configure the connection again.

  4. Turn on or reset your device.

  5. When Platform Builder receives the BOOTME messages, the device name appears in the Ethernet Download Settings dialog box under Active target devices. Click the device name, which will turn blue, and then click Apply.

  6. You can now turn off your device. You will restart the device when you download the run-time image in the next procedure.

  7. In Platform Builder, click Close to close the Target Connectivity Options dialog box.

To establish a connection and download the run-time image

  1. In Platform Builder, with your OS design project open, from the Device list, select the device that you created in the previous procedure.

    If you do not see the Device list, you can enable it by clicking View, then Toolbars, and then clicking the Target toolbar.

  2. In Platform Builder, click Target, and then click Attach Device.

  3. Turn on or reset your device.

    Important

    The sample boot loaders included with Windows Embedded Compact 2013 broadcast BOOTME messages for only two minutes. If that time expires before Platform Builder connects to the device, you need to turn off the device, ensure that Platform Builder is in a state in which it is listening for BOOTME messages (by using the previous procedure, to configure a connection between Platform Builder and the device), and restart the device.

When Platform Builder receives the BOOTME messages, it starts to download the run-time image to the device. Platform Builder displays the download progress in a Device Status window.

Note that in the Device Status window, the status bullet at the end of the Download line is green because the connection for the kernel download has been established, whereas the bullets for Transport, Debugger, and Target Control are half green and half yellow. After the run-time image is completely downloaded to the device and the OS has started, the Transport bullet will turn fully green to indicate that the development computer and the device have established a kernel-level connection. The Debugger bullet will turn fully green because the kernel debugger connection is established. The Target Control bullet will turn fully green because a KITL connection is established.

After Platform Builder fully downloads the run-time image to the device, the device starts the Windows Embedded Compact 2013 OS.

See Also

Concepts

Kernel Debugger
Debugging

Other Resources

Windows Embedded Compact 2013