Debugging OpenSBI or Linux Kernel

Prerequisite:

The StarFive Linux eSDK project, openSBI or Linux Kernel (linux-starfive-dev), is imported into StarFive StarStudio, and two configurations are auto-populated: openSBI and Linux Kernel:

To debug OpennSBI or Linux Kernel, perform the following steps:

  1. Navigate to Run > Debug Configurations... and double click GDB OpenOCD Debugging. There will be two default configs available:
    Figure 1. Auto-populated Configuration
  2. Choose the configuration (openSBI in this example) and press Debug to debug with the config.
    Result:

    You can now debug OpenSBI! For a detailed introduction to debugging on StarFive StarStudio, see Debugging on StarFive StarStudio.

    Figure 2. Example Output
    Graphical user interface, text, application Description automatically generated
You will need to connect to the FPGA via minicom to view the FPGA's output. For instructions for setting up minicom, see Installing Minicom on Linux to View FPGA Output.