| |||
| Home > Using the eXDI2RVI driver with Platform Builder > Debugging Windows CE images | |||
To begin debugging a Windows CE image:
In Platform Builder, select Connectivity Options... from the Target menu. The Target Device Connectivity Options dialog appears. See Figure 6.
Set the Download and Transport options as None. Access the Debugger option drop-down menu, and select the eXDI2RVI option as shown. Click Apply and Close.
Select Attach Device from the Target menu to attach the debugger to the target. The eXDI Console dialog appears. See Figure 7.
The user-configurable options in the eXDI Console are:
Configure RVI. If the stored configuration does not match with the current target device, click this button to configure RealView ICE. See Manual RealView ICE configuration. You must do this at least once to describe your target device to RealView ICE. For further information on using the RealView ICE configuration dialog (RVConfig), refer to the RealView ICE and RealView Trace User Guide.
Connect. Click this button to connect to the current target system, and to start the debug session.
Select Core. You should access this drop-down menu to specify the core to which the debugger is to be connected. In a single-core target, connection is made to this core by default.
View panel. Click the Dbg Internals button to display the core’s debugger internals. This feature is not supported in the current release of the software. Click the Registers button to display the core’s cp15 registers.
Log Control panel. Click the Clear Log button to clear messages displayed in the message panel. These messages relate to details of the connected device. Click the Separator button to add a separator line between messages in the message panel.
The Target Status panel. This panel displays the target’s status messages as applicable. Examples of these are:
Connecting to target... An attempt is being made to connect to the target.
Connected. The target is connected to the debugger.
Target connection failed. An attempt to connect to the target has failed.
Target not configured. The target is not yet configured, and acts as a prompt for you to configure the target in order to connect to it.
Configuring, please wait... The target has been configured, the user interface is updating, and you should wait until this is complete.
Unknown. This status is displayed once the target has been configured.
The Image panel. This comprises the following:
The Download checkbox. If you want to debug a program that is already on the target, ensure that this checkbox is clear.
The Load Address and Entry Point fields are populated by using information taken from a command window. To do this:
Select Open Release Directory from the Build OS menu.
In the command window that displays, input viewbin nk.bin, then press Enter. See Figure 8.
Locate the line beginning Image Start. Copy the address given for Image Start, then paste this into the Load Address field and the Entry Point field.
Select the D/L and BOOT radio box if you want to boot the OS after the image is downloaded.
Select the D/L and STOP radio box if you want the OS program to be debugged after the image is downloaded. If you select this option, on download completion the program execution stops at the entry point.
The Path field is used to
denote the location of the image (Nk.nb0) to
be downloaded. For example, C:\WINCE500\PBWorkspaces\ARMZ\RelDir\ARMVPB_ARMV4I_Debug
If Nk.nb0 is not in this directory, you
will need to generate it. See How to generate NK.nb0.
Select the Run Pre-config radio box
if you want to write the initial configuration settings to the target.
When you do this, the memory writes specified in the exdi2rvi_preconfig.ini file
is executed before downloading or booting the Windows CE image.
You should edit the exdi2rvi_preconfig.ini file
with memory write commands that are suitable to the preconfiguration
of your board. The supported commands should be the same as the
format mentioned in the sample file:
[Preconnect commands]
Command0=MemoryWrite 0x80000000 0xABCDEF00 4
Command1=MemoryWrite 0x20000000 0x00000020 1
Command2=MemoryWrite 0x80000004 0x0000abcd 2
The number at the end of each command indicates the write size (4=word, 2=half-word, 1=byte). There should be only one space after each word, as shown above.
Pre-configuration script supports only memory write commands.
Figure 9 shows an example of a completed eXDI console dialog.
When you are ready to proceed, click the Connect button to connect to the current target system, and to invoke the debugger. See Figure 10.
Downloading starts, and an Image Download dialog displays. See Figure 11.
When downloading is completed, the image starts booting if the D/L and BOOT radio box is checked. To debug the image running on the target, select Break from the Debug menu. If you want to view the debug features and manipulate debug processes, select Debug Windows from the View menu, followed by any of the available options. For example, these are Breakpoint List, Processes, Threads and Modules and Symbols. See Figure 12.
If Nk.nb0 is not present under the Path variable
mentioned in Debugging Windows CE images,
you can use one of the Platform Builder inbuilt tools, Cvrtbin.exe,
to generate it. To do this:
Select Open Release Directory from the Build OS menu.
Input Cvrtbin with appropriate command line options.
For example, Cvrtbin -r -a <startaddress> -w(width
8, 16, 32) -l(length) Nk.bin
Press Enter.