P&E Microcomputer Systems: Over 30 years as an Industry leader in Embedded Systems Development Tools, debug probes, and production programmers
Cart New Account Login

HomeAbout usProductsSupportForumsBlogCustomer Service



by Esteban Gonzalez

    

Automatic selection and launch of a specific flash programming image based on a scanned barcode can improve the speed and accuracy of production programming, especially when there is a varied product mix being programmed. Barcode scanning improves accuracy by making the process of selecting a programming image fast, automatic, and less vulnerable to user error. P&E's CYCLONE FX programmers have the ability to use a barcode scanner, connected via the Cyclone's host USB port, to initiate programming. When a barcode is scanned, the Cyclone selects a specific programming image based on the barcode and programs the target board accordingly.



Click to read the full article






Overview

P&E’s Cyclone PRO/MAX Stand Alone Programmers offer an impressive array of capabilities such as in-circuit flash programming, stand-alone programming, and as much as 7MB internal non-volatile memory for storing programming images. And now this memory space can be expanded via optional software which enables the Cyclones’ CompactFlash interface. The expanded storage feature simplifies management of Stand-Alone Programming images. This Expert’s Corner explains how to take advantage of the CompactFlash card feature to facilitate the Stand-Alone Programming process.

Contents

  1.    Introduction – Stand Alone Programming
  2.    Setup – Image Creation
  3.    Using CompactFlash – Inserting a CompactFlash Card
  4.    Using CompactFlash – Storing an Image into CompactFlash
  5.    Using CompactFlash – Selecting an Image on the LCD screen
  6.    Limitations
  7.    Security
  8.    Conclusion

1. Introduction – Stand Alone Programming

One of the key features of the Cyclone PRO/MAX Stand-Alone Programmers is the ability to store all necessary programming information - binary data, algorithm information, and programming settings – in the Cyclone’s internal memory, in a format known as the Stand-Alone Programming (SAP) Image. This allows programming operations to be initiated by pushing a single button.

There are currently two methods that can be used to load a SAP image onto a Cyclone. If only a single image is necessary for production, that image can be stored directly on the Cyclone using the “Cyclone Image Creation Utility”.If several images are necessary for production, the “Cyclone Image Creation Utility” can first be used to create all the SAP images, and then the “Cyclone Image Manager” can be used to load all the images simultaneously into the cyclone.

These methods are useful for updating small SAP images stored internally, or when the unit is easily accessible from a host PC. However, the procedure becomes a bit more involved if the Cyclone unit is not easily accessible. If the unit is at a different manufacturing plant, for example, or overseas, the user would have to obtain the Cyclone, update the images, and then send it back to its original location. However, with the addition of CompactFlash support this process becomes a matter of simply removing a CompactFlash card with one set of images and plugging in another with the new set, thereby reducing the need for an additional PC and engineering support. This makes it very easy to reconfigure images in the field.

In addition, activation of the Cyclone’s CompactFlash capability provides support for images which are larger than the internal memory storage space. A firmware image of 16 MB intended for programming into a hybrid engine controller, for example, can now easily be stored on a CompactFlash card.

The following sections demonstrate how to use the CompactFlash feature. We will create a SAP image example and then store it on a CompactFlash card in a Cyclone MAX, Rev. B.

Back to top

2. Setup – Image Creation

First we create a SAP image using the “Cyclone Image Creation Utility” and save the SAP image on the PC.Then we transfer the image onto the Cyclone’s CompactFlash card. In the screenshot below, the “Cyclone Image Creation Utility” is configured for Freescale Power Architecture 5534 with a typical programming sequence:



Additional settings for the SAP image may need to be configured depending on the architecture. For the Power Architecture there are three other settings to configure, which are as follows:

   1. BDM Shift Frequency: 5, which corresponds to a communication frequency of 2.2 MHz. This clock cannot typically exceed a 1/6th of the processor bus frequency.
   2. Reset Delay: 0. The reset delay section allows the user to set a delay before attempting communication. It is generally used if a reset driver exists on the target board which further asserts reset for a longer delay. In this example we will use a reset delay of zero.
   3. Image Description: Field_Upgrade_Hybrid_3.49. The field for “Image Description” is used for naming each image that is created.

 


