Installing Windows CE 6.0 tools on a windows7 64bit PC (updated)

Source: Internet
Author: User
Installing Windows CE 6.0 tools on a windows7 64bit PC (updated)

I recently bought a new PC and I choosed a machine based on the 64bit version of Windows 7.
Using a 64 bits OS will allow me to use more than 4 GB of Ram and this is quite important for me because it will allow me to run multiple virtual machines to test beta products and keep some customers 'development environment isolated from the others (for example for customers that need to test and cerrenteach installed QFE and may allow me to install them on my development machine some time after their availability ).
On the other side running vs2005 and the Windows CE tools on the "Main OS" istead of running them inside the virtual machine will provide better CES and avoid some of the issues of Virtualization (limitor wasted disk space, issue with some devices, like USB devices etc .), so I decided to install the tools on Win7-64bit as my main working environment and leave Virtual Machine for specific configurations.
This is an unsupported scenario for Windows CE development tools, so I'm not suggesting that you shoshould upgrade your OS to 64bit if you are happy with your current 32bit setup.
In this post I'll try to report all the issues that I found with my setup and, hopefully, provide solutions (and maybe workarounds) to make Windows CE development possible on 64-bit machines.

1. Setup

 

As usual the first problems may happen during the tools installation.
First of all if you have newer releases of Visual Studio currently installed on your development machine you shoshould unistall them and re-install them after you have set-upped vs2005 and Windows CE plaform builder.
You shoshould run all the setup application as an administrator, So you shoshould give administrator rights to your current user (you may need to do that also to run vs2005) or, at least, right click on the Setup executable and choose "Run as administrator ".
The first issue I found is an error (2738) when the setup tries to run some VBScript code to complete the installation.
To fix this issue you shoshould execute your command prompt as Administrator (right click on cmd.exe or use this "trick" to create an administrative command prompt cannot cut on your desktop or start menu) and re-register the VBScript runtime.
First of all, remove current registration information:
Reg Delete "hkcu/software/classes/wow6432node/CLSID/{B54F3741-5B07-11CF-A4B0-00AA004A55E8}"/F
Then register the 64-bit version of VBScript. dll:
Regsvr32 C:/Windows/syswow64/VBScript. dll
(The actual path of the DLL may vary if you have chosen a different path for the Windows folder)
Now you can run (as administrator !) The required installations:

-Visual maxcompute 2005
-Visual Studio 2005 Service Pack 1
-Visual Studio 2005 patch for Vista
-Windows CE setup
-Windwows ce 6 platform builder SP1
-Windows CE R2 setup
-Windows CE R3 setup

Then I suggest to try to build a simple osdesign to check that all the components of the Windows CE build system are working correcly.

2. Installing es

On my machine to install eclipes I needed to register again the VBScript runtime. I restarted my PC after vs2005/Windows CE installation and also installed some windows updates, so you may not need to do that if you install the specified es immediately after the setup of the main OS.
To speed-up es setup I usually write. BAT file that install them in sequence using msiexec. here's the code of a sample batch file that installes es for ARM and x86 from March to June:

F:
Cd f:/download/wince/elasticsearch/wince600
Reg Delete "hkcu/software/classes/wow6432node/CLSID/{B54F3741-5B07-11CF-A4B0-00AA004A55E8}"/F
Regsvr32 C:/Windows/syswow64/VBScript. dll
Regsvr32 C:/Windows/syswow64/jscript. dll
Start/Wait WinCEPB60-100331-2010M03-Armv4I.msi
Start/Wait WinCEPB60-100331-2010M03-X86.msi
Start/Wait WinCEPB60-100430-2010M04-Armv4I.msi
Start/Wait WinCEPB60-100430-2010M04-X86.msi
Start/Wait WinCEPB60-100630-2010M06-Armv4I.msi
Start/Wait WinCEPB60-100630-2010M06-X86.msi

You may also use the/quiet or/passive command line switch to perform non-interactive Setup of all the elasticsearch instances, but I suggest to keep the setup interactive the first time you install several es on a new machine to ensure that you'll be notified about any setup issue.
You can create your batch file by running:
DIR/on/B> mybatch. bat
Inside your Windows CE guest es directory.

3. Security

Some of the vs2005/Windows CE components may require Network Access to work. If you have the Windows Firewall Enabled you will be prompted with the following authorization dialog:

This will happen also on 32bit machine.

4. rndis

 

Some devices use a USB connection for downloading and debugging of the OS image on the target. Some of them use rndis to emulate a network connection over USB and require a driver to operate.
This driver is part of the windows7 install, but you need to tell to the system where it can find it.
As soon as your device is detected the OS will try to automatically find a driver for it, but fails:

Now you can go to the Computer Management Console (right click on "My Computer" and choose "manage"), and open device manager:

The rndis kitl device is marked with an exclamation mark to point out that its driver is not running.
Right click on it and choose "Update driver", you'll be prompted with the driver selection wizard.
On the first step:

Select "browse my computer for driver software" and you will be prompted with the driver selection dialog:

Choose "let me pick from a list of device drivers on my computer" and you'll see the device category list:

