HOWTO: Add a new debugger configuration to an existing project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

HOWTO: Add a new debugger configuration to an existing project

HOWTO: Add a new debugger configuration to an existing project

When a new application project is created using the New Project Wizard, it is possible to select the debugger to be used. This results in the associated debugger configurations being created within the new project. But what if support for multiple debuggers is required or it is desired to switch to a different debugger? There are easy ways to resolve this. One is as simple as creating a new debug configuration. Another method is by creating new application project, selecting the new debugger to be supported. Then either repurposing the associated debug configuration or duplicating then modifying the debug configuration to support instead the previously existing project. This minimizes the effort by benefiting from the automation of the New Project Wizard.

 

Detailed below are the steps to add a new debug configuration. 

Create A New S32 Debugger Configuration

  1. Load the existing project. For this demonstration, the SDK project ‘hello_world_s32v234’ will be used.
  2. Select the project so it appears highlighted in blue.

    mikedoidge_2-1618502998085.png

    Notice that the other project, ‘New_App_Project’, is bold text. This is because the main.c file open in the editor window to the right is the currently selected source file and is from this project. This has no effect on the process detailed in this document.
  3. Check that the existing project has been build and the executable is present. If the executable is not present, then an error will be displayed within the Debug Configurations menu and the executable file will need to be selected in a later additional step after it has been created.
  4. Open the Debug Configurations menu. Run -> Debug Configurations

    mikedoidge_3-1618503057621.png

     

  5. Now select the Debugger Group for which you wish to create the new configuration. In this case, we will select ‘S32 Debugger’.

    mikedoidge_4-1618503102530.png

  6. Next, click ‘New Launch Configuration’

    mikedoidge_5-1618503240330.png

  7. Now a new Debug Configuration has been created for your project and for the S32 Debugger. Most of the fields are already completed for you. Select the Debugger tab to see the source of the error message.

    mikedoidge_6-1618503272212.png

  8. The error message indicates ‘Specify Device and Core’. So click on ‘Select device and core’.
    mikedoidge_7-1618503322900.png

  9. Now expand the lists until the Device and Core are visible. Select the correct core for your project. In the demonstration example, the correct Device and Core are ‘S32V234’ and ‘M4’, respectively. Click OK, when done.

    mikedoidge_8-1618504433139.png

  10. If you have a debug probe connected, it may have been detected. If not, the Debug Probe Connection section will need to be completed. Now select the ‘Common’ tab to setup the storage location for this new Debug Configuration.

    mikedoidge_9-1618504500358.png

  11. Select ‘Shared file’ and then ‘Browse…’

    mikedoidge_10-1618504532843.png

  12. Expand the lists until ‘Project_Settings/Debugger’ is open. Select ‘Debugger’, then click OK.

    mikedoidge_11-1618504568372.png

  13. Now the basic debug configuration settings are complete. It is now ready to be used and the Debug button could be clicked to start debug. Otherwise, you may have more customizations to make, such as for Attach Mode.

Repurpose S32 Debugger Configuration From A New Project

  1. Create new project
    1. New -> S32DS Application Project
      mikedoidge_12-1618504622748.png

    2. New Project Wizard, processor and toolchain page
      1. Enter a project name
      2. Select the device and core to match the existing project
      3. If necessary, select the toolchain to match the existing project
      4. Click Next

        image.png

    3. New Project Wizard, cores and parameters page
      1. Select the number of cores to match the existing project
      2. Select the debugger, S32 Debugger
      3. If necessary, select other parameters to match the existing project
      4. Click Finish

        image.png

  2. Open existing project which does not already have the S32 Debugger debug configurations (for this demonstration, we will use the hello_world_s32v234 example project from the S32 SDK)
  3. Copy debug configurations and modify settings to adapt to existing project
    1. Run -> Debug Configurations...
      image.png
    2. Debug Configurations window
      1. Within the S32 Debugger grouping, select the debug configuration for the new project which corresponds to the build configuration and core of the existing project
      2. Change the name of the debug configuration. Change the portion of the name containing the project name to match the name of the existing project.
        image.png
      3. Main tab
        1. Project field
          1. Click Browse...
          2. Select existing project
            image.png
        2. C/C++ Application
          1. Click Search Project...
          2. Select the Elf file
            image.png
      4. Common tab
        1. Save as field
          1. Click Browse...
          2. Select {existing_project_name}\Project_Settings\Debugger
            image.png
      5. Debugger tab, Debug Probe Connection
        1. Setup connection parameters
          image.png
        2. Click Apply
        3. Repeat as needed for all core/build config options
  4. The existing project now has the S32 Debugger configurations and is ready for debug with the S32 Debug Probe.
No ratings
Version history
Last update:
‎04-15-2021 09:41 AM
Updated by: