HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32R45 EVB

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

HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32R45 EVB

HOWTO: JTAG Flash Programming with S32 Debugger and S32 Debug Probe for S32R45 EVB

The S32 Debugger included within the S32 Design Studio for S32 Platform IDE provides the capability to access the flash programming capabilities of the S32 Debug Probe via the S32 Debugger.

 

Note: currently only QSPI flashing is supported.

 

Preparation

  1. Install S32 Design Studio IDE 
  2. Install the Development Package for the device you are debugging. In this case, the S32R4xx development package. This package is important as the S32 Debugger support component contains the device-specific Python scripts required for initialization of the cores.

    pastedImage_2.png
  3. Open the application project from which the flash image will be generated.
  4. Follow the steps in HOWTO: Generate S-Record/Intel HEX/Binary file , selecting the 'Raw Binary' option.
  5. Build the project, generating the binary executable. This will be our application binary input to the IVT Tool. The IVT Tool must be used to generate the BLOB image which can be programmed to flash memory device and loaded to the RAM by the BootROM.

    pastedImage_6.png

    Follow the steps in HOWTO: Use IVT Tool To Create A BLOB Image S32R45. The resulting BLOB image file is what can be flashed to the device.

 

Procedure

  1. Open Debug Configuration menu
  2. Select 'S32 Debugger Flash Programmer', then right-click and select New.

    pastedImage_7.png
  3. Enter an name for the new configuration and click Add... to add the file to be flashed.

    pastedImage_10.png

  4. Click Browse... to select the project from the workspace where the application binary is located

    pastedImage_11.png

  5. Select the project and click OK

    pastedImage_15.png

  6. By default, the ELF file is found. Click Search in project to select the binary file.

    pastedImage_16.png

  7. Select the .bin file and click OK

    pastedImage_19.png

  8. Now we must enter the base address. Typically, this could be 0, but you may have other requirements. Click OK.

    pastedImage_20.png

  9. Now we are ready to configure the debugger connection settings. Click on the Debugger tab.

    pastedImage_23.png

  10. Starting from the top and working our way down, click on Select device.

    pastedImage_26.png

  11. Select the device and click OK

    pastedImage_1.png

  12. The correct Initialization script will automatically be set. Set the Debug Probe Connection settings to match your setup. When done, click Apply

    pastedImage_2.png
  13. To start the flashing, click Debug

    pastedImage_3.png

  14. Flashing progress will be displayed.

    pastedImage_9.png

  15. When complete, the Debug perspective will show at terminated thread.

    pastedImage_10.png
  16. Happy flashing with GDB!

Note, to debug this application since it will be subsequently started by the BootROM:

  • use 's32r45_attach.py' in the Initialization script field on the debugger tab of the Debug Configurations menu
  • Make the following adjustments on the Startup tab within the Debug Configurations menu:
    • Uncheck "Load image"
    • Check “Set program counter at:” and enter the value “Reset_Handler”
No ratings
Version history
Last update:
‎04-06-2021 09:57 AM
Updated by: