The FLASH Programming Tool - hse

The FLASH Programming Tool - hse
FLASHit 9 SiL Manual
FFL
The FLASH Programming Tool
for easy programming of application software in a
C8051xxxx (Silicon Laboratories) target system
Oct 09
Page 1
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
LIMITED WARRANTY!
By using this FLASHit product and its associated products, you agree to the following
conditions.
If you are unable to agree to these conditions, please notify us within two days of
purchasing FLASHit.
LIMITED warranty:
hse-electronics GmbH guarantees that the FLASHit product will basically work as advertised
and without defects if used properly for a period of 6 months after delivery.
CLAIMS of the customer:
At the discretion of hse-electronics GmbH, the entire liability of hse-electronics GmbH and
your sole claim shall involve either
a) a refund of the paid price or
b) subsequent improvement or product placement.
This limited warranty does not apply if the failure of the product can be attributed to an accident
or improper use.
NO additional warranty:
hse-electronics GmbH excludes any additional warranty claims related to the delivered product
and associated manuals and written materials.
NO liability for consequential damage:
Neither hse-electronics GmbH nor the suppliers of hse-electronics GmbH are liable to pay
compensation (included but not limited to damages for loss of profit, service interruption, loss of
business information or data or any other financial loss) arising from the use of this
hse-electronics GmbH product even if hse-electronics GmbH has been notified of the
possibility of such damages.
LIMITED liability:
The liability of hse-electronics GmbH shall in any case be limited to the amount that the
customer paid for the product. This exemption shall not apply to damages caused by willful
intent or gross negligence on the part of hse-electronics GmbH.
JURISDICTION:
Disputes arising from this licensing agreement may only be resolved in the regional court of Kiel.
If you have any questions about this agreement, please contact your dealer or send us an e-mail
at info@hse-electronics.com.
Oct 09
Page 2
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
Table of contents
1 FLASHit ................................................................................................................................................................ 4
1.1 FLASHit ................................................................................................................................................................. 4
2 System Requirements.......................................................................................................................................... 4
2.1 Target System ....................................................................................................................................................... 4
2.2 PC ......................................................................................................................................................................... 4
3 Program Installation and Registration ................................................................................................................ 5
3.1 Installation............................................................................................................................................................ 5
3.2 Registration .......................................................................................................................................................... 5
4 Program Functions .............................................................................................................................................. 6
4.1 Establishing A Connection .................................................................................................................................... 6
4.2 FLASHit Working Directory.................................................................................................................................... 6
4.3 Expert or Express Mode ........................................................................................................................................ 7
4.4 Uploading to the Target System ("burn FLASH").................................................................................................... 8
4.4.1
HEX or BIN? ............................................................................................................................................ 9
4.5 FLASH Memory Info .............................................................................................................................................. 9
4.6 Information on Supported MCUs........................................................................................................................ 10
4.7 Target System Info.............................................................................................................................................. 10
4.8 Configuring FLASHit ........................................................................................................................................... 11
4.8.1
Target System ....................................................................................................................................... 11
4.8.2
Programming Sequence ........................................................................................................................ 12
4.8.3
Saving Configuration Data.................................................................................................................... 13
5 Special Functions............................................................................................................................................... 14
5.1 Reading Out the FLASH Memory......................................................................................................................... 14
5.2 Reading Out the Content of Individual Addresses............................................................................................... 15
5.3 Generating Checksum......................................................................................................................................... 16
5.4 Saving Debug Log File ........................................................................................................................................ 16
5.5 Start target program........................................................................................................................................... 16
5.6 Stop target program........................................................................................................................................... 16
5.7 Command Line Functions ................................................................................................................................... 17
5.8 Priorities in the FLASHit Configuration................................................................................................................ 17
5.9 Saving the Configuration.................................................................................................................................... 17
5.10
Software Generator ................................................................................................................................... 18
6 The FLASHit Package.......................................................................................................................................... 19
6.1 RS232 Terminal................................................................................................................................................... 19
6.2 Checksum Builder ............................................................................................................................................... 21
6.3 IO Check ............................................................................................................................................................. 22
6.4 Command Line Generator (CmdLineSiL).............................................................................................................. 24
7 Appendix ........................................................................................................................................................... 26
7.1 Error Messages ................................................................................................................................................... 26
7.2 Overview of Command Line Functions................................................................................................................ 29
7.3 Supported MCUs ................................................................................................................................................ 32
7.4 Sources of Checksum Function ........................................................................................................................... 33
8 hse-elctronics product: HEXit the HEX-File Analysis-Tool .................................................................................. 34
Oct 09
Page 3
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
1 FLASHit
1.1 FLASHit
FLASHit allows you to quickly and easily program application software in a SiLabs C8051 target system.
2 System Requirements
2.1 Target System
Controller:
Hardware:
All C8051xxxx SiLabs MCUs
SiLabs Debug- or Toolstick Adapter
2.2 PC
Operating system:
Hardware:
All current versions of Windows
Pentium or higher
FLASHit can be customized to suit specific needs upon request!
Oct 09
Page 4
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
3 Program Installation and Registration
3.1 Installation
If you have a CD:
- Insert the program CD into the CD-ROM drive of your PC.
- Follow the instructions on your screen.
If you downloaded FLASHit from the hse-electronics website:
- Double-click setupflashit.exe.
- Follow the instructions on your screen.
3.2 Registration
Two licensing methods are available:
1. PC-based licensing
2. USB dongle-based licensing
When FLASHit is launched for the first time, you will need to
register it in the Help/Registration menu (otherwise FLASHit
will run in restricted demo mode). If FLASHit was delivered
with a dongle, you can skip the following steps. Insert the
dongle into the USB port to unlock the program.
To register FLASHit, complete the following two steps:
Step 1:
Perform this step on the computer you want to register
FLASHit for!
Click Build registration data.
FLASHit will generate your own personal System Id.
- Fill in the fields marked with "*".
- Now send us your registration data either by e-mail (Build
mail...) or by fax (Print...).
- Once we receive the data we will send you your activation
code (by e-mail or fax).
Step 2:
- Enter the activation code under
Enter license key.
- Click Enable license.
- If the message License is enabled appears (in a green field),
then FLASHit has been successfully registered.
If you have any questions about registration, e-mail us at
info@hse-electronics.com.
Note: If you need a new activation code because your hardware or other conditions have changed, e-mail us the old
license number and we will send you a new one.
Oct 09
Page 5
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4 Program Functions
4.1 Establishing A Connection
- Connect your PC to the target system via the USB interface
and the Debug-or Toolstick adaptor.
- FLASHit automatically recognises the Debug adapter
Debug Adapter
Toolstick Adapter
4.2 FLASHit Working Directory
FLASHit creates several files during a session:
flashit_SiLabs.ini
// program settings
result.txt
// return values
Depending on which version of Windows is being used (in this case WinXP), these files are saved by default in the
directory specified by Windows.
(e. g.: c:\Documents and Settings\All Users\Applications Datas\FLASHIT_SiLabs\*.*.)
Windows must be set to allow the creation and writing of files in this directory!
If you want to use a different working directory, you need to create one in advance.
Proceed as follows:
- Open the Properties dialog from the context menu and select the Connection tab.
- Enter the following in the Target input box (example):
c:\programme\FLASHIT_SiLabs.exe WORK_DIR=j:\ini
Result:
Double-click the FLASHit icon to launch the application and the files will then be saved in the "j:\ini" directory.
If the path name is enclosed in quotation marks, blank spaces are allowed (example):
c:\program files\FLASHIT_SiLabs.exe WORK_DIR=“c:\Program Files\FLASHIT_SiLabs“
You can check the path by selecting Setup/Work dir... from
the Setup menu.
Oct 09
Page 6
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.3 Expert or Express Mode
By selecting the Setup/Expert mode and Setup/Express
mode menu items in the Setup menu you can choose
between a basic or advanced FLASHit user interface.
FLASHit "remembers" the previous settings when restarted
"Expert mode"
Basic user interface of FLASHit: "Express mode"
Oct 09
Page 7
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.4 Uploading to the Target System ("burn FLASH")
Having addressed the most important program settings, you can now begin the process of uploading the application
software to the target system.
The UploadFile tab lets you select a specific file (set format
filter to *.hex). Information on the file you select will appear in
the File-Info window. Click the Upload box in the bottom
right corner to start uploading the file to the FLASH memory.
FLASHit will attempt to automate the settings described
below.
During the upload FLASHit switches to the FlashMem tab and
displays the data of the FLASH memory being used (FLASH
type, manufacturer, memory capacity and the number of
sectors). The Status window shows the progress of the
upload.
You can cancel the upload at any time by clicking Cancel.
The Status window will turn green when the upload is
complete.
If the Status window turns red the upload was unsuccessful.
The possible causes of the upload failure can be viewed in the
Status window.
The appendix contains list of all error codes.
Oct 09
Page 8
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.4.1 HEX or BIN?
FLASHit allows you to write Intel hex files as well as binary files to the FLASH memory of the target system.
To do so, click the Programming file into flash>Load Bin
option in the Config/Target and program configuration
menu. With this setting FLASHit will no longer interpret the
file to be saved in FLASH. Even Intel hex files will not (!) be
treated as hex files, but as binary files!
The start address in the target system where you want to save
the binary file can also be set there.
If the Program file into flash/Load Intel-Hex option is enabled, you will not be able to flash binary files since they do
not have the same structure as Intel hex files.
If the Program file into flash/Load Bin option is enabled and an Intel hex file is selected to be flashed, FLASHit will ask
you to confirm your selection again.
4.5 FLASH Memory Info
Regardless of whether or not an upload has been initiated, you can press the Analysis button on the FlashMem tab to
display the following information on the FLASH type being used:
- FLASH type
- Producer
- Memory size
- Number of sectors
- Place of the FLASH memory
- FLASH code
- Partitioning and size of the individual sectors
FLASHit automatically detects the FLASH type being used. If
two 8-bit FLASH memories are being used in a 16-but bus,
FLASHit will detect such a configuration and double the sector
size that is indicated! A summary of the currently supported
FLASH types can be found in the MCU info Flash types menu
item of the Help menu.
Regardless of whether a program is being uploaded, you can
use the Chip Erase option to delete the entire FLASH memory
chip or the Sector Erase option to delete individual sectors of
the FLASH memory by selecting them with the mouse.
Oct 09
Page 9
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.6 Information on Supported MCUs
The Help/MCU info... menu lets you view the entire FLASH
database of FLASHit. With this menu you can easily check
whether FLASHit support the FLASH you want to use. If the
particular FLASH you want is not listed, hse may be able to
quickly import the relevant software component.
With this function FLASHit also offers help in searching for
supported FLASH types.
You can enter keywords for the search in the View Filter
menu (manufacturer, name and FLASH size).
All sectors of the FLASH are graphically represented. If you
select a sector with the mouse, the number, size and start and
end address of that sector will be shown.
4.7
Target System Info
Click the Get info button to see information about the target system on the Target CPU tab.
Processor
Banking:
RAM:
Ext. Memory:
I/O-Ports:
Serial bus:
MANUF:
MIPS:
Timer:
PCA-Channels:
Int. Osc:
ADC:
Temp.Sensor:
Info:
FLASH content
Oct 09
Page 10
Target CPU type (C80C51F310 in this
example)
Supported memory banks
Size of RAM
External Bus?
PIOs
Supported Interfaces
Manufacturer
MIPS
Number of Timer
Number of PCA Channels
Tolerance of internal Oscillator
Lists the ADC groups
Temperature sensor in the MCU?
MCU specific infos
Announcement of the first 8 bytes in the
FLASH memory.
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.8 Configuring FLASHit
Although FLASHit determines most of the required data on its own, a number of parameters may have to be set
manually.
4.8.1 Target System
You can configure the various settings of the target system
using the Config>Target and program configuration menu
and the Target System tab.
Communications Interface / MCU
Choice of the connecting interface (JTAG / C2) to the MCU.
USB Debug Adapter
Choice of the powersupply of the target
Flash memory
On chip Flash will be supported.
Oct 09
Page 11
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
4.8.2 Programming Sequence
You can configure the programming sequence settings using the Config/Target and program configuration menu
and the Program sequence tab. FLASHit performs parameter 1 through 8 in sequential order. The parameters
highlighted in bold in the Configuration window are default settings.
1. Erasing Flash
In this panel you can select either Chip Erase mode (the
FLASH memory is completely erased before downloading) or
Sector Erase mode. In Sector-Erase mode FLASHit analyses the
Intel hex file that you want to upload to the target system and
erases only those sectors where the program is to be saved. If
the Erase Flash option is not selected, the FLASH memory will
not be deleted before downloading. This is recommended if
you plan on saving multiple hex files in a row. If the Ask
before erase check box is selected, you will be asked to
confirm the deletion of the FLASH memory.
2. Programming file into flash
This option must be selected if you want to transfer a file into
the FLASH memory of the target system.
FLASHit allows you to write Intel hex files as well as binary files
to the FLASH memory of the target system.
To do so, click the Program file into flash>Load Bin option in the Config>Target and program configuration
menu. With this setting FLASHit will no longer interpret the file to be saved in FLASH. Even Intel hex files will not (!) be
treated as hex files, but as binary files! With this option you can "flash" data from a target system (or bitmaps, text files,
etc.) into another target system.
The target system's start address where the binary file is to be saved can also be defined in this menu.
3a. Build checksum (CRC)
Select the Build Checksum option and FLASHit will build a
checksum based on the content of the FLASH memory.
In the "Calculation area of checksum" section you can specify
the address spaces to be used in building the checksum. The
red area, for example, shows a space that contains the SFR or
RAM and will therefore be hidden.
ADD32 (Add Bytes) requires about 2 Sec/256 Kbyte (lowest
security level).
CRC16 (Cyclic Redundancy Check) requires about
16 Sec/256 Kbyte (highest security level). Since the system area
is located in the linear address space (red field), it must be
hidden during the checksum building process. You can specify
the system area here.
Note: The procedures described in this section are illustrated in Appendix 7.4, Sources of the Checksum Functions
Oct 09
Page 12
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
3b. Compare checksum with
Compares a fixed checksum with the calculated checksum or a
checksum created from the upload file. You can also perform
a checksum check of a specific area of the upload file
(Upload file area).
4. Write word (int)
Selecting this option allows you to write a "word" (2 bytes) in
the variable address of the FLASH memory.
5. Write User serial number into flash
This option causes FLASHit to automatically generate a serial
number and save it at a specified address (At address). The
Prefix and Number input fields determine how the serial
number will look like. The Increment... option specifies
whether the Number field will be increased by 1
(incremented) each time the serial number is saved
successfully. The two preview fields show how the following
numbers will look like. If you select the Write number into
logfile option, all assigned serial numbers will be saved in a
log file. The name of the log file is composed of the prefix of
the serial number and the *.txt extension (e.g., hse1.txt).
6. Reset target
The Software reset option generates a software reset in the target system once the download is complete.
7. Start RS232 Terminal
Select the Start RS232 Terminal option to start a terminal program after the target system is reset that displays all the
data your application transferred over the RS232 interface (the correct baud rate must be set!):
Rx
term
Minimal terminal program in status window
Smal term External terminal program (hse tool)
Ext. term External terminal program
8. Exit FLASHit after upload sequence
With this option you can specify whether and in what way FLASHit will automatically quit after an upload.
4.8.3 Saving Configuration Data
In the File>Open configuration menu you can load
previously saved settings, saved them with Save
configuration or save them under a new name with Save
configuration as...
Oct 09
Page 13
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
5 Special Functions
FLASHit provides an array of additional tools in the Special Functions menu item.
5.1 Reading Out the FLASH Memory
Reads out the FLASH memory and saves it as either a *.bin or
*.hex file.
Proceed as follows:
Size:
Enter the size of the FLASH memory
end address:
Shows the top memory address of the selected FLASH
memory.
end/begin:
A sub area of the FLASH memory can be hidden from the read
out process so as not to include the system areas of the
processors in the save. This is necessary if the read out data
will later be written in a FLASH memory.
start address
The addresses specified here apply for most of the system
areas of the C8051xxxx family.
Oct 09
Page 14
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
5.2 Reading Out the Content of Individual Addresses
Click the Target-memory viewer menu item to read out the
individual addresses from the FLASH module.
If the add address by 16 check box is selected, every time you
click the Read from target button the subsequent bytes will
be displayed.
Click Erase view window to erase the data being displayed
(but not the data in the FLASH memory!).
Code Memory
RAM
XRAM
Oct 09
Page 15
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
5.3
Generating Checksum
Based on the settings you selected in the Program sequence
tab of the Config>Target and program configuration
menu, you can click this menu item to determine the correct
checksum.
5.4 Saving Debug Log File
FLASHit logs debug informations during the course of a
session. If an error occurs, the log data are automatically
saved in the DebugMemoSiLabs.txt file when you quit
FLASHit.
If you click Save debug logfile as from the Special Function
menu, the logged data will be saved in the directory of your
choosing (for cases where no errors occur). This log file is used
to perform a precise error analysis.
5.5 Start target program
Start target program This option is a software command that
can be used to generate a reset in the target system and starts
the target application.
5.6 Stop target program
Stop target program This option is a software command that
can be used to stop the MCU.
Oct 09
Page 16
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
5.7 Command Line Functions
The functionality of FLASHit can be controlled externally by means of command line parameters (scripts). Note that
these parameters are upper and lower case sensitive! The CmdLine tool (see 6.4 Command Line Generator CmdLine)
can be used automatically generate the appropriate scripts. Command lines allow you to access and control FLASHit
from a separate application with or without the desktop user interface.
Example:
1. FLASHit is to be launched via an icon on the Windows desktop.
2. A specific file is to be loaded.
3. The file is to be programmed into the FLASH memory of the target system.
4. FLASHit exits automatically once the upload is complete.
Proceed as follows:
- Create a new FLASHit shortcut on the Windows desktop.
- Give the icon a name (e.g., out.hex).
- Open the Properties dialog from the context menu and select the Connection tab.
- Enter the following in the Target input box:
c:\programme\flashit.exe HEX-FILE=e:\projekt\out.hex AUTOSTART EXIT
Result:
Double-click the out.hex program icon to launch FLASHit and the e:\projekt\out.hex file is transferred to the
target system where it is then programmed in the FLASH memory. FLASHit exits automatically.
Note: Chapter 7.2 provides an overview of the command line functions.
5.8 Priorities in the FLASHit Configuration
All the parameters you set (e.g., baud rate, COM port, etc.) in FLASHit are stored in the flashit_Sil9.ini file.
Each valid FLASHit parameter (Actual-Config) is composed of:
- the "old data" from the flashit_Sil9.ini file.
(Old-Config)
- any "parameters" that are transferred when FLASHit starts up,
for example, from another program (Command-LineConfig). These parameters have priority over the parameters
saved in the flashit_Sil9.ini file.
- the settings made by FLASHit directly on the desktop
(Desktop-Config); these settings have priority over all other
parameters.
5.9 Saving the Configuration
Select Save configuration to save all the settings you have
made.
Select Open configuration... to load the settings.
Oct 09
Page 17
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
5.10 Software Generator
To test the Upload function of the destination hardware with FLASHit, the possibility exists to save and run a test
program generated by FLASHit. FLASHit determines the necessary data for generating of the code (e.g., the system
initialization) automatically. The Software Generator can be called via file/software generator...
The generated test program contains following functions:
- Initialization of the Target.
-
Cyclic sending of a message via RS232 The baud rate is
set to 57600 8n1.
-
In the range of Test output via terminal program the
default settings of the used TxD pin is displayed (P0.4).
In the input window Message send via RS232 from
target the text to be sent can be set individually. The text
is complemented by a Sufix (0-99) and a CR+LF.
-
Output of a rectangle signal
In the range Clock pulses via port pin a rectangle
frequency ca be set, e.g., to the control of a LED.
-
With the parameter Loop speed the loop frequency of the
generated program is set.
The generated program can be saved in the working directory under demo files with save as and can be saved about
the Upload function of FLASHit in the Target.
Oct 09
Page 18
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
6 The FLASHit Package
The tools described below are part of the FLASHit package and represent stand-alone programs that can be loaded
externally or directly in FLASHit.
6.1 RS232 Terminal
The RS232 terminal is a universal terminal program for
logging data sent by the application on the target system via
the RS232 interface.
Note: RS232 terminal can be launched either separately or in
FLASHit.
You can start all of the standard functions in the File menu.
You can set the display mode in the Display menu.
Oct 09
Hex format:
All data are displayed in the hex
format.
ASCII format:
All data are displayed in the ASCII
format.
Hex+ASCII format:
All data are displayed in the ASCII and
hex formats.
Transmit:
In the Transmit list box you can select
the string you want to send. Click the
Transmit button to send the string via
the RS232 interface.
Tx window:
Click the TX window button to open a
window where any text you enter will
be sent "live" via the RS232 interface.
Page 19
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
Click Clear Rx-Window to erase all data in the receive
window.
You can set the COM connection mode in the Connected
menu.
The Line feed menu lets you adjust the line feed of the data in the terminal window, as well as define separate line
breaks for receive and transmit.
Line feed at CR:
Line feed at LF:
Line feed at traffic break:
Line feed at a carriage return.
Line feed at a line feed.
Line feed when data are absent
Add CR:
Adds a carriage return to the
sent text.
Adds a line feed to the sent
text.
Adds a carriage return and a
line feed to the sent text.
Does not add a carriage return
or a line feed to the sent text.
Add LF:
Add CR+LF:
Add none:
You can configure the standard COM port settings in the
Setup menu.
Target Reset via Terminal
The Control target menu can be used to generate a hardware
reset of the target system. Before this can be done, however,
the relevant connections of the RS232 interface must be wired
based on the circuit suggestion (see Appendix 7.6, Reset and
Bootstrap Interface).
Oct 09
Page 20
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
6.2 Checksum Builder
The checksum builder is a universal program for calculating the checksum of a hex file.
You can select a hex file in the File menu. In the FLASH size
list box you can specify the size of the FLASH memory.
The checksum builder defines the start and end addresses
based on the FLASH size setting. You only need to specify the
internal area of the target controller in the Begin of internal
area und End of internal area fields since this area is
factored out when calculating the checksum.
Click Calculate to start the calculation.
The resulting checksum will be indicated by the ADD32 and
CRC16 values.
Note: The checksum builder can only be launched externally.
You can control the Checksum Builder using command line
parameters.
Command
EXIT
A1=
A2=
A3=
A4=
FS=
FP=
HEX-FILE=
LOCAL=
Hex-File =
CRC16 =
ADD32 =
Error Code =
Start-Adr =
BegInt-Adr =
EndInt-Adr =
End-Adr =
j:\hexfiles\128kRandom.hex
0x51EF
0x00EDFE42l
000
0x000000
0x00E000
0x00FFFF
0x01FFFF
Function
The program exits after the calculation.
Defines the start address of the checksum calculation.
Defines the start address of the system area.
Defines the end address of the system area.
Defines the end address of the checksum calculation.
Defines the flash size (0=auto, 1=64 k, 2=128 k,
3=256 k, 4=512 k, 5=1 M, 6=2 M, 7=4 M)
Defines the data content of a deleted flash module (fill
pattern).
Defines the file the checksum builder calculates.
The result file is written to the program directory.
A result file (Result_CRC.txt) will be created when you exit
the checksum builder. The file is located at
C:\Doku..Einstellungen\All users\Anwendungsdaten\Flashit
in Windows XP and C:\PrgramData\FLASHit in Windows Vista.
Example of Result_CRC.txt
Error code
0
14
36
171
175
Oct 09
Meaning
Error-free execution.
Unable to read file.
The size of the flash module is unknown.
The file contains data outside of flash.
File not found
The checksum builder sends a return code back to the calling
program. The return code is divided into two areas: the CRC17
checksum (Bit 0..15) and the error code (Bit 16..31).
Page 21
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
6.3 IO Check
The IO check is an interface testing tool that is integrated in the FLASHit package and is used to check whether the
COM port (the basis for working with FLASHit) is functioning properly.
Note: IO check can be launched either separately or in FLASHit.
When the IO check function is executed, all installed COM
parts will be checked to determine whether access via the
Windows API function (API=Application Programming
Interface) is possible. Afterwards the direct access to the PIO
module (PIO mode) will be checked.
IO check shows which COM ports can be used in FLASHit.
FLASHit can only use COM ports that are accessible via the API.
IO check also lets you manually enable and disable individual
port lines and test the LPT1port.
Access modes
Access to the COM port via the API is only possible if the port
was free prior to starting the program.
The PIO mode is perfect for "observation" while the API mode
is suited to performing function tests. The PIO mode can only
be used for standard COM ports, which excludes COM ports
based on UBS interfaces, for example (USB RS232 Adapter).
Loop test/line test:
Click the Test button to open a log window that displays the
results of the automatic test.
To save the test results, click Save protocol as... in the File
menu.
A physical test of the individual lines and signal runtimes will
be performed.
To complete this test, however, you first need to insert a test
plug into the COM port (see bottom left corner).
Example for line test log:
COM1: Start Loop Test (API mode)
TxD -> RxD Loop ok. Delay = 1.6 ms
DTR -> DSR Loop ok. Delay = 5.6 ms
DTR -> DCD Loop ok. Delay = 0.9 ms
RTS -> CTS Loop ok. Delay = 4.4 ms
RTS -> Ri Loop ok. Delay = 0.5 ms
The specified times are approximate values and depend on the
speed of your computer. Signal times can be significantly
longer with COM ports that are operated using a USB interface
adaptor.
Oct 09
Page 22
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
Manual check of port lines
- signals (input)
The colors of the symbol indicate the logical level. This means
the logical level of "1" can range from approx. +5 V to approx.
+12 V depending on the computer model. The corresponding
negative level: approx. –5 V to approx. –12 V.
- outputs
By clicking the
symbol, you can set a signal to the
appropriate port.
The logical level is shown in place of the exact voltage.
WARNING:
Any modification to the outputs may result in the destruction of hardware (PC and/or externally
connected devices)!
Control Lines of the Printer Connection
The control lines of the first default printer (address 0x378) can be modified and monitored manually.
WARNING:
Any modification to the outputs may result in the destruction of hardware (PC and/or externally
connected devices)!
Oct 09
Page 23
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
6.4 Command Line Generator (CmdLineSiL)
To facilitate the use of command line functions in FLASHit, the CmdLineSiL program is included on the CD and can be
used to automatically generate
- a command line and an ICON
- a C source code (for access from a separate application)
Note: The CmdLineSiL can only be launched externally.
This window makes it extremely easy to adjust the various settings. In the example here,
the upload hex file (HEX-FILE=J:\Hexfiles\C8051\blinker_1s.hex) has been selected which
initiates the automatic start of the upload (AUTOSTART)
sets the FLASH memory erase mode to "Sector Erase" (ERASE MODE=SECTOR)
specifies that FLASHit will exit automatically (EXIT)
The menus highlighted in bold contain settings that have been changed.
The sequence of the individual commands has no effect!
This button lets you launch FLASHit directly from the specified command line.
This button lets you create shortcuts with FLASHit and the specified command line.
This button lets you access FLASHit from a Visual C++ code.
This button lets you access FLASHit from a Borland C code.
Oct 09
Page 24
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
FLASHit returns the "return code" which is then displayed by CmdLine.
With the following program lines you can extract the "error code" from the return value (see 7.1).
uiErrorCode = (unsigned int) ( ulReturnValue >> 8 );
With the following program lines you can extract the "short code" from the return value.
cShortCode = (char)( ulReturnValue & 0x0F );
Short code equals bit 4 from the return value as shown below.
0
No error
1
Error in hex file
2
Error in target system
3
Flash was not found
4
Flash type not supported as yet
5
Error while deleting the flash module
6
Error while programming the flash module
7
Checksum error
8
Error in program flow of FLASHit
other
error in Windows
FLASHit can also generate a "return code file" (result.txt) for evaluation by another application.
Note: If you want to work with CmdLine, then it must be located in the FLASHit directory!
Subject to change!
"We hope your work is a success"
The hse-electronics Team
Oct 09
Page 25
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
7 Appendix
7.1 Error Messages
Description
Code Ret Message
Solution
File, Modul, Lib... not found
E014
1
E014: Can't open upload file
Access to upload file is not possible.
Check right to access Upload file
E015
8
E015: No FLASH data found
FLASHit could not find infos about the
info hse
E025
E025: Data base FLASHdat.LIB not found
File FLASHdat.LIB not found
Check installation
E026
E026: Ini-File is write protected
Flashit.ini is write protection
Program Error
E031
8
E031: No memory for FlashLib
No memory to read Flashitx.lib
E032
8
E032: Not enough memory
No memory to read Flashitx.lib
E033
1
E033: Error in Hex-File: Line is too long!
Hex format error
Check Hex-Format
E034
1
E034: Wrong file format. Function abort
Hex format error
Use Intel-Hex-Format
E036
1
E036: Size of FLASH is unknown. Abort
Size of embedded flash is not found
hse
E038
6
E038: Can't write User-Serial-Number [..] at log. address
Error in embedded flash.
Check input
E039
1
E039: Mirror address is unknown
Undefined size of embedded flash
hse
Not supported
E040
8
E040: Sorry this CPU is not enabled at your version
Target CPU (step) is unknown
E041
8
E041: Function is not supported
not supported function
E044
9
E044: Demo restriction
Demo restriction
E048
8
E048: Contact hse-elctronic
Upload data access error
Oct 09
Page 26
hse
hse / String not found
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
Data Format Error
E052
1
E052: Upload-file is no Intel-Hex format!
Embedded upload file format error
E053
1
E053: Overwrite Address
Multiple define of data in Embedded upload Check Linker Settings
E056: Data outside of FLASH at Address x
Address of embedded file is out of flash
E056
E058
1
E058: Checksum error in Hexfile line
Error in upload file format
E059
1
E059: Wrong blocklenght in Hexfile line
Error in upload file format
E060
2
E060: No Debug Adapter found
Check Intel-Hex-Format
If no Debug Adapter or Toolstick is plug in
Target Error
E103
2
E103: No correct answer from target
Error at Connecting device
E104
2
E104: Communication with target failed
Error at Connecting device
E106 2
E106: Identifier target device failed
GetDeviceName returns error
E110
2
E110: Target crashed -rebooting...
Target crashed while erasing
Reset Target
E111
2
E111: No response from target
Target does not answer correct
Check connection to Target
Error in Flash
E134
6
E134: Abort at Adr. %08lXh, while Timeout-Error!
Programming stop at address x
E135
6
E135: Abort at Adr. %08lXh, Error%d!
Programming stop at address x
E138
6
E138: Flash type is not found
No data about embedded flash
E140
5
E140: FLASH-Erase abort while timeout!
Target does not answer
E150
7
E150: Checksum compare error
CRC of target flash does not match
User input Error
E173
8
E173: Address combination is not possible A(n)>A(n+1)
User input error (CRC)
E175
1
E175: Hexfile not found
Upload file not found
Oct 09
Page 27
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
E178
8
E178: Address not possible
E200
4
E200: sizeof(FLASHdat.LIB) too big
File size error
E202: Lenght too high
Path to upload file is too long
E202: 8
Code-Access
E501
2
E501: Can't read address x Code y
Access not possible, reserved area
Licence
E900
No Licence found
E934
USB-Dongel brocken
Oct 09
Page 28
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
7.2 Overview of Command Line Functions
Commands
Description
Adjustments
Examples
Project
Starts FLASHit with project
file (*.ini).
INI_FILE
INI_FILE=c:\demo.ini
INI_FILE="c\program files\test.ini"
Flash Upload
FILTER
Defines filter for file view
*.xxx
FILTER=*.H66
HEX-FILE
Defines a path and file name for
upload
Fullpath
HEX-FILE=c:\new\out.hex
HEX-FILE="c:\new 1\out.hex"
BIN-FILE
Defines a path and file name for
upload
Fullpath
HEX-FILE=c:\new\out.bin
HEX-FILE="c:\new 1\out.jpg"
BIN-OFFSET
Load Bin-File with offset into
Flash
FILELOAD
Loading mode (bin/intel-Hex)
BIN-OFFSET=0x080000
BIN, HEX
FILELOAD=HEX
Visible
ICONSIZE
Starts FLASHit as an icon
ICONSIZE
EXPERTVIEW
Start full view
EXPERTVIEW
EXPRESSVIEW
Start smal view
EXPRESSVIEW
User Serial Number (USN)
USN_Prefix
Defines the prefix of the USN
Oct 09
max. 8digits
USN_Prefix=Version:
Page 29
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
USN_Number
Defines the value of the USN
max. 8digits
USN_Number=123
USN_Adress
Defines the start-adress of the USN
max. 8digits
USN_Adress=0x3FFF0
USN_INC
Defines autoincrement of the USN
USN_INC
USN_Log
Defines the storing of the
USN into a file
USN_Log
Program setting
SEQUENCE
Controls Program sequency, listed
number will be enabled.
1, 2, 3a, 3b,
4, 5a,
5b, 5c, 6, 7, 8
SEQUENCE=1,2,6,8
ERASE-MODE
Defines SECTOR- or CHIP- NO-erase
before programming
SECTOR,
CHIP, NO
ERASE-MODE=SECTOR
AskUseBeforeEra
se
Stops and ask user
before sector erase
0, 1
AskUseBeforeErase=0 AskUseBeforeErase=1
CHECKSUM=AD
D
Calculates a 32 bit add up Checksum
after download
0x000000 0xFFFFFF
CHECKSUM=ADD
CHECKSUM=CR
C16
Calculates a CRC16 checksum after
download
0x000000 0xFFFFFF
CHECKSUM=CRC16
CMPCHK
Compares Checksum with value
0x000000 0xFFFFFF
CMPCHK=0x0023456
HARDRESET
Generates a hardware reset after
successful programming
AutoEraseSec
Erases sector at address
0x000000 0xFFFFFF
AutoEraseSec=0x018000
AutoWriteWord
Writes a word at address
0x000000 0xFFFFFF,
0x0000 0xFFFF
AutoWriteWord=0x018000,0x1234
Oct 09
HARDRESET
Page 30
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
Program control
EXIT
Exits FLASHit after successfull program
sequence
EXIT
RETURN
Exits FLASHit allways after program
sequence
RETURN
AUTOSTART
Starts automaticaly program sequence
AUTOSTART
WORK_DIR
Path to work directory (ini, result)
Oct 09
Fullpath
WORK_DIR=j:\ini
WORK_DIR="c:\program files\flashit"
Page 31
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
7.3
Supported MCUs
C8051F-Family
C8051F120
C8051F121
C8051F122
C8051F123
C8051F124
C8051F125
C8051F126
C8051F127
C8051F130
C8051F131
C8051F132
C8051F133
C8051F064
C8051F065
C8051F066
C8051F067
C8051F022
C8051F023
C8051F000
C8051F001
C8051F002
C8051F005
C8051F006
C8051F007
C8051F010
C8051F011
C8051F012
C8051F015
C8051F016
C8051F017
C8051F018
C8051F019
C8051F350
C8051F351
C8051F352
C8051F353
C8051F410
C8051F411
C8051F412
C8051F413
C8051F360
C8051F361
C8051F362
C8051F363
C8051F364
C8051F365
C8051F366
C8051F367
C8051F368
C8051F369
C8051F336
C8051F337
C8051F338
C8051F339
C8051F310
C8051F311
C8051F312
C8051F313
C8051F314
C8051F315
C8051F316
C8051F317
C8051F330
C8051F331
C8051F332
C8051F333
C8051F334
C8051F335
C8051F300-GM
C8051F301-GM
C8051F302-GM
C8051F303-GM
C8051F304-GM
C8051F305-GM
C8051F206
C8051F220
C8051F221
C8051F226
C8051F230
C8051F231
C8051F236
C8051F530A-IM
C8051F530A-IT
C8051F531A-IM
C8051F531A-IT
C8051F533A-IM
C8051F533A-IT
C8051F534A-IM
C8051F534A-IT
C8051F536A-IM
C8051F536A-IT
C8051F537A-IM
C8051F537A-IT
C8051F520A-IM
C8051F521A-IM
C8051F523A-IM
C8051F524A-IM
C8051F526A-IM
C8051F527A-IM
C8051F340-GQ
C8051F341-GQ
C8051F342-GQ
C8051F343-GQ
C8051F344-GQ
C8051F345-GQ
C8051F346-GQ
C8051F347-GQ
C8051F326
C8051F327
C8051F320
C8051F321
C8051F060
C8051F061
C8051F062
C8051F063
C8051F040
C8051F041
C8051F042
C8051F043
C8051F044
C8051F045
C8051F046
C8051F047
C8051F920-GQ
C8051F920-GM
C8051F921-GM
C8051F930-GQ
C8051F930-GM
C8051F931-GM
C8051F020
C8051F021
C8051F348-GQ
C8051F349-GQ
C8051F505-IM
C8051F500-IQ
C8051F500-IM
C8051F503-IQ
C8051F501-IQ
C8051F506-IQ
C8051F501-IM
C8051F506-IM
C8051F503-IM
C8051F502-IQ
C8051F502-IM
C8051F507-IQ
C8051F504-IQ
C8051F507-IM
C8051F504-IM
C8051F505-IQ
C8051F34A-GQ
C8051F34B-GQ
C8051F330-GM
C8051F330-GP
C8051F300-GS
C8051F301-GS
C8051F302-GS
C8051F303-GS
C8051F304-GS
C8051F305-GS
C8051F700-GQ
C8051F701-GQ
C8051F702-GQ
C8051F703-GQ
C8051F704-GQ
C8051F704-GM
C8051F705-GQ
C8051F705-GM
C8051F706-GQ
C8051F706-GM
C8051F707-GQ
C8051F707-GM
C8051F708-GQ
C8051F709-GQ
C8051F710-GQ
C8051F711-GQ
C8051F712-GQ
C8051F712-GM
C8051F713-GQ
C8051F713-GM
C8051F714-GQ
C8051F714-GM
C8051F715-GQ
C8051F715-GM
C8051F508
C8051F509
C8051F510
C8051F511
C8051F580-IQ
C8051F580-IM
C8051F581-IQ
C8051F581-IM
C8051F582-IQ
C8051F582-IM
C8051F583-IQ
C8051F583-IM
C8051F584-IQ
C8051F584-IM
C8051F585-IQ
C8051F585-IM
C8051F586-IQ
C8051F586-IM
C8051F587-IQ
C8051F587-IM
C8051F588-IM
C8051F589-IM
C8051F590-IM
C8051F591-IM
C8051F342-GM
C8051F343-GM
C8051F346-GM
C8051F347-GM
C8051F349-GM
C8051F34A-GM
C8051F34B-GM
C8051T606-ZM
C8051T606-GM
C8051T606-GT
C8051T615
C8051T616
C8051T617
C8051T-Family
C8051T610
C8051T611
C8051T612
C8051T613
C8051T614
C8051T600-GM
C8051T601-GM
C8051T602-GM
C8051T603-GM
C8051T604-GM
C8051T630
C8051T631
C8051T632
C8051T633
C8051T634
C8051T635
C8051T605-GM
C8051T600-GS
C8051T601-GS
C8051T602-GS
C8051T603-GS
C8051T604-GS
Oct 09
Page 32
C8051T605-GS
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
7.4 Sources of Checksum Function
ADD32 (Add Bytes)
//-----------------------------------------------------------------------------------------unsigned int ChecksumADD32( unsigned long ulA1, unsigned long ulA2, unsigned long ulA3,
unsigned long ulA4 )
{
unsigned int uiChecksumADD32 = 0;
unsigned long ulAddress;
// address range
for (ulAddress = ulA1; ulAddress <= ulA4; ulAddress++)
{
//Check for switch address to jump over system area
if ( ulAddress == ulA2 ) ulAddress = ulA3 + 1;
//Checksum function
uiChecksumADD32 += *(volatile huge unsigned char*) ulAddress;
}
return( uiChecksumADD32 );
}
CRC16 (Cyclic Redundancy Check)
//-----------------------------------------------------------------------------------unsigned int ChecksumCRC16(unsigned long ulA1, unsigned long ulA2, unsigned long ulA3,
unsigned long ulA4 )
{
unsigned int uiCRC6 = 0;
unsigned char ucData;
for (ulAddress = ulA1; ulAddress <= ulA4; ulAddress++)
{
// Check for switch address to jump over system area
if ( ulAddress == ulA2 ) ulAddress = ulA3 + 1;
ucData = *(volatile huge unsigned char*) ulAddress;
// Checksum function
for (i=0; i<8; i++)
{
if ((uiCRC6 ^ ucData) & 1) uiCRC6=(uiCRC6>>1)^0xA001;
else uiCRC6 >>=1;
ucData >>=1;
}
}
return( uiCRC6 );
}
Subject to change!
No guarantee of completeness!
Oct 09
Page 33
e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
8
hse-elctronics product: HEXit the HEX-File Analysis-Tool
Oct 09
Page 34
e-flashit9xx-manual-Si8051-10.doc
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertising