PEmicro’s product line of Cyclone stand-alone programmers provides a fast, robust, and automated solution for production-scale programming of microprocessors. However, production facilities may desire an even higher level of automation than the single-button touch capability that is offered by the Cyclone. PEmicro offers several means of automating control, including a console application, Ethernet/Serial protocol communications, or the SDK included in PEmicro's new Cyclone Control Suite. In this article, we discuss using the SDK to automate programmer control and the levels of flexibility and scalability that it offers our customers. NOTE: This example is shown in C. The Cyclone Control SDK interface code and demo applications are included for GCC, LabView, Microsoft Visual C, Microsoft Visual C#, Delphi/FPC, Python, Rust, and Microsoft Visual Basic. PEmicro’s new Cyclone Control SDK provides the developer with a dynamic link library (DLL), example applications, and supporting documentation to allow custom software applications to directly control the Cyclone. Binary data information, algorithm information, programming operations, and other settings are stored together in a SAP image which is saved directly into the FLASH memory of the Cyclone. Programming operations can be initiated by the push of a button on the Cyclone, however, the SDK enables a PC to issue a command to the Cyclone to start the same programming sequence, and also to provide other capabilities, such as the ability to add dynamic data to each board being programmed, and the ability to recover error information. The use of a PC to control the Cyclone enhances the functionality of the stand-alone programming operations and introduces new capabilities that were not available previously. In the following sections, we explore the features of the SDK and present practical examples of how to use it in your own automated production line. The above code example shows a very basic operation that is supported by the SDK. Below are the steps we have taken: The Cyclone already has a serial number programming mechanism built into the SAP image. The Cyclone can keep track of the serial number and auto-increment after a board is successfully programmed. Serial numbers can also be programmed into target boards via the SDK via the "overlay data" procedure, in which case the serial number capability of the Cyclone is not used. Rather, the calling application provides the dynamic "overlay" data and programs it after programming of the main image data has already occurred. When creating a programming image the default setting will prevent the overlay data function from overwriting any memory in the base image, however this setting can be changed. An example of when this might be useful is if the base image contains a default IP address in memory which the user wants to overwrite on a board by board basis. More information on the overlay data function is available in the article Cyclone Programming: Adding Unique Data to be Programmed Into Each Target Device. Note: The following are placeholder functions used to simplify the example, and are not provided by the automated control package: The above example code is based on the previous simple example which instructs the Cyclone to perform the stand-alone programming operations of the image stored on the Cyclone. Afterwards, we program a dynamic 2-byte serial number into address 0x1000 of the target processor. The serial number is then incremented and written back to a file for later use. In the SDK the overlay data must then be cleared (see final line of Figure 5). The SDK offers a lot of flexibility in handling serial numbers. This code example can easily be modified to program dynamic data that is not sequential. For example, if we wish to program the current date or a lot number. This code example can also be expanded to use multiple Cyclones (see Section 5) that share an incrementing serial number between all Cyclone units. Any of these requirements can be easily met by writing your own custom application using the SDK. This is a very simple example of how to ensure that the image stored on a Cyclone is always up to date. A comparison is performed between the image which currently resides on the Cyclone and an image file at a specified location on the host PC. If there is a mismatch, then we update the image. Afterwards, we proceed with the normal programming operations as seen in the previous examples. Cyclone, Cyclone network, and stored image settings can now be retrieved directly from a Cyclone using the property mechanism. Image properties allows you to read out information such as the image CRC, the current serial number, and the power settings. Cyclone properties allows you to read or set values such as the Cyclone name which can then be used in the future to open the Cyclone. You can see a list of the categories and properties in the header file of the programming examples that are included with the SDK. The routine getPropertyList returns a list of valid categories and their properties. The routine getPropertyValue returns the value of the category and property that you pass in as arguments. We have discussed some uses of the SDK with a single Cyclone unit in previous examples. Since the host PC only sends minimal control information to control each Cyclone, a single PC is actually capable of controlling multiple Cyclone units simultaneously. Here, we begin programming operations on 3 separate Cyclone units that are connected to the host PC. This will work even if all the Cyclones are connected on a mix of different ports. Then we wait for their completion before proceeding. In essence, we are programming 3 separate devices in parallel. This can be easily extended up to 100 Cyclone units in a network controlled in parallel from a single host PC. The first step is always to create the actual stand-alone images that will be stored onto the Cyclone. These images contain the algorithm needed to program FLASH / EEPROM, the actual binary data to be programmed, the sequence of programming operations, and many user-specified Cyclone settings. PEmicro’s “Cyclone Image Creation Utility” allows the user to properly configure the stand-alone images. Above is a screenshot of the dialog in the Cyclone Image Creation Utility which allows the user to configure the stand-alone image. The field on the right shows the programming steps and also the order in which these steps execute. In addition to the programming sequence, there are also settings for the Cyclone that we can configure. In the above screenshot, we are using the Cyclone Universal’s power relays to provide the 3.0 volts to power up our processor. This way, we do not need a separate power supply for our target board, simplifying our production line. Finally, we specify the image description so that we can easily identify the image later on. This is the text that appears on the screen of Cyclone. By using the “Store Image to Disk” option, we are able to save this image and its configuration as a .SAP file for future use with the SDK.1. Introduction – Controlling a Cyclone through the PC
2. Using the SDK – Simple Example
3. Using the SDK – More Advanced Operations
a. Programming a serial number ("overlay data" example)
b. Automatically update image stored on the Cyclone
c. Working with properties
4. Using the SDK - Gang Operation Example
More Info - Setting Up a Stand Alone Programming Image