After verifying that the programming settings are correct, use the “Store Image to Disk” button to save the image on the PC. Then load the image into the CompactFlash card by using the “Cyclone Image Manager Utility”.

In this example, the SAP image is saved on the Desktop:

 

 

Back to top

3. Using CompactFlash – Inserting a CompactFlash Card

Insert the CompactFlash card into the “Flash Expansion Port” on the Cyclone Max Rev. B. It is not necessary to power off the Cyclone Max Rev. B before inserting the CompactFlash Card.

Upon insertion of a blank CompactFlash card the Cyclone prompts the user to format the card for use with the Cyclone device. The user should use only a P&E branded CompactFlash card to guarantee proper operation.

 

Back to top

4. Using CompactFlash – Storing an Image into CompactFlash

If the Cyclone’s CompactFlash capabilities have been activated, the “Cyclone Image Manager” will display a section that can be used to manage images stored on the CompactFlash. The new Cyclone Image Manager software is sold separately and must be registered before use. Below is a screenshot which shows the “Browse & Add Images to CompactFlash” section activated:

In this example, the Cyclone MAX, Rev. B is named “Persepolis” and has an IP address of “209.61.110.151” with two SAP images already stored in its internal memory.

The section labeled “Browse & Add Images to Internal Memory” has been updated so that SAP images stored in internal memory will be displayed with a prefix of “IN#:” The prefixes are automatically added after a SAP image is stored. The functionality of the buttons, “Remove All”, “Remove”, and “Add”, remain the same as before. “Remove All” will remove all the images from the internal memory. “Remove” and “Add” are used to configure a list of images to be stored in the Cyclone MAX, Rev. B internal memory. A screenshot of this section appears below:

 

 


To store a SAP image on the CompactFlash, click on the “Add” button under the second section, “Browse & Add Images to CompactFlash”.

In this example, the SAP image “Field_Upgrade_Hybrid_349.SAP” created in Section 2 is selected. After selecting the correct SAP image, click open. The SAP image should now be listed in the “Browse & Add Images to CompactFlash” section. Shown below is a screenshot of “Browse & Add Images to CompactFlash” before committing changes. The prefix “EX#” is added before the file name to designate it as CompactFlash external memory.

 

After verifying that the correct SAP image has been added to the list, click on “Commit Changes” to store the image into the CompactFlash card. Shown below is a screenshot of “Browse & Add Images to CompactFlash” after committing changes. Note that the image is now listed on the left.

Several SAP images can also be added at the same time. In the screenshot below, two extra SAP Images have been added to the CompactFlash card.

 

Now that the SAP images have been added to the Cyclone’s CompactFlash card, we can use LCD screen and interface buttons on the Cyclone MAX, Rev. B to select which image to use for stand-alone programming. The next section discusses the steps needed for selecting a SAP image.

If you wish you may watch this brief video demonstrating how to load a programming image onto the CompactFlash.

Back to top

5. Using CompactFlash – Selecting an Image on the LCD screen

After storing the SAP images into the internal memory and CompactFlash, the status window displayed on the Cyclone MAX, Rev. B appears as below:

To change the selected SAP image press the “Menu/Select” button, which brings up the main menu:

Then press the “Menu/Select” button again when “Select SAP Image” is highlighted.

This will bring up a list of available SAP images. As mentioned previously, the prefix “IN#:” indicates that an Image is stored in internal memory and the prefix “EX#:” identifies that an Image that is stored in CompactFlash. Scroll until the desired image is highlighted and then press “Select”.

Once the SAP image is selected, its name will be displayed in the status window:

Back to top

6. Limitations

The CompactFlash feature is currently available on the Cyclone MAX, Rev. B and Cyclone PRO, Rev. C. Only P&E Micro branded CompactFlash cards are guaranteed to work with the these Cyclones.

The largest currently supported CompactFlash card memory size is 128 megabytes. The largest number of distinct SAP images that can be stored on one CompactFlash card is 248.

Back to top

7. Security