Select "network adapters" (rndis emulates a network connection), and then "Microsoft Corporation" (don't ask me about the differences between "Microsoft" and "Microsoft Corporation" here !) :

Now you shoshould select: "remote NDIS compatible device ":

Now your new kitl device is up and running and you'll be able to download your OS images to it as you do with devices with a "regular" Ethernet connection to your PC.

 

If you need to connect to a rndis device from a virtual machine is usually easier to set-up the rndis driver on your "real" machine and then share it with the virtual machine as you do with other network connections.

If you are running Windows CE development tools on a 64bit machine and found other issues that I did not cover in this entry (and did not experience !) And want to share some tips-and-tricks with other developers, write a comment here and I'll be happy to update this entry, giving you credit for the tip, of course.

5. generate an SDK

Usually after you 've built and tested your OS image you need to generate an SDK to provide to application developers all the libraries, include files and documentation they need to develop applications targeted to your specific device.

The SDK Configuration Wizard works with no issues on my 64bit machine, but the build SDK command generated an error:

'C:/program 'files (x86)/Microsoft Visual Studio 8/common7/ide> "C:/program files (x86) /Microsoft platform Builder/6.00/cepb/idevs/gensdk.exe "" C:/wince600/osdesigns/s4we/s4we/sdks/sdk1/obj/buildsdk1.xml"
Required files may be missing. to resolve the issue, reinstall platform builder.

This happens because gensdk. EXE (the tool that "packs" all the files required for your sdk in a msi file that you can redistribute and install on Developer's machines) is. NET application that is spawned from Pb and runs in 64bit mode. 64bit mode has its own registry and the configuration keys generated by PB setup are only in the 32bit registry. that generates the problem.

To fix it we can just develop a small. NET application, force it to run as 32bit (x86) and reference gensdk. EXE as an external assembly, invoking its main method from our new 32bit app. this will force gensdk to run as a 32bit app, finding all the registry information it needs to complete the SDK build.

To create this new project select "file/new project ..." From the vs2005 menu.

The new project wizard appears:

Select Visual C #/Windows as project type and "console application" as template. I called my "wrapper" gensdk32.

Chose "OK" and you are ready to develop your gensdk wrapper application.

The first step is to add a reference to the "real" gensdk application. Right click on the "references" entry in your project inside solution exporer:

The add reference dialog appears:

Select the "Browse" tab and navigate to the directory where gensdk.exe is located (usually "C:/program files (x86)/Microsoft platform Builder/6.00/cepb/idevs "), select gensdk.exe and press "OK ".

Now a reference to gensdk assembly has been added to your project.

If you double click on it you'll be able to discover the object and namespace that it implements:

As you can see it implements just one object (the main application class), that implement method main.

Let's see how we can call it from your code.

This is the code that the wizard generated for our application:

using System;

using System.Collections.Generic;

using System.Text;

 

namespace GenSdk32

{

    class Program

    {

        static void Main(string[] args)

        {

        }

    }

}

To call the main method of gensdk we need to add just one line, inside our own main method:

static void Main(string[] args)

{

    Microsoft.PlatformBuilder.Sdk.SdkGenerator.GenSdk.Main(args);

}

Before we can build our application we need to configure it as 32bit only. we can do that by double clicking on the "properties" node in Solution Explorer, this will bring up the project properties page:


Select the "build" tab, choose "release" as Active configuration, and "x86" as platform target for your application.

Now you are ready to build it by choosing "build/build solution" from the vs2005 menu.

Now you can copy gensdk32.exe to the same directory where gensdk is installed.

To build our SDK we have to run gensdk32 from the Pb command line. Go back to your osdesign and choose "build/Open release Directory ".

Now you can copy and paste the command line of the previous failed gensdk.exe execution and replace it with gensdk32.exe:

"C:/program files (x86)/Microsoft platform Builder/6.00/cepb/idevs/Gensdk32.exe"C:/wince600/osdesigns/s4we/s4we/sdks/sdk1/obj/buildsdk1.xml"

And your SDK will be built!

If you are too lazy to build your own gensdk32 project, you can download mine from here:

 

7. pbxlutils

The pbxmlutils application has the same issue of gensdk but, unfortunately, it does not provide access to its main application class and so you can't build a 32-bit wrapper for it.

Pbxmlutils is used to generate makefiles and batch files from a pbxml file and also to update subroject configuration files. if you experienced problems. bib and. reg settings of your subprojects not being encoded in the final image, you'll have to covert pbxmlutils.exe to 32 bits.

To do this you can use the corflags.exe utility that is part of Visual Studio installation.

Just open the vs tools command prompt from the Visual Studio folder of your Start Menu and execute:

Corflags "C:/program files (x86)/Microsoft platform Builder/6.00/cepb/idevs/pbxmlutils.exe"/32bit +

(Path of pbxlutils may be different on your PC and it's a good idea to do a backup copy of that file before you manipulate it.

Technorati tags: Windows CE, tools, 64 bitposted @ Tuesday, August 31,201 0 pm | feedback (11)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.