Debugging with S32 Debug Probe from RAM

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 by S32 Debugger 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. To learn the details about S32 Debug Probe, refer to the S32 Debug Probe User Guide. The PDF version of this document is located in the /S32DS/tools/S32Debugger/Debugger/docs/ folder.
  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 board and the computer.
    • Interface: Specify the connection interface.
    • USB device: For the USB connection, specify the COM port to which the board is connected.

      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.

      If you have a problem with the USB connection:

      • On Windows, install the S32 Debug Probe driver manually. For details, refer to readme.txt in S32DS/tools/S32Debugger/Debugger/drivers/usb/.
      • On Linux, install the udevadm utility, this tool detects the used port.
    • 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.
    • Test connection: click the button to check the connection.
      Note: "Advanced Settings" function is only enable with S32Z2E2 and S32R41 at the moment, other target is not visible .
    • Refresh button updates the status of the USB device.
    JTAG Communication Speed Specify the JTAG communication settings.
    • JTAG Speed (KHz): Specify the JTAG speed.
    • Timeout: Specify the JTAG timeout.
    • 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.
    • 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.
    • Force thread list update on suspend: Enable this option for the thread list to be updated forcedly if the debug session is suspended.
    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 settings for secured chips.
    • Enable secure debugging: Enable this option to start a debug session on locked chip.
    • Debugging type: Select the authentication method. Options: Password, Challenge & Response.
    • Clear data stored: Click the button to delete any data from secure storage.
    Note: The availability and support of the option depends on the target device.
    Note: If the chip is unlocked, enabling secure debuging is meaningless.
    Note: Secure debugging Challenge & Response is only supported on Windows.
    Note: Secure debugging with Password is supported on both Windows and Linux.

  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. Debug the application as usual.