For added data security, information can only be written to the CompactFlash through the Cyclone MAX, Rev. B and Cyclone PRO, Rev. C, and datasets cannot be extracted from the CompactFlash once they have been written.

Back to top

8. Conclusion

With the new CompactFlash card feature, P&E’s Cyclone PRO and Cyclone MAX Stand-Alone Programmers are no longer constrained by a limit of eight SAP images in the internal memory. Furthermore, updating a SAP image at an off-site production facility or on the field is now as easy as sending a CompactFlash with the new SAP Image. Archiving each new version of an image becomes easier by storing each new image on a separate CompactFlash Card.

Back to top

Juan See is a Design Engineer at P&E Microcomputers.  He can be reached at jsee (at) pemicro.com.

© 2009 P&E Microcomputer Systems






Cyclone ACP, Rev. C P&E’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. P&E offers several means of automating control, including a command-line executable, UDP/Serial communications, or the .DLL included in P&E's new Cyclone Automated Control Software Package. In this article, we discuss automated control using the automated control package and the unprecedented level of power and flexibility that it offers.


1.) Introduction – Controlling a Cyclone through the PC

P&E’s new Cyclone Automated Control Package provides the developer with a dynamic link library (DLL) and supporting documentation to allow custom software applications to directly control the Cyclone.

By storing the binary data information, algorithm information, and settings directly into the FLASH memory of the Cyclone, programming operations can be initiated by the simple push of a button. However, the DLL enables us to use the PC to issue a command to the Cyclone to start the same programming sequence!

The use of a PC to control the Cyclone enhances the functionality of the stand-alone programming operations, but also introduces new capabilities that were not available previously. In the following sections, we explore the features of the Cyclone Automated Control Package and present practical examples of how to use it in your own production line.


2.) Setup – Image Creation

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. P&E’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.

1.)    First, we select the appropriate algorithm for our processor. In this example, we are using the Freescale HC9S08GB60.

2.)    Next, we specify the target object file that represents the binary data to be programmed into the processor’s FLASH memory. Here, we are using a Motorola S-record file.

3.)    Once the algorithm and the target object file are specified, we are ready to begin programming. Typically, the procedure is to erase the device to make sure it’s blank, program the target, and verify that the contents were written correctly.


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 PRO’s power relays to provide the appropriate voltage 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. 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.


3.) Using the DLL – Simple Example

 

The above code example shows the most basic operation that is supported by the Cyclone Automated Control Package. Below are the steps we have taken:

Step 1: Contact the desired Cyclone by specifying its IP address. The handle of the Cyclone is returned, and is used to identify the Cyclone in all subsequent function calls.

Step 2: Send a command to the Cyclone to begin the programming operations specified in image #1. These operations were specified during the image creation process.

Step 3: Wait for the Cyclone to complete the programming operations before proceeding.

Step 4: Check to see if any errors occurred during programming and provide a message to the user.

Step 5: Terminate the current session with the Cyclone.


4.) Using the DLL – More Advanced Operations


Programming a serial number

 

 

Note: The following are placeholder functions used to simplify the example, and are not provided by the automated control package:

get_serial_from_file

increment_serial_number

save_serial_back_to_file

The above example code is an event handler written for a visual MFC application, which is executed each time a button is pressed by the user. Here, we again instruct 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 0x100 of the target processor. The serial number is then incremented and written back to a file for later use.

Although there are many different ways to program a serial number without needing to use the automated control package at all, 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, using the automated control package and writing your own custom application is by far the easiest and most automated way to accomplish this task.

 

Automatically update image stored on the Cyclone

 

 

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.

5.) Can I Control Multiple Cyclones?

 Up until now, we have discussed some uses of the Cyclone Automated Control Package with a single Cyclone unit. Since the host PC only sends minimal control information to control each Cyclone, a single PC is actually capable of controlling many Cyclone units simultaneously.

 

Here, we begin programming operations on 3 separate Cyclone units and wait for their completion before proceeding. In essence, we are programming 3 separate devices in parallel. This can be easily extended to 10, 100, or even 1000 Cyclone units controlled in parallel from a single host PC!

6.) More Examples

