PROGCFZ User Manual
PROGCFZ User Manual
PROGCFZ User Manual
PROGCFZ
PEmicro 1
PROGCFZ User Manual
1 OVERVIEW..................................................................................................... 1
1.1 Programming Algorithms (.CFP Files)............................................................ 2
1.2 Start-Up Configuration.................................................................................... 2
1.3 Manual Programming ..................................................................................... 2
1.4 Scripted Programming.................................................................................... 3
1.5 Hardware Interfaces ....................................................................................... 3
1.6 Programming Utilities ..................................................................................... 3
2 PROGRAMMING ALGORITHMS ................................................................... 4
2.1 Algorithm File Contents .................................................................................. 4
3 PROGRAMMING COMMANDS...................................................................... 7
3.1 Listing of Commands...................................................................................... 8
3.2 Legacy Commands ...................................................................................... 13
4 START-UP CONFIGURATION..................................................................... 15
5 CONNECTION MANAGER........................................................................... 19
5.1 Additional Settings........................................................................................ 20
5.2 Connect and Choose Algorithm ................................................................... 21
6 MANUAL PROGRAMMING .......................................................................... 23
6.1 Manual Programming Procedure ................................................................. 23
7 SCRIPTED PROGRAMMING (CPROGCFZ) ............................................... 25
8 HARDWARE INTERFACES ......................................................................... 26
8.1 Multilink and Multilink FX.............................................................................. 26
8.2 Cyclone LC and Cyclone FX ........................................................................ 28
9 PROGRAMMING UTILITIES ........................................................................ 32
9.1 Serialize........................................................................................................ 32
APPENDIX A -SETUP COMMANDS..................................................................... 33
APPENDIX B -TABLE ENTRY .............................................................................. 35
PEmicro ii
PROGCFZ User Manual
1 OVERVIEW
PROGCFZ is PEmicro’s programming software for Flash/EEPROM modules that are
attached to a NXP ColdFire V2/3/4 processor. PROGCFZ talks to the processor's
debug module using one of PEmicro’s compatible hardware interfaces. These
interfaces connect a PC running Windows 7/8/10 to a debug connector on the target
system. This connector provides access to the debug signals of the processor chip
mounted on your target system hardware board.
1
PROGCFZ User Manual
As part of the programming procedure, the user will need to select a programming
algorithm that will enable the PROGCFZ software to properly manage their specific
target device during programming. The user may also choose to set certain
programming parameters before beginning to program. This chapter presents a brief
overview of the programming procedure.
An up-to-date list of ARM devices supported by PROGACMP where users can locate
their specific supported device part number is available at: https://www.pemicro.com/
partners/index.cfm
2
PROGCFZ User Manual
by typing the selection letters to the left of the selection display. Pressing ENTER or
double clicking the mouse will execute the highlighted entry if it is enabled. The user
will be prompted for any additional information that is required to execute the selected
function. Before you can program a module from an S record file, you must select
such a file. If you try to do a program module function and you have not selected an S-
record file, you will be asked to select one. A list of programming commands and their
functions may be found in CHAPTER 6 – MANUAL PROGRAMMING.
3
PROGCFZ User Manual
2 PROGRAMMING ALGORITHMS
PEmicro’s .CFP programming algorithm files define the functions necessary for
PROGCFZ to program a NXP ColdFire V2/3/4 processor’s internal flash or connected
external Flash/EEPROM. After you choose the appropriate algorithm, it will appear in
the Configuration Window.
2.1.1 Comments
Comments are usually placed in the file to identify the target system for which the
.CFP file was written and what module on the target system it programs, as well as
other useful information. If a specific .CFP file is selected in PROGCFZ, these
comments are shown in the window at the bottom of the PC screen. Within the
algorithm file a semicolon is used to designate the beginning of a comment.
4
PROGCFZ User Manual
USER=uuuuuuuuuuuuuuuuuuuuuuNpppppppppp/llllllll/
uuuuuuuu/
Where:
USER= is the keyword to identify the line
uuuuuuuuuuuuuuuuuuuuuu is the 22 character string placed in the selection
menu window on the PC screen. The first few characters define the menu select
function and should be unique.
N is a single numeric digit between 0 and 4. If it is zero, the program will not ask
for a user parameter. If it is non-zero, the user will be asked for a parameter with
N hexadecimal digits. This parameter will be passed to the corresponding user
routine in RAM.
pppppppppp is the 10 character prompt used to solicit the user input parameter.
/ is required for error checking.
llllllll is an 8 hex character lower bound on the user parameter.
uuuuuuuu is an 8 hex character upper bound on the user parameter.
2.1.4 S-Records
Any line in the programming algorithm file starting with an "S" in column 1 is
considered an S-record. S1, S2 and S3 records are allowed. S7, S8 and S9
termination records are ignored. PROGCFZ uses the address field on the first S
record detected in the file as the starting address of target RAM. Each .CFP file in the
library contains a programming algorithm for a particular device.
The S records are loaded into on chip RAM on the NXP ColdFire V2/3/4
microcontroller and provide the functions necessary to carry out the functions
specified. All other records are written to the screen when the .CFP file is selected for
programming. PROGCFZ programming algorithm files must have the DOS filename
extension ".CFP" in order for PROGCFZ to find them. The files are in ASCII and are
5
PROGCFZ User Manual
thus readable using most text editors. The S records for a .CFP file can be generated
using most assemblers.
6
PROGCFZ User Manual
3 PROGRAMMING COMMANDS
When the user performs manual programming, commands are executed by selecting
them from the Choose Programming Function Window pick list. The user may either
use the up/down arrow keys or type the two-letter abbreviation for the command
(listed below) on the command line to select a command. Pressing ENTER causes the
selected command to execute. Commands can also be executed from the Menus or
from the Button Bar. If there is any additional information needed in order to execute
the command, the user will be prompted for this information in a new window. Errors
caused by a command or any other responses will be presented in the Status Window.
Below is a representation of a typical PROG Choose Programming Function Window,
with commands organized by category.
7
PROGCFZ User Manual
Note: At any given time, or for a particular module, some of the commands may not
be active. Inactive commands are indicated as such in the Choose
Programming Functions Window and will not execute.
8
PROGCFZ User Manual
9
PROGCFZ User Manual
3.1.11 HE - Help
Opens this PROGCFZ user manual.
This command should be used with care to avoid mis-programming. Most users
should use the QO command instead.
10
PROGCFZ User Manual
Before programming, all queued data files are combined into a single data file. QO
replaces the legacy SS command. The CQ command clears this queue. A more
detailed description is available at:
https://www.pemicro.com/blog/index.cfm?post_id=250
3.1.16 QU - Quit
Terminates PROGCFZ and returns to Windows.
3.1.18 RELAYSOFF - Turn off the relays that provide power to the target
( only)
Includes a power down delay if specified. Especially useful for users who want to
power cycle their board before running tests, allow their bootloader to run, or have the
application code run after programming.
11
PROGCFZ User Manual
voltage setting specified. For Cyclone users, the CHANGEV command can change
the voltage value. Especially useful for users who want to power cycle their board
before running tests, allow their bootloader to run, or have the application code run
after programming.
12
PROGCFZ User Manual
programmed. If not, the user is asked if they want to continue. If the answer is yes,
only those S-record addresses which lie in the module are verified. If a location cannot
be verified, an error message will be returned which indicates the address, the
contents of that address, and the contents specified in the S-record file.
In addition, there is one function that is allowed to be unique to the module being
programmed. The selection menu name and the length of up to one hexadecimal
parameter may be specified in a supporting .CFP file.
13
PROGCFZ User Manual
hold the address constant. Failure to program a location, entering an invalid hex value
or exceeding the address range of the module will exit the program bytes window. If a
location fails to program, an error message will be returned.
14
PROGCFZ User Manual
4 START-UP CONFIGURATION
The PROGCFZ software may be started in a way that enables certain optional
parameters, which can assist the programming process. To set these command-line
parameters, highlight the Windows Icon for the PROGCFZ executable, right-click, and
select “Properties” from the pop-up File Menu. The “General” Properties tab should
open by default. There are several parameters that you may then include on the
command line. A description of each is listed below, followed by specific examples of
how these parameters are used.
Syntax:
PROGCFZ [freq n] [reset_delay][interface=x] [port=y]
Where:
Optional parameters are in brackets [ ]. The parameters are described as follows:
[freq n] This allows the user to specify the exact speed of the target. If
this is not specified, the programmer tries to calculate the target's
speed. The frequency specified is the INTERNAL clock frequency
of the target. See Section 2.2 - Algorithm Timing
Considerations for more information.
[v] If the optional parameter v is specified as either V or v, then the
range of S-records is not verified during the programming or
verification process. This can help speed up these functions.
[interface=x] where x is one of the following: (See examples section)
USBMULTILINK (supports Multilink Universal,
Multilink Universal FX, and OSJtag)
CYCLONE
PARALLEL
[port=y] Where the value of y is one of the following (see the
showports command-line parameter for a list of
connected hardware; always specify the "interface" type
15
PROGCFZ User Manual
as well):
Examples:
INTERFACE=CYCLONE
PORT=MyCyclone99
16
PROGCFZ User Manual
Examples:
INTERFACE=USBMULTILINK
PORT=PE5650030
Example
CPROGCFZ C:\ENGINE.CFG Interface=USBMULTILINK Port=USB1
17
PROGCFZ User Manual
Example
CPROGCFZ C:\ENGINE.CFG Interface=CYCLONE Port=209.61.110.251
Example 3
CPROGCFZ C:\ENGINE.CFG Interface=USBMULTILINK Port=USB1 bdm_speed 0
18
PROGCFZ User Manual
5 CONNECTION MANAGER
Before programming your device, you will need to connect to your target using a
compatible PEmicro hardware interface. Interface options for PROGCFZ are
discussed in Section 8 - HARDWARE INTERFACES
Once you have physically connected your PC to your target using the hardware
interface, and the appropriate drivers are installed, the following Connection Manager
dialog will appear:
The Connection Manger allows you to choose the interface that you wish to use and
configure the connection.
19
PROGCFZ User Manual
Use the Interface drop-down menu to choose the type of interface that you plan to
use.
Then select the interface from those available, which are listed in the Port drop-down
list. The Refresh List button to the right may be used to update the list of available
interfaces:
20
PROGCFZ User Manual
21
PROGCFZ User Manual
the Connect (Reset) button to connect to the target. If you are successful, you will be
prompted to choose a programming algorithm for your target using the following
browse window:
With the appropriate algorithm selected, you are ready to begin programming.
22
PROGCFZ User Manual
6 MANUAL PROGRAMMING
The Choose Programming Function Window (see Figure 3-1) lists commands that are
available to execute. Any of the programmer’s enabled features can be selected using
the mouse, the up and down arrow keys, or by typing the two-letter command
abbreviations that appear to the left of the list of programming functions into the Status
Window. The Status Window also displays any error messages that might result from
the commands that you perform.
Pressing ENTER or double clicking the mouse in the Choose Programming Function
Window will execute the highlighted entry if it is enabled. The user will be prompted
for any additional information that is required to execute the selected function. Before
you can program a module from an S record file, you must select such a file. If you try
to execute a program module function and you have not selected a file, you will be
asked to select one.
23
PROGCFZ User Manual
This is the address at which you would like to program the code. Enter
the appropriate base address.
4. a) Use the "EM" (Erase Module) command to erase the module at that
location. The process of erasing the module will vary according to the
size of the flash, but should take no longer than 30 seconds. If this proce-
dure seems to be taking much longer than 30 seconds, then the computer
is probably not getting a proper response from the board. If this is the
case:
b) Check the jumper setting on your target board, as well as the
programming voltage.
5. Some programming algorithms have a special command, such as "BE,"
for block erase. If you are unable to double-click the "EM" (Erase Module)
command, try using the "BE" (Block Erase) command. Some commands
are hidden and you may need to use the scroll bar to scroll down to these
commands.
6. You may check to see whether or not the module has been erased by
double-clicking the "BM" command (Blank Check Module). If the flash is
not properly erased then this command will give you an error message.
You may also check the contents of the memory locations by double-click-
ing the "SM" (Show Module) command. If the flash has been erased
properly then all the memory locations will display "FF".
7. Now use the "SS" command (Specify S Record) to load the object file
(.S19), which you should have generated previously by using a compiler
or an assembler. This command will ask for the name of the .S19 file.
8. Now you ready to program the flash. Double click the "PM" command
(Program Module) to begin the programming process.
9. In order to check the results, use the "SM" command (Show Module) with
the appropriate base address to view the contents of the flash. You should
see that the flash has been correctly programmed. You may also double-
click the “VM” command (Verify Module) to verify that all the bytes of the
flash are correctly programmed.
24
PROGCFZ User Manual
For complete instructions on how to configure and execute the CPROGCFZ scripted
programmer, please see the CPROGCFZ User Guide.
25
PROGCFZ User Manual
8 HARDWARE INTERFACES
PEmicro’s Cyclone LC & FX Universal production programmers, Multilink & Multilink
FX debug probes are compatible hardware interfaces for use with PROGCFZ. The
Multilink and Multilink FX are development tools that communicate via USB and will
enable you to debug your code and program it onto your target. The Cyclone LC & FX
Universal is a more versatile and robust development tool that communicates via
Ethernet, USB, or Serial Port, and includes advanced features and production
programming capabilities, as well as Ethernet support.
Below is a review of their features and intended usage.
PEmicro 26
PROGCFZ User Manual
27 PEmicro
PROGCFZ User Manual
Multilink Universal enables you to debug, program, and test your code on your board.
8.1.3 Software
Multilink debug probes work with NXP’s MCUXpresso, Kinetis and S32 Design
Studios, Codewarrior, as well as PEmicro’s flash programmer, PROGCFZ.
PEmicro 28
PROGCFZ User Manual
29 PEmicro
PROGCFZ User Manual
PEmicro 30
PROGCFZ User Manual
8.2.4 Software
The Cyclone LC and Cyclone FX come with intuitive configuration software and
interactive programming software, as well as easy to use automated control software
call. These Cyclones also function as full-featured debug interfaces, and are
supported by software from PEmicro and third-party vendors.
31 PEmicro
PROGCFZ User Manual
9 PROGRAMMING UTILITIES
The following no-cost programming utilities are available on PEmicro’s website.
www.pemicro.com, by navigating to Support -> Documentation & Downloads ->
Utilities.
9.1 Serialize
The Serialize utility allows the generation of a .SER serial number description file. This
graphical utility sets up a serial number which will count according to the bounds set
by the user. The .SER file can be called by the PROG flash programmer to program a
serial number into the target.
More information on how to use the Serialize utility can be found on PEmicro’s
website at: www.pemicro.com/newsletter/experts_corner/2005_08_17/serialize.cfm.
32
PROGCFZ User Manual
33
PROGCFZ User Manual
oooooooo.
NO_BASE_ADDRESS
or
NO_BASE_ADDRESS=bbbbbbbb/
This 15 character command version tells the prog software to use a base address
of 0 and not to ask the user to enter one. The 25 character version is the same
except it sets the base address to bbbbbbbb.
NO_ON_CHIP_RAM
This command has 14 characters and tells the programmer not to turn on the on
chip ram. You must provide ram to run the calibration routines and load your .12P
file S records. If not deactivated by this command, the on chip RAM is turned on
after all other setup commands are executed.
NO_TIMING_TEST
This command has 14 characters and tells the programmer not to evaluate the
target processor speed the initialization process. Instead, both timing constants
are set to 1. This option is only used when programming timing functions are not
needed.
WRITE_LONG=llllllll/aaaaaaaa/
This command has 29 characters. It writes the hex long llllllll to the hex address
aaaaaaaa in the current space.
WRITE_WORD=wwww/aaaaaaaa/
This command has 25 characters. It writes the hex word wwww to the hex
address aaaaaaaa in the current space.
WRITE_BYTE=bb/aaaaaaaa/
This command has 23 characters. It writes the hex byte bb to the hex address
aaaaaaaa in the current space.
34
PROGCFZ User Manual
Users who wish to make significant modifications to a programming algorithm may need
to modify the table entries in their assembly (.ASM ) file. Table entries provide information
to the PROG software, including what functions are in the algorithm and where they are
located. Each table entry consists of 32 bits and must be in the following order:
Stack Address
Address of the stack during routine execution. The stack is initialized each time
one of the user-supplied routines is called.
Buffer Address
Address of the buffer used to transfer data from the PC to the target. This is data
to be placed into the module.
Buffer Length
Length of available buffer space in bytes. The buffer should be at least 256 bytes
long in order to accommodate the largest possible S record.
Module Address
The physical address of the beginning of the module to be programmed or
erased.
Module Length
Length of the module to be programmed in bytes.
Blank Bytes Address
The address of a routine to check a block of bytes to see if they are erased. R1
contains the starting address and R2 contains the number of bytes to check.
Checking is done on a byte by byte basis. If R2<>0 on return then an error
occurred at word address R1-1. R2 = 0.
Blank Words Address
The address of a routine to check a block of words to see if they are erased. R1
contains the starting address and R2 contains the number of bytes to check.
Checking is done on a word by word basis. If R2<>0 on return then an error
occurred at word address R1-2.R2 = 0.
Erase Bytes Address
The address of a routine to erase a block of bytes. R1 contains the starting
address and R2 contains the number of bytes to erase. Erasing is done on a byte
35
PROGCFZ User Manual
by byte basis. R2 = 0.
Erase Long Address
The address of a routine to erase a block of longs. R1 contains the starting
address and R2 contains the number of bytes to erase. Erasing is done on a word
by word basis. If R2<>0 on return an erase error occurred. R2 = 0.
36
PROGCFZ User Manual
37