How to Debug a Windows Embedded CE 6 Image
This application note will guide you through the steps needed, to create a debug image for Windows Embedded CE 6. This is demonstrated with a BSP for Trizeps V, but the steps will almost also apply for other Trizeps too.
Preparation
Take a look at Building a Windows Embedded CE6 Image for Trizeps5 from Scratch. This project will be used as starting point.
Selecting Debug Configuration
Every Platform-Builder-Workspace has two different configurations. The Release
-configuration which you have used in the Building a Windows Embedded CE6 Image for Trizeps5 from Scratch-application note and the Debug
-configuration. In the Debug
-configuration all moudles are build with debugging-information. This and the fact that some optimizations are disabled increases the size of the output files.
Select TR5CONXS ARMV4I Debug
.
Building the Debug Image
Run Build –> Build Solution
.
After several minutes you will see that the build finished with an image up to 67MB in size. Because on default the Trizeps5 is equipt with 128MB of RAM, this is no problem. But if you have a bigger project or want less debugging modules (DLL's, EXE)in the CE6 image, you could:
Build –> Open Release Directory in Build Window
will show you where the_FLATRELEASEDIRECTORY
resides.Change the name of this directory from
TR5CONXS_ARMV4I_Debug
toTR5CONXS_ARMV4I_FullDebug
.Make a copy of the
TR5CONXS_ARMV4I_Release
directory and name itTR5CONXS_ARMV4I_Debug
.Build –> Advanced Build Commands –> ReBuild Current BSP and Subprojects
.Copy desired debug-DLL's and EXE to the debug directory.
Build –> Make Run-Time Image
Prepare SD-Card
The easiest way to load a debug-image, is to use a SD-card. Put nk_ram.nb0
and a autoboot.bat with following contents onto the card:
display
boot mmc nk_ram.nb0 kitl dm9k_base
display will show a boot-bitmap if one is stored on the Trizeps-module.
boot mmc nk_ram.nb0 kitl dm9k_base will boot the image from SD-card and the command-line-argument kitl dm9k_base will tell the image to start the kitl-transport using the dm9000-ethernet-controller.
Using this configuration, the device will get it's IP-address through BOOTP or DHCP. If you you want to specify a static IP-address yourself, change autoboot.bat to:
display
boot mmc nk_ram.nb0 kitl=0x9 dm9k_base ipAddress=0x01fea8c0 ipMask=0x00FFFFFF
This will set IP = 192.168.254.1 and Mask = 255.255.255.0
Insert SD-card into the card-socket of your board.
Start Debugging
Now that you have a Windows CE5.0-Debug-Image, you can start to debug.
Select Target –> Connectivity Options
.
Now set:
Download
toNone
.Transport
toEthernet
.Debugger
toKdStub
.
Press Settings
-button next to the Transport
-box and power-up your device.
After some seconds a name will appear in the Active Devices
-window. Select it and press OK
. Close the Target Device Connectivity Options
-dialog with Apply
and Close
.
If you don't see the device appear in the Active Devices
-window, connect to COM1 with 38K4 Baud 8N1. There you might see some usefull information.
Press Target –> Attach Device
.
Now the kitl-debug-connection will be established and you may set breakpoints, use the Windows CE Shell
-extension or other powerfull debug tools of the Windows CE Platform Builder.
Download
CE6Demo-Project: ce6demo_2008_10_14.zip
Debug-Image: ce6demo_tr5conxs_2008_10_14_.zip