Here are a few more real world examples:

·         Quality Control : automatically record statistics on the number of devices that fail during programming.

·         You’re a developer and just completed the firmware development for a brand new product. Now you need to get your production facility up to speed, but they are halfway across the country. Streamline this process by writing a simple application that will add a new image to the Cyclone. Send this along with the new stand-alone image SAP file and you’re done.

·         You use multiple Cyclone units for programming your devices in parallel. Each Cyclone has 4 different images, one for each of your 4 different products. Write an application that allows the user to automatically select the correct image for the current production run.

7.) Conclusion

 Whether you are performing small production runs in-house or programming a large number of chips in a high-volume facility, P&E’s Cyclone product family provides a powerful, yet affordable, solution. With the advanced parallel programming, image management, and error tracking features provided by P&E’s new Cyclone Automated Control Package, you now have the power to completely automate your production programming process like never before.

For more information, see also:






Whether you are porting your existing C code to the GNU compiler or creating an application from scratch, learning to use any new compiler and development environment can be time consuming. For those who are new to GCC, setting up compiler options, linker scripts, and target startup code takes even more time. And, if you have never developed a C application for an embedded system, then you might be working late a few nights this week. PKGCFZ PRO reduces your down time by simplifying all of these tasks. Follow the steps below to speed through the development process.

Continue reading this Expert's Corner...






Product testing is a critical yet often complex and expensive process. Taking advantage of embedded processors with on-chip debug capability has made it easier to complete a simple internal test of a product. The following explains how you can take advantage of these capabilities to create your own product test. We’ll examine these four areas to improve your testing process:

  1. Use of Debug Mode (BDM) to control processor operation
  2. Application of P&E’s DLLs on a PC to make test applications which control the processor and run tests via debug mode
  3. Using the Processor to test as much of the board hardware as possible
  4. Creating a test fixture to add more complex test capabilities

Continue reading this Expert's Corner...






Did you know that you can improve tracking of your products by placing serial numbers in flash during programming using P&E's FLASH/EEPROM programming products? There are commands in both the GUI (PROGxxZ) and command line (CPROGxxZ) versions of P&E's programming software for selecting a particular serial number file and for programming the next serial number. The serial number is incremented by one after it is programmed into your device. Complex serial numbers with up to 16 bytes are supported. Each byte of a serial number can be restricted to a range of values. This allows you to create such things as printable, numeric, upper case alphabetic, lower case alphabetic, and constant characters in your serial number.

Continue reading this Expert's Corner







search in blog posts

Categories
ARM (26)  
Atmel (11)  
ColdFire Processors (45)
Corporate News (20)
Cyclone Stand Alone Programmer (64)
Cypress (10)
Development Boards (9)
Drivers (3)
DSC (11)  
Expert's Corner (6)
GDB Server (9)
GNU (3)  
H8 Microcontrollers (5)
HCS08/RS08/HC08 Micrcontrollers (40)
HCS12Z (3)  
In-Circuit Debugging (58)
In-Circuit Flash Programming (86)
In-Circuit Test (33)
Interface Library Routines (3)
Kinetis (21)
Kinetis ARM (6)
L-Series (1)
LPCxxxx (12)
M16C Microcontrollers (4)
Maxim (10)  
MC(9)S12(X) Microcontrollers (31)
Nordic Semiconductor (3)
NXP (12)  
OpenSDA (6)
OSBDM (1)  
P&E Newsletter (1)
Power Architecture Processors (31)
Production Programming (8)
Qorivva (15)
R8C Microcontrollers (5)
Renesas (6)
RL78 (4)  
RX (2)  
S12Z (13)  
S32 (7)  
SPI Memory (2)
STM32 (4)  
STMicroelectronics (8)
SWD (8)  
Texas Instruments (10)
Toshiba (10)
Trace (1)  
Tracelink (1)
USB Multilink Hardware Interfaces (24)
USB Multilink Universal (17)
USB Multilink Universal FX (15)
Video Demonstrations (3)
Windows 8 (2)



© 2017 P&E Microcomputer Systems Inc.
Website Terms of Use and Sales Agreement