Intel® System Debugger User Guide

ID 648476
Date 06/13/2024
Confidential
Document Table of Contents

Prepare the Target

If you want to debug the application that is already stitched in the Intel® Programmable Services Engine (Intel® PSE) firmware or a prebuilt binary, you need to point to that binary instead of the Zephyr* Application. Commonly, you can find this binary at <path-to-PSE>/pse-dev-code-base/ehl_​pse-fw/build/zephyr/zephyr.elf.

Note:

If you want to debug another application, clean the pse project and build it again pointing to another application.`.

Launch the Debugger

  1. Launch the GDB* debug server located at /opt/intel/oneapi/system_​debugger/<version>-nda/system_​debug/gdbserverproxy/ in a new terminal.

    ./start_gdbserverproxy.sh
    
  2. Ensure that the gdbserver successfully detects your target.

  3. Launch Intel® System Debugger NDA.

  4. In the Project Explorer view, right-click on your application project and select debugDebug As > Debug Configurations.

  5. In the opened dialog box, create a new Zephyr* debug configuration by double-clicking Zephyr Hardware Target.

  6. Open the Main tab and apply the following configurations:

    1. Specify the name of the project to debug.

    2. In the C/C++ Application field, select the binary to debug. By default, the Zephyr* application binary is selected.

      If you want to change the binary, click Browse and locate the new one (for example: <path-to-PSE>/pse-dev-code-base/ehl_​pse-fw/build/zephyr/zephyr.elf).

    3. Select Do not flash hardware target and Do not start debug server.

    4. Click Apply.

      debug_config_main

    5. Switch to the debug Debugger tab.

    6. Ensure that the path in GDB Command points to the proper gdbserver from Zephyr* SDK. Example:

      <path-to-zephyr-sdk>/arm-zephyr-eabi/bin/arm-zephyr-eabi-gdb

      Otherwise, click Browse and navigate to the proper location.

    7. Add the following arguments to the command line: -ex 'set arm force-mode thumb'.

    8. In JTAG Device drop-down list, select OpenIPC. Host name localhost and port 8086 must appear automatically.

      If OpenIPC is not in the drop-down list, upgrade the plugin.

    9. Click Apply to save tab changes.

      debug_config_debugger

  7. Switch to the Startup tab:

    1. Check Load image box and select Use project binary option.

      Note:

      If you want to debug an application that is already stitched to Elkhart Lake, uncheck the Load Image box.

    2. Depending on the binary configuration, check other boxes as follows:

      • If the binary was built with symbols and source code (debug configuration), check the Load symbols box.

        Select the Use project binary option and ensure that it points to the same binary as the one in Main tab. If you want to debug the binary from Zephyr* application, it will point to zephyr/zephyr.elf. Otherwise, it will be similar to the one under the Load image box.

        debug_config_startup

      • If the binary was built without symbols and source code (release configuration), leave the Load symbols checkbox empty.

    3. Click Apply to save tab changes.

  8. Click Debug.

Now, the target connection is established. In the gdbserver terminal, you can see a message exchange that indicates successful connection.