Download the OS to the Device (Compact 2013)
This section shows you how to use Platform Builder in Visual Studio to connect to your virtual test device and download the Windows Embedded Compact 2013 OS to the device, which requires two tasks:
- Configuring Platform Builder to recognize your virtual device.
- Connecting to your virtual device and download the OS run-time image.
To complete the tasks in this section, you will need a virtual test device and an OS project with a finished run-time image. For more information, see Set Up a Virtual Test Device and Create Your First OS.
Configure Platform Builder to recognize your virtual device
So that Platform Builder will recognize your virtual device, use the procedures in this section to create a profile for your virtual device, set Platform Builder to detect your device, and then start your virtual device.
To create a device profile in Platform Builder
In Visual Studio, open an OS design project that you have built into a completed run-time image. If the OS design does not have a run-time image, you will not be able to create the profile.
Go to Target>Connectivity Options.
In the Target Device Connectivity Options dialog box, under Device Configuration, select Add Device.
In New target device name, enter a name for your device, and then click Add.
Under the Kernel Download field, select Settings, which opens the Ethernet Download Settings dialog box. Leave the Ethernet Download Settings dialog box open.
Start your virtual test device by using one of following procedures.
In all versions of Hyper-V (Windows 8.1, Windows Server 2008 R2, or Windows Server 2012)
In Virtual PC (Windows 7)
- Open Hyper-V Manager.
- In the Virtual Machines pane, select your virtual test device.
- In the Actions pane on the right side of the window, select Start.
- Open Virtual PC Console and select your virtual test device from the list.
- Select Start.
Ignore the “Hit space to enter configuration menu” message that displays five times when you start your virtual device. If you press the spacebar, you will enter the boot loader configuration for the device, which is far beyond the scope of this guide. For information about the boot loader and how it operates with virtual machines, see Boot Loader for Virtual Machines in Client Hyper-V.
After the device displays the five boot loader configuration menu prompts, the device acquires an IP address from the DHCP server and broadcasts BOOTME messages, which are a form of Ethernet debugging packets. The device broadcasts the BOOTME messages for two minutes and displays the number of BOOTME messages it has sent.
- Open Hyper-V Manager.
When your IDE receives the BOOTME messages, Platform Builder loads the device name in the Ethernet Download Settings dialog box under Active target devices. Select the active device name, and then select Apply.
Platform Builder returns to the Target Device Connectivity Options dialog box and associates the device boot information with the new device profile.
Close the Target Device Connectivity Options dialog box.
Connect to your virtual device and download the run-time image
After Platform Builder associates the device profile with your virtual device, you can connect to the device and download your run-time image. If the device does not have an operating system, Platform Builder will automatically download the run-time image from the current OS project when you connect the device.
To connect to the device
Open your OS design project, and then go to Target>Attach Device.
If your device has stopped sending BOOTME messages, restart your device.
When the device sends the BOOTME messages, Platform Builder starts to download the run-time image to the device. Both Platform Builder and the device display the download progress.
When the download is complete, the device starts Windows Embedded Compact 2013, using the options from your OS design. If you used the OS from the example in Create an OS design, your device will show the Minimal Shell screen, as shown in the following image:
After you’re finished, detach the device, and turn off your virtual machine.
Learn more about
- Target Device Connectivity Options
For detailed information, see Target Device Connectivity Options Dialog Box.
- Device Status Window
For detailed information, see Device Status Window.
- Kernel debugger
The Platform Builder kernel debugger integrates the functionality required to connect to a target device and download a run-time image with a full-featured debugger that you can use to view information about your code, set breakpoints, step through execution, and control debug output messages. For more information about the kernel debugger, see Kernel Debugger.
- The sample virtual test device
Compact 2013 includes a sample virtual hard drive—hd0_sample.vhd—that you can use as a starting point for a virtual device. For more information about how to use the sample device in your development, see Use the Sample Virtual Device.