PEmicro Blog

Programming with Dynamic Data Using "Overlay Data"

by Johnny Ng & Keith McNeil on Nov 03, 2023

This blog post was updated in Nov. 2023 to feature general information about overlay data programming.

PEmicro's Cyclones offer a few ways to program Dynamic Data - serial numbers, MAC addresses, etc. - that the user might wish to program into their devices. One such approach, wihch is available as part of both the Control Console and Control SDK, is callled Overlay Data. This blog post will demonstrate how to use Overlay Data as part of the programming process.

Overlay Data

Overlay Data here refers to the concept of overlaying one set of data on top of another before programming. This enables the user to add dynamic data as part of the programming process. The overlay can be done programmatically using the Cyclone Control SDK, or on the command line using the Cyclone Control Console. Examples are provided for each below. The data itself can be in either hexadecimal format or string format; there are separate commands for each in both the Control SDK and the Control Console. 

When using an overlay function, the function passes the dynamic data that the user wants to program to a specific Cyclone handle (identifier). Prior to programming, that dynamic data will be overlaid onto the data in the user’s s-record. The user needs to provide:

  • the Cyclone handle,
  • the first memory address where the dynamic data will be written
  • the total number of bytes to be written
  • a pointer to the array that holds the dynamic data.

Once the data is overlaid, programming then occurs in a single step. Careful planning is required because it is possible for the Overlay Data to overlap areas already specified by the user in memory, and no error will be given. Almost always the user will leave gaps in the Image/Job Data to allow room for the Overlay Data.

Figure 1: User Provides Gaps in S-Record for Overlay Data

Below are examples for how the basic overlay commands are used in both the SDK and the Console. Please refer to the appropriate Cyclone User Manual for more granular information about overlay data command functions and parameters.

Cyclone Control SDK:

bool specifyOverlayProgramData(uint32_t cycloneHandle, uint32_t targetAddress, uint32_t dataLength, char* buffer);

The function has to be called prior to startImageExecution. The first parameter is the handle of the Cyclone. The second parameter is the address where the overlaying of the data starts. The third parameter is an array of bytes holding the data in hex.

data = [80,69,77,73,67,82,79]

specifyOverlayProgramData(1, 1080, data)


Cyclone Control Console Example:

Please note that the Console command differs slightly from the SDK command. The command -specifyOverlayData must be placed before the command -launchimage.

CycloneControlConsole.exe –cyclone=USB1 -specifyOverlayData=1,1080,80,69,77,73,67,82,79 -launchimage=1

Cyclone Control Suite and Licensing

The CycloneControlConsole and CycloneControlSDK Library are included for free in the standard software package  here.

Tags related to this Blog Post

Cyclone     Cyclone FX     ARM     NXP     Production Programming