Debug

About this task

After you click Debug in the Debug Configuration window, the OpenOCD server starts, connects to the target, starts the gdb client, downloads the application, and starts the debugging session. Messages and a list of VexRiscv registers display in the Console. The main.c file opens so you can debug each step.

Procedure

  1. Click the Resume button or press F8 to resume code operation. All of the LEDs on the board blink continuously in unison.
  2. Click Step Over (F6) to do a single step over one source instruction.
  3. Click Step Into (F5) to do a single step into the next function called.
  4. Click Step Return (F7) to do a single step out of the current function.
  5. Double-click in the bar to the left of the source code to set a breakpoint. Double-click a breakpoint to remove it.
  6. Click the Registers tab to inspect the processor's registers.
  7. Click the Memory tab to inspect the memory contents.
  8. Click the Suspend button to stop the code operation.
  9. When you finish debugging, click Terminate to disconnect the OpenOCD debugger.

Results

Figure 1. Perform Debugging
Notice: For more information on debugging with Eclipse, refer to Running and debugging projects in the Eclipse documentation.