User`s guide
4 Debugging Your BSP
4.3 Advanced Debugging Techniques
129
4
execution. Most other boot loaders provide similar functionality, though the
commands may be different.
In this case, the sequence is to start the boot loader and use it to load the VxWorks
image. Next, use the OCD device to stop the processor and set the desired software
breakpoints, then resume operation. At this point, the boot loader is again
executing. Use the boot loader go command to start VxWorks. When the
breakpoint is hit, control returns to the OCD device.
Hardware Breakpoint
If available, the OCD device can set a hardware breakpoint at the RAM entry
address. The boot loader is then used to load the image into RAM and start
execution. As soon as control is given to the VxWorks initialization code, the
hardware breakpoint is encountered and the OCD device takes control. At this
point, additional breakpoints can be set using the OCD device—these breakpoints
can be either software breakpoints or hardware breakpoints.
Forever Loop
In some cases, it is most convenient to load the image the normal way, using the
boot loader load-and-go instruction, and to not use a hardware breakpoint. In this
case, it is possible to put a simple infinite loop at the beginning of the VxWorks
initialization code. After execution begins, the OCD device interrupts the
processor and takes control. At this time, breakpoints can be set at the desired
locations, and control can be returned to the VxWorks initialization code.