SE Manager Host Firmware Upgrade and Debug Lock

This example uses the SE Manager API to upgrade the host firmware and enable debug lock on the supported Series 2 device.

The start address of host firmware image (HOST_FIRMWARE_ADDR) is defined in app_host_firmware_image.h and the default value is 0x00040000.

The host firmware image (.bin) can be converted to a C source file by SEGGER free utility Bin2C.exe. Copy the host firmware image data array (discard the last NULL-0x00 character) in converted C file to host_firmware_image[] array in app_host_firmware_image.c.

The example redirects standard I/O to the virtual serial port (VCOM) of the kit. By default, the serial port setting is 115200 bps and 8-N-1 configuration.

The example has been instrumented with code to count the number of clock cycles spent in different operations. The results are printed on the VCOM serial port console. This feature can be disabled by defining SE_MANAGER_PRINT=0 (default is 1) in the IDE setting (Preprocessor->Defined symbols).

SE Manager API

The following SE Manager APIs are used in this example:

Getting Started

  1. Upgrade the kit’s firmware to the latest version (see Adapter Firmware under General Device Information in Simplicity Studio 5 Users Guide).
  2. Upgrade the device’s SE firmware to the latest version (see Secure Firmware under General Device Information in Simplicity Studio 5 Users Guide).
  3. Open any terminal program and connect to the kit’s VCOM port (if using Device Console in Simplicity Studio 5, Line terminator: must be set to None).
  4. Create this platform example project in the Simplicity IDE (see Examples in Simplicity Studio 5 Users Guide, check Platform() checkbox to browse the platform examples).
  5. Build the example and download it to the kit (see Simple Build and Flash Programmer in Simplicity Studio 5 Users Guide).
  6. Run the example and follow the instructions shown on the console.

Additional Information

  1. The current host firmware image in app_host_firmware_image.c is a VCOM example that echoes typed characters to VCOM when a carriage return is hit.
  2. For a device with VSE, a reset will be issued when running specified SE Manager APIs.
  3. For a device with VSE, it requires SE firmware version v1.2.5 or above to enable debug lock through SE Manager API.
  4. The device should disconnect from the debugger when upgrading the host firmware or applying the debug lock.
  5. The default optimization level is Optimize for debugging (-Og) on Simplicity IDE and None on IAR Embedded Workbench.