HOWTO: download separate elf/srec/hex file to microcontroller using S32 Design Studio

Document created by Martin Kovar Employee on Jul 18, 2016Last modified by stanish on Aug 15, 2017
Version 4Show Document
  • View in full screen mode

This document contains the instructions how to download separate elf/srec/hex file to the microcontroller using S32 Design Studio and USB PE Micro Universal Multilink/OpenSDA debug probes. This could be used in case you get an executable/binary image file only without any project or source code.

 

There are basically three ways:

 

  1. flash programming support in IDE. This is only useful for programming the device. (it is available in S32DS ARM v1.3+, S32DS Power v1.2+)

  • Create a new configuration, adjust its name and browse for elf/srec/hex file:

  • Select MCU and specific core you are targeting:

  • Select where the Flash Configuration should be saved into - workspace metadata (local file) or as a specific file e.g. part of an existing project (shared file). This way the config could be e.g.transferred with this project.

Click on "Flash" button to proceed to programming. As soon as the device is programmed it's disconnected.

 

 

2. Executable file importer. Go to menu File -> Import -> Select "Executable File Importer"  this starts the wizard. This is for programming and debugging an executable elf object file only.

  • Select the MCU/core you are targeting and browse for the .elf file

  • Adjust the project name and create a debug/launch configuration (PEMicro GDB server example). If the .elf file is built on another machine and the source files are available but located in a different folder the source path could be adjusted. Source-level debugging is then possible.

 

  • Finish the wizard and new "container" project for your elf is created.

  • Its debug configuration opens automatically. "Debug" button starts the load/debug of the selected elf file.

 

3. reuse an existing project debug configuration or create a new dummy project for loading .elf/srec/hex

  • Create new project which will provide basic debug settings
  • Compile the project
  • Copy the required .elf file to the created project Debug folder
  • Open new project Debug configuration
  • Choose correct project and set the correct .elf/srec/hex you want to download
  • Click Apply button and then Debug button.
  • The debug window with correct .elf file will be opened. Program is downloaded and you are able to debug or run it.
6 people found this helpful

Attachments

    Outcomes