Professional Documents
Culture Documents
flashit9 руководство
flashit9 руководство
4 Program Functions
4.1 Establishing A Connection
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):
"Expert mode"
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.
- 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.
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.
Flash memory
On chip Flash will be supported.
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.
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.
Note: The procedures described in this section are illustrated in Appendix 7.4, Sources of the Checksum Functions
6. Reset target
The Software reset option generates a software reset in the target system once the download is complete.
5 Special Functions
FLASHit provides an array of additional tools in the Special Functions menu item.
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.
Code Memory
RAM
XRAM
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:
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.
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.
You can start all of the standard functions in the File 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.
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.
Command Function
EXIT The program exits after the calculation.
A1= Defines the start address of the checksum calculation.
A2= Defines the start address of the system area.
A3= Defines the end address of the system area.
A4= Defines the end address of the checksum calculation.
FS= 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)
FP= Defines the data content of a deleted flash module (fill
pattern).
HEX-FILE= Defines the file the checksum builder calculates.
LOCAL= The result file is written to the program directory.
Hex-File = j:\hexfiles\128kRandom.hex A result file (Result_CRC.txt) will be created when you exit
CRC16 = 0x51EF the checksum builder. The file is located at
ADD32 = 0x00EDFE42l C:\Doku..Einstellungen\All users\Anwendungsdaten\Flashit
Error Code = 000
Start-Adr = 0x000000 in Windows XP and C:\PrgramData\FLASHit in Windows Vista.
BegInt-Adr = 0x00E000
EndInt-Adr = 0x00FFFF
End-Adr = 0x01FFFF
Example of Result_CRC.txt
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.
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).
- 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)!
WARNING: Any modification to the outputs may result in the destruction of hardware (PC and/or externally
connected devices)!
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.
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!
7 Appendix
7.1 Error Messages
Description
Code Ret Message Solution
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
Program Error
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
E048 8 E048: Contact hse-elctronic Upload data access error hse / String not found
Oct 09 Page 26 e-flashit9xx-manual-Si8051-10.doc
FLASHit 9 SiL Manual
E052 1 E052: Upload-file is no Intel-Hex format! Embedded upload file format error Check Intel-Hex-Format
E053 1 E053: Overwrite Address Multiple define of data in Embedded upload Check Linker Settings
E056 E056: Data outside of FLASH at Address x Address of embedded file is out of flash
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
Target 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
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
E173 8 E173: Address combination is not possible A(n)>A(n+1) User input error (CRC)
E202: 8 E202: Lenght too high Path to upload file is too long
Code-Access
E501 2 E501: Can't read address x Code y Access not possible, reserved area
Licence
Project
Flash Upload
Visible
Program setting
1, 2, 3a, 3b,
Controls Program sequency, listed
SEQUENCE 4, 5a, SEQUENCE=1,2,6,8
number will be enabled.
5b, 5c, 6, 7, 8
0x000000 -
CMPCHK Compares Checksum with value CMPCHK=0x0023456
0xFFFFFF
0x000000 -
AutoEraseSec Erases sector at address AutoEraseSec=0x018000
0xFFFFFF
0x000000 -
0xFFFFFF,
AutoWriteWord Writes a word at address AutoWriteWord=0x018000,0x1234
0x0000 -
0xFFFF
Program control
WORK_DIR=j:\ini
WORK_DIR Path to work directory (ini, result) Fullpath
WORK_DIR="c:\program files\flashit"
C8051T-Family
C8051T610 C8051T611 C8051T612 C8051T613 C8051T614 C8051T615 C8051T616 C8051T617
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 C8051T605-GS
// 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 );
}
// 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!