Starting a debug session on APEX2

Before you proceed to debugging on APEX2, you need to start a debug session for the host application on the Linux target. Refer to Starting a debug session on remote Linux for the detailed instructions.

To start debugging on an APEX2 core:

  1. In the host debug session, click Resume at the first stop (main). When the breakpoint is hit again, do the following:
    • If the Linux application is designed for work with a single APEX2 graph, click Resume once again, then proceed to the next step.
    • If the Linux application works with multiple APEX2 graphs, keep clicking Resume until the session passes through the load segment section of the required core. When the core appears in the Console view, proceed to the next step.
  2. Open the Debug Configurations dialog box and go to the S32 Debugger group of configurations.
  3. Click the debug configuration created for your APEX2 graph project and named accordingly, or create a new configuration and open it.
  4. On the Main tab, the “APU” option needs to be selected from the Build Configuration menu. Make sure that the Project field shows the name of the host application project and the C/C++ Application field specifies the path to the APEX2 application (APU/<apex2_graph_project_name>.elf).


    Editing the launch configuration for APEX2

  5. On the Debugger tab, the following settings are required:


    Editing the debugger settings in the launch configuration for APEX2

    • Device and Core: The target device and the APEX2 core on which the debug session will be started. Click Select device and core and pick the required APEX2 core from the list.
    • Initialization script: The “s32v234_attach.py” script with the board connection parameters is needed.
    • Initial core: This option needs to be enabled.
    • Debug Probe Connection: Specify the connection between S32 Debug Probe and the workstation.
    • Commands: The “set little endian” command is required.
    • Enable semihosting: Enable this option to output the debugging information to the semihosting console.

    Learn more about the S32 Debugger configuration settings in Vision Extension Package for S32V2xx 1.0.0 User Guide.

  6. On the Startup tab, keep the Load symbols option enabled and select Use project binary. Disable the remaining options.
  7. On the Source tab, make sure that the following path mappings for Vision SDK are available on top of the list. If not, click Add and add the required path mappings:
    • Top-position mapping:
      • Compilation path: <vsdk_dir>\libs\apex\acf-target\build-apu-nxp-sa-d
      • Local file system path: <vsdk_dir>\libs\apex\acf-target\build-apu-nxp-sa-d
    • Next mapping:
      • Compilation path: <vsdk_dir>\libs\apex\common\build-apu-nxp-sa-d
      • Local file system path: <vsdk_dir>\libs\apex\common\build-apu-nxp-sa-d
  8. Click Apply, then click Debug. The debug session on APEX2 is started.
When debugging on APEX2, you can use up to four hardware breakpoints, do step-by-step execution, view registers and memory sections.

When done with debugging on APEX2, do not terminate the debug session to continue debugging on Linux. If you have terminated the debug session on APEX2, the debug session for the Linux application can no longer be used.