This is a supplement to the Compact 7 getting started series, to provide additional information showing the steps to install a Microsoft Loopback adapter to support Virtual PC as the target device.

Note:

The Compact 7 getting started series includes the following:

1.       Introduction.

2.       Development Environment & Tools.

3.       Develop a Compact 7 OS Design.

4.       Develop Managed Code Application for Compact 7.

5.       Develop Native Code Application for Compact 7.

6.       Develop SQL Compact Database Application for Compact 7.

7.       Develop Silverlight for Windows Embedded Application for Compact 7.

8.       Debug and Remote Tools.

9.       Deploy OS Runtime to Target Device for Distribution.

For more information about the Compact 7 getting started series, visit the following URL:

http://www.embedded101.com/Compact7/

When working in a Windows Embedded Compact 7 development environment with static IP, using a Windows 7 development PC and Virtual PC as the target device, the Microsoft Loopback adapter is needed to provide connectivity between the Visual Studio 2008 IDE and the Virtual PC to download OS runtime image and application.

 

Prerequisites:

·         Windows 7 development PC

·         Visual Studio 2008 with SP1

·         Windows Embedded Compact 7

·         Windows 7 Virtual PC

For information about Virtual PC, visit the following URL:

·         http://www.microsoft.com/windows/virtual-pc/default.aspx

Install Microsoft Loopback Adapter

Work through the following steps to install the loopback adapter:

1.       From the Start menu, search for “hdwwiz.exe”.

2.       As the system located the add hardware wizard program, right mouse click on hdwwiz.exe and select Run as administrator, as shown in Figure 1, to launch the wizard with administrator privilege.

Fig-1

Figure 1

3.       From the initial Add Hardware wizard screen, click Next.

4.       On the next screen, select the “Install the hardware that I manually select from a list” option and click Next.

5.       On the next screen, from the Common hardware types selection, select Network adapters, as shown in Figure 2, and click Next.

Fig-2

Figure 2

6.       From the Select Network Adapter screen, select Microsoft from the Manufacturer selection on left, and select Microsoft Loopback Adapter from the Network Adapter selection on the right, as shown in Figure 3.

Fig-3

Figure 3

7.       Click Next to continue.

8.       At the point, the wizard is ready to install the loopback adapter.  Click Next to continue.

9.       Click Finish to complete the installation.

Loopback Adapter for the Virtual PC

In addition to installing the loopback adapter to the Windows 7 development PC, the Virtual PC, used as the target device, also needs to be configured with a loopback adapter.

As part of the Windows Embedded Compact 7 software installation, the CEVM Virtual PC, preconfigured with Compact 7 bootloader framework, is provided as part of the Virtual PC board support package (BSP), in the following folder:

·         C:\WINCE700\PLATFORM\VirtualPC\VM

Work through the following steps to associate the CEVM Virtual PC with the Virtual PC program:

1.       Launch File explorer.

2.       Navigate to the following folder:

C:\WINCE700\PLATFORM\VirtualPC\VM

3.       Double click on CEVM.VMC to launch this Virtual PC.

4.       From the Virtual PC’s Action menu, click Close and select “Turn off” to terminate the Virtual PC.

With the CEVM instance associated with the Virtual PC program, work through the following steps to install the loopback adapter:

1.       From the Start menu, launch Windows Virtual PC and bring up the Virtual PC program screen, as shown in Figure 4.

Fig-4

Figure 4

2.       From the available Virtual Machine (VM), select CEVM.VMCX and click on Settings to bring up the Windows Virtual PC Settings screen, as shown in Figure 5.

Fig-5

Figure 5

3.       On the left pane, select Networking.

4.       On the right pane, select Microsoft Loopback Adapter for Adapter 1, as shown in Figure 6.

Fig-6

Figure 6

5.       Click OK to close and save the setting.

Static IP Configuration

When using a Virtual PC as target device with loopback adapter, it’s best to configure both the development PC’s loopback adapter and the Virtual PC to use static IP addresses.

For more information about using static IP address, refer to the following application note:

Compact 7 Getting Started:  Using Static IP Address

http://bit.ly/NlViH1

Static IP for Windows 7 Loopback Adapter

Work through the following steps to configure static IP address for the Loopback adapter installed to the Windows 7 development PC:

·         Launch Control Panel

·         Click on Network and Internet

·         Click on Network and Sharing Center

·         On the left pane, click on Change adapter settings

·         Right mouse click on the Microsoft Loopback Adapter icon and select Properties

·         Select “Internet Protocol Version 4 (TCP/IPv4)” and click on Properties.

·         Select “Use the following IP address” and enter the following IP address and subnet mask:

o   IP address:                  192.168.2.133

o   Subnet mask:            255.255.255.0

Static IP for Virtual PC

When using a Virtual PC as target device for Compact 7 development, the IP address configuration for the bootloader is separate from the IP address configuration for the Compact 7 OS runtime image.

For the Compact 7 OS runtime image, here are the two different options to configure static IP address:

1.       By default, a Compact 7 OS design is configured to generate OS runtime image with DHCP enabled to acquire IP address dynamically.  For OS runtime image with DHCP enabled, we can manually configure a static IP address after the OS boot up.

2.       A Compact 7 OS design for Virtual PC can be configured to generate OS runtime image with DHCP disabled and a pre-configured static IP address by adding the following registry entries to the project’s OSDESIGN.REG file:

[HKEY_LOCAL_MACHINE\Comm\PCI\DC21x41\Parms\TcpIp]

    "EnableDHCP"=dword:0

    "IpAddress"=multi_sz:"192.168.0.232"

    "Subnetmask"=multi_sz:"255.255.255.0"