📄 flip_um.htm
字号:
<DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-974334"></A>Device > Verify</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-974339"></A>This command lets you compare the target device contents to the buffer one. The verification is done on the address range displayed in the main window Buffer Information area and is labeled Range. You can change it by using the Buffer Options window.</LI></UL></DIV></DIV><DIV><H4 CLASS="SH-Section-Head"><A NAME="pgfId-974298"></A>Operations flow</H4><P CLASS="BT-Body-Text"><A NAME="pgfId-974345"></A>The operations flow is displayed on the left part of the FLIP main window. It lets you select a number of operations to be performed sequentially. You launch the flow sequence by clicking the Run button.<BR>When an operation completes, the corresponding check box color changes from white to green (for pass status) or red (for fail status).</P><P CLASS="BT-Body-Text"><A NAME="pgfId-974349"></A>If one of the operations fails, the operations flow stops.<BR>Some operations in the flow require that you perform a setup, first :</P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-974355"></A>Erase - Setup the erase options through Device > Erase ...</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-974358"></A>Blank Check - Setup the Blank Check options through Device > Blank Check ...</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-974356"></A>Program - Setup the address programming range through Buffer > Options ...</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-974367"></A>Verify - Setup the address verifying range through Buffer > Options ...</H6><P CLASS="BT-Body-Text"><A NAME="pgfId-974377"></A><BR>Use the Clear button to clear all checkboxes in the flow.</P></DIV></DIV><DIV><H4 CLASS="SH-Section-Head"><A NAME="pgfId-966952"></A><A NAME="31182"></A>The history and command window</H4><P CLASS="BT-Body-Text"><A NAME="pgfId-1013017"></A>Starting with the FLIP version 1.2.0, the history and command window can be displayed through the Settings > Command Window pulldown menu.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-974392"></A>This window keeps the history of all actions performed on the target device or on HEX files, but it can do much more than this! Type pwd at the prompt and you will get the current FLIP working directory. Type expr 2 + 5 and you will get the result of this addition. <BR>FLIP has been written in Tcl and C; everything you type in the command window is interpreted by a Tcl interpreter. Type anything stupid in the command window (no example is provided here, you should be able to find your own) and you will get an invalid command name "stupid" message.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-974399"></A>The command window gives you access to the Tcl commands and you can rely on the Tcl power to write flexible scripts which you can then execute in the command window. Since some of the FLIP functions are made available to the Tcl command window, you can call these functions in you Tcl script. An example of use of this capability follows.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-974406"></A>Imagine that the Erase function which performs the target device erase operation is called erase_f. This function returns 1 if erase passes and 0 if it fails. You want to perform the erase operation once, check if it passes or fails and execute it again if it has failed. Your Tcl script would be something like :<BR></P><P CLASS="C-Code"><A NAME="pgfId-974408"></A>if { [ erase_f ] != 1 } {</P><P CLASS="C-Code"><A NAME="pgfId-974409"></A> erase_f</P><P CLASS="C-Code"><A NAME="pgfId-974410"></A>}</P><P CLASS="BT-Body-Text"><A NAME="pgfId-974407"></A>Do not type this example in the command window because it cannot work. At the time this document is written, this scripting capability is not fully implemented and cannot be used to write production scripts, but it is used by the FLIP developpers for tests and software validation purposes. Future versions of FLIP will make this capability available to the end user and all the usable functions will be documented.</P></DIV><DIV><H4 CLASS="SH-Section-Head"><A NAME="pgfId-1013021"></A>Recording and replaying commands</H4><P CLASS="BT-Body-Text"><A NAME="pgfId-1013023"></A>FLIP lets you build, load and execute a configuration file so that you can quickly configure a large number of devices or repeat a given sequence onto the same device.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-1013039"></A>You may build a configuration file by launching FLIP, executing commands and saving these commands into a configuration file. You may also write this configuration file by hand.</P><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1013027"></A>Building the configuration file from T89C51RB2/RC2</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1013047"></A>Launch FLIP and perform the following operations :</P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013053"></A>Select a device</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013054"></A>Set the communication parameters and connect to the target device</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013055"></A>Load a HEX file from disk</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013056"></A>Program the device</H6></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013057"></A>Build the configuration file by executing the File > Save Configuration As... pulldown menu command.</H6><P CLASS="BT-Body-Text"><A NAME="pgfId-1013081"></A>Even if you do not explicitely save a configuration file, it is built and saved anyway when you exit FLIP. In that case, it will be named flip.cfg by default and will be written in the directory in which the flip.exe file is located if you have write privileges to this directory.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-1013063"></A>Open the configuration file with a text editor to look at what FLIP has produced; you should see something like :</P><P CLASS="C-Code"><A NAME="pgfId-1013066"></A>selectDevice T89C51RC2</P><P CLASS="C-Code"><A NAME="pgfId-1013067"></A>set port COM1</P><P CLASS="C-Code"><A NAME="pgfId-1013068"></A>set baud 57600</P><P CLASS="C-Code"><A NAME="pgfId-1020448"></A>initProtocol RS232Standard</P><P CLASS="C-Code"><A NAME="pgfId-1013069"></A>connectRS232 Standard</P><P CLASS="C-Code"><A NAME="pgfId-1013070"></A>parseHexFile "D:/Labo/dev/app/Flip_dev/bin/2kisp.hex"</P><P CLASS="C-Code"><A NAME="pgfId-1013071"></A>setupProgramDevice</P><P CLASS="C-Code"><A NAME="pgfId-1013072"></A> </P></DIV></DIV><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1013064"></A>Loading and running the configuration file</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1013079"></A>Use the File > Load Configuration... pulldown menu command to load and execute a configuration file.</P><P CLASS="BT-Body-Text"><A NAME="pgfId-1013080"></A>You can then rerun the configuration file without loading it by simply pressing the F5 function key.</P></DIV><DIV><H5 CLASS="SHS1-Section-Head-Sub-1"><A NAME="pgfId-1013090"></A>Building a configuration file using a text editor</H5><P CLASS="BT-Body-Text"><A NAME="pgfId-1013092"></A>The configuration file is mainly made of calls to Tcl procedures defined in FLIP. Tcl being case sensitive, you must take care to the syntax.</P><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013096"></A>Selecting a device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013110"></A>Syntax : selectDevice <device_name></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013098"></A>Example : selectDevice T89C51RC2</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013111"></A>Selecting a communication port</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013113"></A>Syntax : set port <port_name></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013114"></A>Example : set port COM1</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013119"></A>Selecting a baudrate</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013121"></A>Syntax : set baud <baudrate></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013126"></A>Example : set baud 57600</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013174"></A>Connecting to the device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1020410"></A>The connection is made of two steps: you first specify a protocol and then connect to the device.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013175"></A>Syntax : </LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1020414"></A>initProtocol <medium-protocol_name></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1020422"></A>connectRS232 <protocol_name></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013176"></A>Example : </LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1020424"></A>initProtocol RS232Standard</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1020425"></A>connectRS232 Standard</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013131"></A>Loading a HEX file</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013134"></A>Syntax : parseHexFile "<hex_file_pathname>"</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013135"></A>Example 1 : parseHexFile "D:/Labo/dev/app/Flip Dev/bin/2kisp.hex"</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013140"></A>The double quotes may be omitted if the file pathname does not contain any space.</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013153"></A>Example 2 : parseHexFile D:/Labo/dev/app/FlipDev/bin/2kisp.hex</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013120"></A>Erasing the device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013187"></A>Some devices only support a full chip erase operation; some others support full chip and per block erasing operations.</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013212"></A>Full chip erase :</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013186"></A>Syntax : setupFullEraseDevice</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013213"></A>Block erase :</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013214"></A>Syntax : setupEraseBlock<i></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013215"></A>Example : setupEraseBlock0</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013216"></A>If you intend to erase several blocks, simply write several block erase lines with different block numbers.</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013091"></A>Blank checking the device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013219"></A>Checking that a device is blank requires that you enter three lines :</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013220"></A>Syntax : </LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013229"></A>setupBlankCheckDevice</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013228"></A>set blankCheckAddr(start) <start_addr></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013230"></A>set blankCheckAddr(end) <end_addr></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013237"></A>Example :</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013243"></A>setupBlankCheckDevice</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013244"></A>set blankCheckAddr(start) 0000</LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013245"></A>set blankCheckAddr(end) 7FFF</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013241"></A>Programming the device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013250"></A>Syntax : setupProgramDevice</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013166"></A>Verifying the device</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013257"></A>Syntax : setupVerifyDevice</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013167"></A>Setting the Software Boot Vector value</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013272"></A>Syntax : setupSBV <value></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013279"></A>Example : setupSBV FC</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013304"></A>Setting the Boot Status Byte value</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013305"></A>Syntax : setupBSB <value></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013297"></A>Example : setupBSB FE</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013298"></A>Setting the device security level</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013299"></A>Syntax : setupSecurityLevel <security_level></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013300"></A>Example : setupSecurityLevel 1</LI></UL></DIV><DIV><H6 CLASS="BL-Bullet-List"><A NAME="pgfId-1013301"></A>Programming the Oscillator fuse</H6><UL><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013309"></A>Syntax : setupOscFuse <value></LI><LI CLASS="BLI-Bullet-List-Indent"><A NAME="pgfId-1013314"></A>Example : setupOscFuse 1 (*)</LI></UL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -