PROGPPCZ User Manual
PROGPPCZ User Manual
1 OVERVIEW..................................................................................................... 1
1.1 Programming Algorithms (.PCP Files) ........................................................... 1
1.2 Start-Up Configuration.................................................................................... 2
1.3 Manual Programming ..................................................................................... 2
1.4 Scripted Programming.................................................................................... 2
1.5 Hardware Interfaces ....................................................................................... 2
2 PROGRAMMING ALGORITHMS ................................................................... 3
2.1 Algorithm File Contents .................................................................................. 3
3 PROGRAMMING COMMANDS...................................................................... 5
3.1 Listing of Commands...................................................................................... 6
3.2 Legacy Commands ...................................................................................... 10
4 START-UP CONFIGURATION..................................................................... 12
5 CONNECTION MANAGER........................................................................... 15
5.1 Additional Settings........................................................................................ 16
5.2 Connect and Choose Algorithm ................................................................... 18
6 MANUAL PROGRAMMING .......................................................................... 21
6.1 Manual Programming Procedure ................................................................. 21
7 SCRIPTED PROGRAMMING (CPROGPPCZ)............................................. 23
8 HARDWARE INTERFACES ......................................................................... 24
8.1 Multilink FX................................................................................................... 24
8.2 Cyclone LC and Cyclone FX ........................................................................ 25
9 PROGRAMMING UTILITIES ........................................................................ 30
9.1 Serialize........................................................................................................ 30
APPENDIX A -SETUP COMMANDS..................................................................... 31
APPENDIX B -TABLE ENTRY .............................................................................. 33
ii
PROGPPCZ User Manual
1 OVERVIEW
PROGPPCZ is PEmicro’s programming software for Flash/EEPROM modules that
are attached to an MPC5xx/8xx processor. PROGPPCZ talks to the processor's
background 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.
As part of the programming procedure, the user will need to select a programming
algorithm that will enable the PROGPPCZ software to properly manage their specific
target device during programming. The user may also choose to set certain
1
PROGPPCZ User Manual
2
PROGPPCZ User Manual
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
PROGPPCZ User Manual
2 PROGRAMMING ALGORITHMS
PEmicro’s .PCP programming algorithm files define the functions necessary for
PROGPPCZ to program a MPC5xx/8xx 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
.PCP file was written and what module on the target system it programs, as well as
other useful information. If a specific .PCP file is selected in PROGPPCZ, 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
PROGPPCZ User Manual
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. PROGPPCZ uses the address field on the first S
record detected in the file as the starting address of target RAM. Each .PCP file in the
library contains a programming algorithm for a particular device.
The S records are loaded into on chip RAM on the MPC5xx/8xx microcontroller and
provide the functions necessary to carry out the functions specified. All other records
are written to the screen when the .PCP file is selected for programming. PROGPPCZ
programming algorithm files must have the DOS filename extension ".PCP" in order
for PROGPPCZ to find them. The files are in ASCII and are thus readable using most
text editors. The S records for a .PCP file can be generated using most assemblers.
5
PROGPPCZ 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
PROGPPCZ 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
PROGPPCZ User Manual
indicates what kind of module it relates to. For example, the file
Freescale_MPC565_1x32x128k_UC3F_A_512k_Memory_Blk.PCP specifies how to
program the 512K Memory Block A block on a MPC565 processor. Setup information
and further descriptions of the module are provided in ASCII text within the module
file. This information is presented in the status window when a .PCP file is selected.
The user can also look at this information inside of the module itself by using any
standard text editor to view the module contents.
A particular .PCP file is selected by using the arrow keys to highlight the file name and
then pressing ENTER. The currently selected .PCP file is shown in the .PCP file
selected window. After a .PCP file is selected, the user is prompted for the base
address of the module. This address is used as the beginning address for the module
during programming and verification. Certain .PCP files, such as those for external
flash algorithms, will prompt the user for the base address of the module.
3.1.10 HE - Help
Opens this PROGPPCZ user manual.
9
PROGPPCZ User Manual
This command should be used with care to avoid mis-programming. Most users
should use the QO command instead.
10
PROGPPCZ 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.15 QU - Quit
Terminates PROGPPCZ and returns to Windows.
3.1.17 RELAYSOFF - Turn off the relays that provide power to the target
(Multilink FX & Cyclone 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
PROGPPCZ 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
PROGPPCZ 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 .PCP file.
13
PROGPPCZ User Manual
correspond respectively to: increase the address (default), decrease the address, and
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 words window. If
a location fails to program, an error message will be returned.
14
PROGPPCZ User Manual
4 START-UP CONFIGURATION
The PROGPPCZ 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 PROGPPCZ 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:
PROGPPCZ [reset_delay][interface=x] [port=y]
Where:
Optional parameters are in brackets [ ]. The parameters are described as follows:
14
PROGPPCZ User Manual
Examples:
INTERFACE=CYCLONE
PORT=MyCyclone99
INTERFACE=CYCLONE "PORT=Joe's Max"
UNIQUEID USB Multilink products all have a unique
serial number assigned to them, such as
PE5650030. The Multilink may be referred
to this number. This is useful in the case
where multiple units are connected to the
15
PROGPPCZ User Manual
same PC.
Examples:
INTERFACE=USBMULTILINK
PORT=PE5650030
Example
CPROGPPCZ C:\ENGINE.CFG Interface=USBMULTILINK Port=USB1
Example
CPROGPPCZ C:\ENGINE.CFG Interface=CYCLONE Port=209.61.110.251
16
PROGPPCZ 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 PROGPPCZ 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.
16
PROGPPCZ 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:
17
PROGPPCZ User Manual
18
PROGPPCZ User Manual
19
PROGPPCZ User Manual
With the appropriate algorithm selected, you are ready to begin programming.
20
PROGPPCZ 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.
20
PROGPPCZ 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.
21
PROGPPCZ User Manual
For complete instructions on how to configure and execute the CPROGPPCZ scripted
programmer, please see the CPROGPPCZ User Guide.
22
PROGPPCZ User Manual
8 HARDWARE INTERFACES
PEmicro’s MultilinkUniversal FX debug probe and Cyclone in-system programmers
are compatible hardware interfaces for use with PROGPPCZ. The Multilink FX is a
high-speed development tools that communicate via USB and will enable you to
debug your code and program it onto your target. Cyclone LC and Cyclone FX are
even more versatile and robust tools suited for both development and production.
They can communicate via Ethernet, USB, or Serial Port, and include powerful
features that save valuable time and protect valuable IP.
Below is a review of their features and intended usage.
8.1 Multilink FX
PEmicro’s Multilink FX debug probe offers an affordable and compact solution for your
development needs, and allows debugging and programming to be accomplished
simply and efficiently. Those doing rapid development will find the Multilink FX easy to
use and fully capable of fast-paced debugging and programming.
8.1.3 Software
Multilink FX debug probes work with NXP’s MCUXpresso, Kinetis and S32 Design
Studios, Codewarrior, as well as PEmicro’s flash programmer, PROGPPCZ.
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.
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.
25
PROGPPCZ User Manual
26
PROGPPCZ 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.
27
PROGPPCZ 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 4,096
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
28
PROGPPCZ 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.
29
PROGPPCZ User Manual
30