Debug - Single Core

About this task

By default, the OpenOCD debugger always targets the first core, core 0, when debugging. If your SoC has multiple cores, you can do standalone debugging with a core other than core 0. This debug method uses the openocdServer debug launch scripts, which are available in the software/standalone/openocdServer directory. The general procedure is:

Procedure

  1. Create an SoC with more than 1 core.
  2. Import your software project in Efinity RISC-V Embedded Software IDE.
  3. Import openocdServer project with New > Makefile Project with Existing Code.
  4. Start the OpenOCD server.
    1. Right-click openocdServer > openocdServer_<family>.launch.
    2. Choose Debug As > openocdServer_<family>.
  5. Modify the debug configuration for your application to use the OpenOCD server:
    1. Right-click <project folder> > Debug As > Debug Configurations.
    2. Choose GDB OpenOCD Debugging > <launch script> (e.g., axiDemo_trion).
    3. Click the Debugger tab.
    4. Turn off Start OpenOCD locally.
    5. Under Remote Target, change the Port number for the core you are using (the default is 3333 for core 0).
      • 3333: Core 0
      • 3334: Core 1
      • 3335: Core 2
      • 3336: Core 3
  6. Click Debug. The RISC-V IDE enters into debug mode targeting the CPU that you specified with the port number.

Results

Figure 1. Modify Debug Configuration for another Core