Partager via


How to Debug a Boot Loader with eXDI (Windows CE 5.0)

Send Feedback

To debug a bootloader program, you must use a hardware-assisted debugging. Hardware-assisted debugging allows you to control the execution of a target device during boot-up, prior to the start of the kernel.

If you install a third-party eXDI driver to add debug support, Platform Builder will add the eXDI driver to the list of available debugging services in the Target Device Connectivity Options dialog box.

For more information, see Hardware-Assisted Debugging.

  Step Topic
1. Install Platform Builder on your development workstation. Platform Builder User's Guide
2. Build a Debug version of the run-time image. Building a Run-Time Image for Debugging
3. Create and compile a bootloader program.

Have the following files ready to work on:

  • eboot.nb0
  • eboot.bin
  • eboot.exe
  • eboot.pdb
Developing a Boot Loader
3. Install a hardware probe and connect it to the target device, including the eXDI driver that corresponds to the probe Hardware-Assisted Debugging
4. Flash the target device with the newly developed bootloader.

Because the debugger requires that symbols and source have the same timestamp, it is important that the host debugger and the debugging target are in sync. To ensure that the correct version of the bootloader is on the target device, and that the correct symbols are loaded, flash the device immediately prior to debugging.

Production-Quality Drivers
  5. Launch the bootloader on the target device. Launching a New Bootloader on a Target Device
6. Specify communication settings between the development workstation and the target device.

In the Target Device Connectivity Options dialog, choose the following settings.

  • In the Download box, choose No Download Service.
  • In the Transport box, choose No Transport.
  • In the Debugger box, choose the name of the eXDI driver associated with your probe, and choose OK.
Configuring a Connection for Downloading and Debugging
7. Verify that the kernel debugger connects to the target device.

When the kernel debugger connects, debug messages appear on the Debug tab in the Output window of Platform Builder.

Not applicable
8. Start debugging the bootloader you just downloaded.

The exact sequence of program activity for a target device connection depends on the probe and the microprocessor connected to the probe.

For example, in a hardware-assisted debugging scenario, most ARM devices break at 0x00000000 immediately after connection. To begin debugging, set a hardware breakpoint in a bootloader startup code location, such as BootloaderMain(), and then choose F5 to continue. The target device then continues booting until it reaches the hardware breakpoint.

When the boot sequence hits the breakpoint, you can start debugging the bootloader source.

Setting a Breakpoint at a Source Code Line
9. To verify your image loads correctly, run the debugger until you reach the breakpoint you set. Running the Debugger Until a Breakpoint is Reached.

After you establish a connection between Platform Builder and the target device, the kernel debugger collects data from the target device.

For information about controlling program execution, see Debugger Execution Control.

For information about viewing this data, see Viewing Debug Information.

For information about breakpoints, see Breakpoints.

See Also

Hardware-Assisted Debugging | Core Connectivity

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.