WinCE Tutorial - 5 - Running WinCE under Virtual PC - 1
WinCE Tutorial - 4 - Running WinCE under VMware - 3
Virtual PC – Creating and Running the CE Image
You need to install Virtual PC if you haven’t done it already. It can be found in this address.
Preparing the BSP and Creating the CE Image
A custom bsp specifically tailored for Virtual PC can be found in this address. After extracting the zip content, copy the vm directory to the host system and copy the other contents to the $(WINCEROOT)\platform
directory of your development system. After doing that, open the visual studio of your development system. You can either create a new solution and select the new bsp from the wizard or change the bsp of your current solution. Detailed explanations of these operations can be found in previous sections of the tutorial.
You can also configure the bsp to use one of the ethernet cards directly as a debug card and the other one as a product ethernet card. To do this, follow these steps:
-
Set the following environment variables:
KERNELNOSHAREETH = 1
BSP_NOSHAREETH = 1 -
Open platform.reg file of the bsp and find the following lines:
IF IMGNOKITL #include "$(_TARGETPLATROOT)\files\dc21x4.reg" ENDIF
Change with
;IF IMGNOKITL #include "$(_TARGETPLATROOT)\files\dc21x4.reg" ;ENDIF
-
Open platform.bib file of the bsp and find the following lines:
IF IMGNOKITL ndis_dc21x4.dll $(_TARGETPLATROOT)\bin\drivers\$(WINCEDEBUG)\ndis_dc21x4.dll NK SHK ENDIF IMGNOKITL
Change with
;IF IMGNOKITL ndis_dc21x4.dll $(_TARGETPLATROOT)\bin\drivers\$(WINCEDEBUG)\ndis_dc21x4.dll NK SHK ;ENDIF IMGNOKITL
After those, rebuild the project and generate NK.bin.
If you skip these steps, vmini driver will be used if you enable KITL. You may still use normal ethernet functionality and debug the system at the same time. However, it is not recommended in this project because of the reasons mentioned here.
Note: You may encounter a problem about OAL.exe in the build process. This is because of an error in make files. You can change the makefile.def files of the kitl and oal to overcome this problem. The files can be found under:
$(WINCEROOT)\PLATFORM\VirtualPC\bin\kitl\makefile.inc
$(WINCEROOT)\PLATFORM\VirtualPC\bin\oal\makefile.inc
Find the line starting with “copy”, and change it with the appropriate lines given below:
copy $(_TARGETPLATROOT)\bin\oal\$(WINCEDEBUG)\oal.* $(_TARGETPLATROOT)\cesysgen\files\
copy $(_TARGETPLATROOT)\bin\kitl\$(WINCEDEBUG)\kitl.* $(_TARGETPLATROOT)\cesysgen\files\
After rebuilding the kitl and oal, nk.bin will automatically be created. However, in some of the build modes, this solution does not work. If this is the case, for a workaround, copy all files from $(WINCEROOT)\PLATFORM\VirtualPC\BIN\OAL\debug
and $(WINCEROOT)\PLATFORM\VirtualPC\BIN\KITL\debug
and paste them to the same directory you normally copy NK.bin from. Example directory path: C:\WINCE600\OSDesigns\OsDesign_VMware\OsDesign_VMware\RelDir\VirtualPC_x86_Release
Make sure that you copy the necessary files to your current solution directory.
Copy always contents from debug directory. After that, generate NK.bin by choosing “Make Run-Time” image option shown below.
WinCE Tutorial - 6 - Running WinCE under Virtual PC - 2