?? psfileformat.html
字號:
<HTML>
<HEAD>
<TITLE>Persistent Store File Format</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<H1>The persistent store file format</H1>
<p> The persistent store file format defines a machine- and human-readable file format
for storing persistent store data.</p>
<p> The file is line oriented. Typically each line specifies an action to perform on a single key.</p>
<p>Examples</p>
<p> Each line starts with an amphersand and a four digit key number in hex, followed by an action and some optional data:
<PRE>
&1234 = 5678 9abc <I>// Set key 0x1234 to a two-word value.</I>
&1234=5678 9abc <I>// All white space is optional, so this is equivalent.</I>
&1234=56789abc <I>// As is this.</I><BR>
&1234 + 5678 9abc <I>// Set key 0x1234 <B>if not</B> already present.</I><BR>
&1234 ~ 5678 9abc <I>// Set key 0x1234 <B>if</B> already present.</I><BR>
&1234= <I>// Set key 0x1234 to a zero length value.</I><BR>
&1234 - <I>// Delete key 0x1234.</I><BR>
<I>// This is a comment, and may appear at the end of a line.
; This is another comment.
# So is this.
In fact any character other than a hex digit and whitespace can start a comment
when at the end of a well-formed line, including these two lines.</I>
</PRE>
Notes</p>
<ul><li>Lines not starting with <code>&</code> are completely ignored.
</li>
<li>Lines are separated with CR, LF.
</li>
<li>All numbers should be four hex digits (<code>0-9</code>, <code>A-F</code>, <code>a-f</code>).
</li>
<li>Ill-formed lines generate an error to ensure that the user is aware of a possible mistake.
</li>
<li>If key cannot be set by PSTool, for reasons of Access, Security or Length, the user will be notified.
</li>
<li>PSTool will generate comments describing the contents of each line. These may include the key's name, or an enumeration of a value, e.g. a human-readable baud rate is included with the clock divider.
</li>
<li>DFU will panic if the key is too long, but will silently ignore the key if protected and not signed.
</li>
<li>Otherwise, Lines can be of any length, though be aware that the chip's persistent store has it's own limitations.
</li>
<li>A variation on the file format can be used to construct a <em>query file</em> listing the keys to be dumped.
The same rules as above apply, with lines looking like:
<PRE>
?1234= <I>// Dump this key always.</I>
?1234~ 5678 9abc <I>// Dump iff key differs from the data specified.</I>
</PRE>
</li>
<li>Special keys can be included:
<PRE>
<I>// Reset keys to factory defaults</I>
&F000-
<I>// Signature for the persistent store area (64 words)</I>
&F001=0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF
</PRE>
</li>
<li>All unrecognised lines will, if possible, be preserved by tools that parse the file and write out a modified version.
</BODY>
</HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -