Debugging with S32 Debug Probe

This topic describes how to debug a bare-metal application on the board connected to the computer with the S32 Debug Probe. The application is loaded to RAM memory of the target.

To debug an application with the S32 Debug Probe from RAM:

  1. Create an application project in the wizard and specify “S32 Debugger” as the debugger.


    Creating a project for debugging with S32 Debug Probe

  2. Connect the board to your computer using the S32 Debug Probe. To learn the details, refer to the S32 Debug Probe User Guide. The PDF version of this document is located in the local folder <S32 Design Studio installation folder>/S32DS/help/pdf>.
    Note: If S32 Design Studio is running on Linux and the probe is connected to a USB port of your computer, make sure to install the udevadm utility. This tool detects the port used by the probe.
  3. Build the project.
  4. Open the Debug Configurations dialog and go to the S32 Debugger group of configurations. Click the debug configuration for debugging from RAM generated for your project.
  5. On the Main tab, verify the following settings:
    • Project: The path of the application project.
    • Application: The path of the executable (ELF) built from the application project.
    • Build Configuration: The build configuration for debugging from RAM. If you activate the Enable auto build option, this build configuration will be used to rebuild the application before each debug session.
  6. On the Debugger tab, specify the following settings:


    S32 Debug configuration

    Table 1. Debugger tab: Settings for debugging with S32 Debug Probe
    Setting Description
    Hardware Specify the settings related to the target:
    • Select device and core: Click this button and pick the target processor and the core from the list. The data appears in the Device and Core fields.
    • Initialization script: The path of the generic initialization script generated automatically.

      To specify the script particular to your evaluation board, go to the following folder:

      <S32 Design Studio installation folder>/S32DS/tools/S32Debugger/Debugger/scripts/s32xxxx

      The last folder in the path is named as your target processor, for instance, /s32v234. Find the information about the available script files in the readme file located in this folder.

    • Initial core: Enable this option if the debug configuration will start the first debug session in a launch group or the only debug session in single-core debugging. When enabled, this option indicates that the evaluation board needs to be initialized.

      In multi-core debugging, make sure to disable this option in all debug configurations that start the second and all later debug sessions in a launch group.

      Note: When disabled, the Initial core option makes the probe connection settings, JTAG settings, and GDB server settings (below) unavailable.
    Debug Probe Connection Configure the connection between the S32 Debug Probe and the computer.
    Note: If the Initial core option (above) is disabled, these settings are not available.
    • Interface: Specify the connection interface. Options: USB, Ethernet.
    • Port: For the USB connection, specify the COM port to which the probe is connected.
      Note: If the board is not connected with the USB cable, connect it and wait for the probe's TX/RX indicator to get green. Then click Refresh for the connected COM port to appear on the Port menu.
    • Hostname or IP: For the Ethernet connection, specify the host name or IP address of the probe network adapter.
      Note: To learn the host name of the probe, refer to the documentation provided with the delivery kit. For the static IP address assigned to the probe, consult your network administrator.
    JTAG Communication Speed Specify the JTAG communication settings.
    Note: If the Initial core option (above) is disabled, these settings are not available.
    • JTAG Speed (KHz): Specify the JTAG speed. Default: 16,000 KHz.
    • Timeout: Specify the JTAG timeout. Default: 30 seconds.
    • Delay after reset: Enable this option to perform software reset on the device at the beginning of the debug session. Specify the board initialization delay (in milliseconds).
    GDB server Specify the GDB server settings.
    Note: If the Initial core option (above) is disabled, these settings are not available.
    • Launch server: This option launches the GDB server. Keep it enabled unless the GDB server is started from the command line.
    • Server port number: Specify the GDB server port. When debugging multiple cores of a single processor, specify the same port in all debug configurations. Default: 45000.
    • Enable log: Enable this option to log the GDB server output. This option is disabled by default.
      Note: Logging may greatly reduce the speed of the debugging process.
    GDB Client Specify the GDB client settings:
    • Executable: The path of the GDB client. This path is generated automatically when you click the Select device and core button and select the target device and the core.
    • Commands: If required, specify commands to be executed after the GDB client is started. These commands are executed next to the commands specified on the Startup tab.
    Semihosting Configure semihosting, that is, the ability of the debug session to send output to the Console view.
    • Enable semihosting: Enable semihosting.
    • Port: The port for semihosting. Read-only. The port number is defined as (GDB server port +1). Default: 45001.
    Note: If semihosting is enabled, the semihosting console needs to be opened in the Console view once the debug session is started.
    Secure debugging Configure the security policy settings.
    • Enable secure debugging: Enable this option to start a debug session in secure mode.
    • Debugging type: Select the authentication method. Options: Password, C&R.
    Force thread list update on suspend Enable this option for the thread list to be updated forcedly if the debug session is suspended.

  7. On the Startup tab, specify the place in code where the first breakpoint will be set (main by default). Leave the remaining settings with their default values.
  8. Click Apply, then click Debug. The debug session is started and stopped at the first breakpoint.
  9. Click Resume and debug the application.