Proghcs08: P&E Microcomputer Systems, Inc
Proghcs08: P&E Microcomputer Systems, Inc
PROGHCS08
Purchase Agreement
This software and accompanying documentation are protected by United States Copyright law and also by
International Treaty provisions. Any use of this software in violation of copyright law or the terms of this agreement will
be prosecuted.
All the software in this package is copyrighted by P&E Microcomputer Systems, Inc. Copyright notices have been
included in the software.
P&E Microcomputer Systems authorizes you to make archival copies of this software for the sole purpose of back-up
and protecting your investment from loss. Under no circumstances may you copy this software or documentation for
the purpose of distribution to others. Under no conditions may you remove the copyright notices from this software or
documentation.
This software may be used by one person on up to two different computers, provided that the software is never used
on the two computers at the same time. P&E expects that group programming projects making use of this software will
purchase a copy of the software and documentation for each user in the group. Contact P&E for volume discounts and
site licensing agreements.
With respect to the physical media provided within, P&E Microcomputer Systems warrants the same to be free of
defects in materials and workmanship for a period of 30 days from the date of receipt. If you notify us within the
warranty period, P&E Microcomputer Systems will update the defective media at no cost.
P&E Microcomputer Systems does not assume any liability for the use of this product beyond the original purchase
price. In no event will P&E Microcomputer Systems be liable for additional damages, including any lost profits, lost
savings or other incidental or consequential damages arising out of the use or inability to use these programs, even if
P&E Microcomputer Systems has been advised of the possibility of such damage.
By installing or using this software, you agree to the terms of this agreement. If you do not agree with these terms, you
should not install this software.
1 OVERVIEW..................................................................................................... 1
1.1 Programming Algorithms (.S8P Files) ............................................................ 2
1.2 Start-Up Configuration.................................................................................... 2
1.3 Manual Programming ..................................................................................... 2
1.4 Scripted Programming.................................................................................... 3
1.5 Hardware Interfaces ....................................................................................... 3
2 PROGRAMMING ALGORITHMS ................................................................... 4
2.1 Algorithm File Contents .................................................................................. 4
2.2 Creating A Programming Algorithm................................................................ 6
3 PROGRAMMING COMMANDS...................................................................... 7
3.1 BM - Blank Check Module.............................................................................. 8
3.2 CHANGEV - Change the voltage provided to the target ................................ 8
3.3 CM - Choose Module .S8P............................................................................. 8
3.4 EM - Erase Module......................................................................................... 8
3.5 EN - Erase If Not Blank .................................................................................. 9
3.6 HE - Help........................................................................................................ 9
3.7 PB - Program Bytes........................................................................................ 9
3.8 PM - Program Module .................................................................................... 9
3.9 PT - Program Trim Value ............................................................................... 9
3.10 PS - Program Serial Number.......................................................................... 9
3.11 PR - Program Module Range ....................................................................... 10
3.12 PW - Program Words ................................................................................... 10
3.13 QU - Quit ...................................................................................................... 10
3.14 RE - Reset chip ............................................................................................ 10
3.15 RELAYSOFF - Turn off the relays that provide power to the target ............. 10
3.16 RELAYSON - Turn on the relays to provide power to the target.................. 10
3.17 SM - Show Module ....................................................................................... 11
3.18 SS - Specify S-Record ................................................................................. 11
3.19 UM - Upload Module .................................................................................... 11
3.20 UR - Upload Range ...................................................................................... 11
3.21 VM - Verify Module....................................................................................... 11
1 OVERVIEW
PROGHCS08 is PEmicro’s programming software for Flash/EEPROM modules that
are attached to a 68HCS08 processor. PROGHCS08 talks to the processor's
background debug module using one of PEmicro’s compatible hardware interfaces.
These interfaces connect a PC running Windows XP/Vista/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 PROGHCS08 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.
1
PROGHCS08 User Manual
2
PROGHCS08 User Manual
3
PROGHCS08 User Manual
2 PROGRAMMING ALGORITHMS
PEmicro’s .S8P programming algorithm files define the functions necessary for
PROGHCS08 to program an 68HCS08 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
.S8P file was written and what module on the target system it programs, as well as
other useful information. If a specific .S8P file is selected in PROGHCS08, 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
PROGHCS08 User Manual
table part of the S-records and an appropriate set of code. A line which defines a user
specified programming function has a total of 57 characters in the form:
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. PROGHCS08 uses the address field on the first S
record detected in the file as the starting address of target RAM. Each .S8P file in the
library contains a programming algorithm for a particular device.
The S records are loaded into on chip RAM on the 68HCS08 microcontroller and
provide the functions necessary to carry out the functions specified below. All other
records are written to the screen when the .S8P file is selected for programming.
5
PROGHCS08 User Manual
PROGHCS08 programming algorithm files must have the DOS filename extension
".S8P" in order for PROGHCS08 to find them. The files are in ASCII and are thus
readable using most text editors. The S records for a .S8P file can be generated using
most assemblers.
6
PROGHCS08 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.
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.
Below is a description of each of the PROGHCS08 commands used in manual
programming. These same commands are also used in scripted programming. For
more information about scripted programming, see the CPROGHCS08 User Guide.
7
PROGHCS08 User Manual
8
PROGHCS08 User Manual
3.6 HE - Help
Opens this PROGHCS08 user manual.
9
PROGHCS08 User Manual
3.13 QU - Quit
Terminates PROGHCS08 and returns to Windows.
3.15 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.
10
PROGHCS08 User Manual
after programming.
11
PROGHCS08 User Manual
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 .S8P file.
12
PROGHCS08 User Manual
13
PROGHCS08 User Manual
4 START-UP CONFIGURATION
The PROGHCS08 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 PROGHCS08 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:
PROGHCS08 [v] [interface=x] [port=y]
Where:
Optional parameters are in brackets [ ]. The parameters are described as follows:
14
PROGHCS08 User Manual
Examples:
INTERFACE=CYCLONE
PORT=MyCyclone99
INTERFACE=CYCLONE "PORT=Joe's Max"
15
PROGHCS08 User Manual
Examples:
INTERFACE=USBMULTILINK
PORT=PE5650030
Example 1
CPROGHCS08 C:\ENGINE.CFG Interface=USBMULTILINK Port=USB1
16
PROGHCS08 User Manual
Example 2
CPROGHCS08 C:\ENGINE.CFG Interface=CYCLONE Port=209.61.110.251
17
PROGHCS08 User Manual
5 CONNECTION MANAGER
Before programming your device, you will need to connect to your target using a
hardware interface. Interface options for PROGHCS08 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.
Use the Interface drop-down menu to choose the type of interface that you plan to
use.
18
PROGHCS08 User Manual
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.
The password can be either 64-bit (16 hex characters) or 256-bit (64 hex
characters) depending on the device. The user should read their chip's reference
manual for more details.
19
PROGHCS08 User Manual
20
PROGHCS08 User Manual
Once you have selected the appropriate algorithm, you are ready to begin
programming.
21
PROGHCS08 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.
22
PROGHCS08 User Manual
Module) command will allow you to select the algorithm you wish to use.
3. After you select the .S8P file, you may be asked for the base address.
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-
clicking 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.
23
PROGHCS08 User Manual
24
PROGHCS08 User Manual
8 HARDWARE INTERFACES
PEmicro’s Multilink Universal, Multilink Universal FX, and Cyclone PRO are
compatible hardware interfaces for use with PROGHCS08. The USB Multilink
Universal and USB Multilink Universal FX are development tools that communicate
via USB and will enable you to debug your code and program it onto your target. The
Cyclone PRO are more versatile and robust development tools that communicate via
Ethernet, USB, or Serial Port, and include advanced features and production
programming capabilities, as well as Ethernet support.
Below is a review of their features and intended usage.
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, PROGHCS08.
OnBright: OB90Rxx
Silicon Labs: EFM32, EFR32, SiM3
STMicroelectronics: STM32
Texas Instruments: LM3S, LM4, TM4C12x, SimpleLink
Toshiba: TX00, TX03, & TX04
NXP 8-/16-/32-bit devices (“Universal” part number only):
S32, MPC55xx-57xx, ColdFire +/V1, ColdFire V2/3/4, DSC, HC(S)12(X), S12Z,
HCS08, RS08, HC08 (MON08), MAC7xxx, Power MPC5xx/8xx. Also:
STMicroelectronics’ SPC5 and STM8 (with STM8 adapter).
The Cyclone FX Universal also supports Renesas’ R8C, H8, H8S/Tiny, M16C,
M16C80, M32C, RL78, RX, RX63T, RH850 device families (with Renesas adapter).
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.