Ashling* RiscFree* Integrated Development Environment (IDE) for Intel® FPGAs User Guide

ID 730783
Date 12/14/2023
Public
Document Table of Contents

6.8.2. Debugging the Arm* HPS Linux Kernel

Refer to the following steps to debug the Arm* HPS Linux Kernel:
  1. Boot Linux* on the Intel Agilex® development board using a Linux kernel ready for debugging.
  2. Go to File > Import > C/C++ Executable then click Next.
    Figure 42. Selecting Import Wizard
  3. In the Import Executable window, click Browse… and select the vmlinux executable location on your computer. Click Next.
    Figure 43. Importing C/C++ Executable Files
  4. Use Linux Kernel Debug for New project name. Select Ashling Heterogeneous Multicore Hardware Debug for Create a Launch Configuration, then click Finish.
    Figure 44. Choosing Project
  5. The Debug Configurations window appears. Use the Auto-detect Scan Chain button, if you need to populate the device list in the Device tab in the launch configuration. Perform and repeat the following steps for all four Cortex-A53 cores.
    Figure 45. Creating, Managing, and Running Configuration
    1. For the Linux debug session, check all the cores that Linux is running on as shown below.
      Figure 46. Linux Cores
      Note: Intel recommends you specify a proper memory access attributes to avoid unwanted or illegal memory access during the debug session. For example, the memory access region configured for Intel Agilex® platform is:
      set remotetimeout 10
      set mem inaccessible-by-default on
      mem 0xffff000000000000 0xffff0003ffffffff rw
      mem 0xffff800000000000 0xffff802effffffff rw
      Ensure you select the default path and then select aarch64-none-linux-gnu-gdb as the GDB Executable name.
    2. Click Target Application tab. Click Add. The Browse Executable window appears. For Project, click Browse... and select the current project. For C/C++ Application, click Browse... and select vmlinux as the executable. Click OK.
      Figure 47. Browse Executable Window
    3. After adding the executable, ensure you turn off Load image as the image is already loaded to the target.
      Figure 48. Target Application Tab
    4. Click the Startup tab. Ensure the configuration is as shown below.
      Figure 49. Startup Tab
    5. Go to OS Awareness tab. Turn on the OS Aware Debugging checkbox and select appropriate Linux kernel version.
      Figure 50. OS Awareness Tab
  6. After you complete the configurations for all of the Cortex-A53 cores, click Apply then click Debug. The debugger connects to the Linux running on the board, then it stops the cores, and display the current code, as shown below.
    Figure 51. idle.c tab
  7. Go to Linux > Processes > List Running Processes, and then the debugger shows the processes.
    Figure 52. Linux Process
  8. Right-click a process in the list, then select the Watch option. The debugger opens the process in the Watch window. You can now inspect its properties.
    Figure 53. Inspecting the Process Properties

    The following figure shows an example of the Linux process properties.

    Figure 54. Process Properties
  9. Go to Linux > Modules > List Loaded Modules to show the list of modules. In the example below only one module was loaded:
    Figure 55. Linux Modules
  10. Right-click a module in the list, then select the Watch option. You can inspect the module properties as shown in the figure below:
    Figure 56. Module Properties