Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Edit & regen documentation
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:323b890d248ff36dfd80212b7a523ace96bf8964
User & Date: erikj 2018-07-25 20:20:08
Context
2018-07-25
20:20
Edit & regen documentation Leaf check-in: 323b890d24 user: erikj tags: trunk
2017-12-07
01:16
Regen documentation. check-in: 094858366a user: erikj tags: trunk
Changes

Changes to binconvert.tcl.

1
2
3
4
5
6
7
8
9
10
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#--------------------------------------------------------------------------
#
# Copyright 2017, Erik N. Johnson
#
###########################################################################
#
# FILENAME:    binconvert.tcl
#
# AUTHOR:      erik.johnson@jogle.us
#
................................................................................
# (returns *segmentList*)
#   * binconvert [writefile](binconvert.html#writefile) <i>format segmentList
# fileName</i>
#  * binconvert [addparser](binconvert.html#addparser) <i>fmtId lineParserName
# outputWriterName</i>
#  * binconvert loglevel *newLogLevel*
#
# For Ihex and Srec files, *writeFile* detects the address space needed
# by the Segment List and will automatically select the appropriate subformat
# for the actual data.
# In case the user wants to force their output into a particular subformat
# (e.g., write a file in I16hex format that could have fit in I8hex format),
# the individual subformats are also exposed, e.g.:
#
#       binconvert writeFile i8hex $segmentList $fileName
#       binconvert writeFile s27 $segmentList $fileName
#
# Additionally, there is a hook for new user-supplied formats.  The user
# must supply two procs: a line parser, and a output format writer.  The
# interfaces are described below.  Once those are defined, the user calls
# *addparser* as above, and the format called *fmtId* will be added to the
# list of available formats, and can be called in exactly the same way as
# the package-supplied formats.  The perceptive reader will see that this
# interface is actually used to provision the package-supplied formats.
#
# The loglevel command just exports the logger::setlevel command so the user
# can adjust the level of logging done by the package.  For details and the
# list of valid levels, see the normal
# [Tcl package documentation](https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/log/logger.html).

namespace eval ::binconvert {
    namespace export readfile
    namespace export writefile
    namespace export addparser
    namespace export loglevel
    namespace ensemble create
................................................................................
    # + DATA *lineAddress* *dataList*
    # + SEGADDR *segAddressOffset*
    # + HEADER *headerData*
    # + NOP {}
    # + STARTADDR *executionStartAddress* *optionalProcessorType*
    # + EOF {}
    #
    # The *readFile* level manages the segment list structure based on those
    # tags.  Format-specific consistency checks are handled in the parsers.
    foreach line $dataL {
        set lineL [{*}$parser $line]
        switch -- [lindex $lineL 0] {
            default {
                # Unknown line types are warned about, but we continue and
                # allow the user to decide what to do about the issue.


|







 







|






|
|

|
|
|
|
|
|
|




|







 







|







1
2
3
4
5
6
7
8
9
10
..
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
...
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#--------------------------------------------------------------------------
#
# Copyright 2017-18, Erik N. Johnson
#
###########################################################################
#
# FILENAME:    binconvert.tcl
#
# AUTHOR:      erik.johnson@jogle.us
#
................................................................................
# (returns *segmentList*)
#   * binconvert [writefile](binconvert.html#writefile) <i>format segmentList
# fileName</i>
#  * binconvert [addparser](binconvert.html#addparser) <i>fmtId lineParserName
# outputWriterName</i>
#  * binconvert loglevel *newLogLevel*
#
# For Ihex and Srec files, *writefile* detects the address space needed
# by the Segment List and will automatically select the appropriate subformat
# for the actual data.
# In case the user wants to force their output into a particular subformat
# (e.g., write a file in I16hex format that could have fit in I8hex format),
# the individual subformats are also exposed, e.g.:
#
#       binconvert writefile i8hex $segmentList $fileName
#       binconvert writefile s27 $segmentList $fileName
#
# Additionally, there is a hook for new user-supplied formats.  The user must
# supply two procs: a line parser, and a output format writer.  The interfaces
# are described [below](binconvert.html#addparser).  Once those are defined,
# the user calls *addparser* as above, and the format called *fmtId* will be
# added to the list of available formats, and can be called in exactly the same
# way as the package-supplied formats.  The perceptive reader will see that
# this interface is actually used to provision the package-supplied formats.
#
# The loglevel command just exports the logger::setlevel command so the user
# can adjust the level of logging done by the package.  For details and the
# list of valid levels, see the normal
# [Tcl logger package documentation](https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/log/logger.html).

namespace eval ::binconvert {
    namespace export readfile
    namespace export writefile
    namespace export addparser
    namespace export loglevel
    namespace ensemble create
................................................................................
    # + DATA *lineAddress* *dataList*
    # + SEGADDR *segAddressOffset*
    # + HEADER *headerData*
    # + NOP {}
    # + STARTADDR *executionStartAddress* *optionalProcessorType*
    # + EOF {}
    #
    # The *readfile* level manages the segment list structure based on those
    # tags.  Format-specific consistency checks are handled in the parsers.
    foreach line $dataL {
        set lineL [{*}$parser $line]
        switch -- [lindex $lineL 0] {
            default {
                # Unknown line types are warned about, but we continue and
                # allow the user to decide what to do about the issue.

Changes to docs/binconvert.html.

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
  <div class='clearall'>
  <div class='section' id='section-0'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-0'>#</a>
      </div>
      <hr />
<p>Copyright 2017, Erik N. Johnson</p>
<h6></h6>
<p>FILENAME:    binconvert.tcl</p>
<p>AUTHOR:      erik.johnson@jogle.us</p>
<p>DESCRIPTION:
 binconvert is a package that reads &amp; writes EEPROM memory files in
 multiple formats.  It converts the data to &amp; from a Tcl representation
 as a list of data segments, which is available for processing.</p>
................................................................................
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span class="nb">package</span> require Tcl <span class="mf">8.6</span>
<span class="nb">package</span> require logger</pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
................................................................................
(returns <em>segmentList</em>)</li>
<li>binconvert <a href="binconvert.html#writefile">writefile</a> <i>format segmentList
fileName</i></li>
<li>binconvert <a href="binconvert.html#addparser">addparser</a> <i>fmtId lineParserName
outputWriterName</i></li>
<li>binconvert loglevel <em>newLogLevel</em></li>
</ul>
<p>For Ihex and Srec files, <em>writeFile</em> detects the address space needed
by the Segment List and will automatically select the appropriate subformat
for the actual data.
In case the user wants to force their output into a particular subformat
(e.g., write a file in I16hex format that could have fit in I8hex format),
the individual subformats are also exposed, e.g.:</p>
<pre><code>  binconvert writeFile i8hex $segmentList $fileName
  binconvert writeFile s27 $segmentList $fileName
</code></pre>
<p>Additionally, there is a hook for new user-supplied formats.  The user
must supply two procs: a line parser, and a output format writer.  The
interfaces are described below.  Once those are defined, the user calls
<em>addparser</em> as above, and the format called <em>fmtId</em> will be added to the
list of available formats, and can be called in exactly the same way as
the package-supplied formats.  The perceptive reader will see that this
interface is actually used to provision the package-supplied formats.</p>
<p>The loglevel command just exports the logger::setlevel command so the user
can adjust the level of logging done by the package.  For details and the
list of valid levels, see the normal
<a href="https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/log/logger.html">Tcl package documentation</a>.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span class="k">namespace</span> eval <span class="o">::</span>binconvert <span class="k">{</span>
    <span class="k">namespace</span> export readfile
    <span class="k">namespace</span> export writefile
    <span class="k">namespace</span> export addparser
    <span class="k">namespace</span> export loglevel
................................................................................
<li>DATA <em>lineAddress</em> <em>dataList</em></li>
<li>SEGADDR <em>segAddressOffset</em></li>
<li>HEADER <em>headerData</em></li>
<li>NOP {}</li>
<li>STARTADDR <em>executionStartAddress</em> <em>optionalProcessorType</em></li>
<li>EOF {}</li>
</ul>
<p>The <em>readFile</em> level manages the segment list structure based on those
tags.  Format-specific consistency checks are handled in the parsers.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">foreach</span> line <span class="nv">$dataL</span> <span class="k">{</span>
        <span class="k">set</span> lineL <span class="k">[{</span><span class="o">*</span><span class="k">}</span><span class="nv">$parser</span> <span class="nv">$line</span><span class="k">]</span>
        <span class="k">switch</span> <span class="o">--</span> <span class="k">[</span><span class="nb">lindex</span> <span class="nv">$lineL</span> <span class="mi">0</span><span class="k">]</span> <span class="k">{</span>
            <span class="nv">default</span> <span class="k">{</span></pre></div>







|







 







|







 







|





|
|

|
|
|
|
|
|
|



|







 







|







14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
..
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
...
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
  <div class='clearall'>
  <div class='section' id='section-0'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-0'>#</a>
      </div>
      <hr />
<p>Copyright 2017-18, Erik N. Johnson</p>
<h6></h6>
<p>FILENAME:    binconvert.tcl</p>
<p>AUTHOR:      erik.johnson@jogle.us</p>
<p>DESCRIPTION:
 binconvert is a package that reads &amp; writes EEPROM memory files in
 multiple formats.  It converts the data to &amp; from a Tcl representation
 as a list of data segments, which is available for processing.</p>
................................................................................
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span></span><span class="nb">package</span> require Tcl <span class="mf">8.6</span>
<span class="nb">package</span> require logger</pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
................................................................................
(returns <em>segmentList</em>)</li>
<li>binconvert <a href="binconvert.html#writefile">writefile</a> <i>format segmentList
fileName</i></li>
<li>binconvert <a href="binconvert.html#addparser">addparser</a> <i>fmtId lineParserName
outputWriterName</i></li>
<li>binconvert loglevel <em>newLogLevel</em></li>
</ul>
<p>For Ihex and Srec files, <em>writefile</em> detects the address space needed
by the Segment List and will automatically select the appropriate subformat
for the actual data.
In case the user wants to force their output into a particular subformat
(e.g., write a file in I16hex format that could have fit in I8hex format),
the individual subformats are also exposed, e.g.:</p>
<pre><code>  binconvert writefile i8hex $segmentList $fileName
  binconvert writefile s27 $segmentList $fileName
</code></pre>
<p>Additionally, there is a hook for new user-supplied formats.  The user must
supply two procs: a line parser, and a output format writer.  The interfaces
are described <a href="binconvert.html#addparser">below</a>.  Once those are defined,
the user calls <em>addparser</em> as above, and the format called <em>fmtId</em> will be
added to the list of available formats, and can be called in exactly the same
way as the package-supplied formats.  The perceptive reader will see that
this interface is actually used to provision the package-supplied formats.</p>
<p>The loglevel command just exports the logger::setlevel command so the user
can adjust the level of logging done by the package.  For details and the
list of valid levels, see the normal
<a href="https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/log/logger.html">Tcl logger package documentation</a>.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span class="k">namespace</span> eval <span class="o">::</span>binconvert <span class="k">{</span>
    <span class="k">namespace</span> export readfile
    <span class="k">namespace</span> export writefile
    <span class="k">namespace</span> export addparser
    <span class="k">namespace</span> export loglevel
................................................................................
<li>DATA <em>lineAddress</em> <em>dataList</em></li>
<li>SEGADDR <em>segAddressOffset</em></li>
<li>HEADER <em>headerData</em></li>
<li>NOP {}</li>
<li>STARTADDR <em>executionStartAddress</em> <em>optionalProcessorType</em></li>
<li>EOF {}</li>
</ul>
<p>The <em>readfile</em> level manages the segment list structure based on those
tags.  Format-specific consistency checks are handled in the parsers.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">foreach</span> line <span class="nv">$dataL</span> <span class="k">{</span>
        <span class="k">set</span> lineL <span class="k">[{</span><span class="o">*</span><span class="k">}</span><span class="nv">$parser</span> <span class="nv">$line</span><span class="k">]</span>
        <span class="k">switch</span> <span class="o">--</span> <span class="k">[</span><span class="nb">lindex</span> <span class="nv">$lineL</span> <span class="mi">0</span><span class="k">]</span> <span class="k">{</span>
            <span class="nv">default</span> <span class="k">{</span></pre></div>

Changes to docs/ihex.html.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span></span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>

Changes to docs/rawbin.html.

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  will fill in undefined data with bytes of 0xFF or as the user sets.</p>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>







|







34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  will fill in undefined data with bytes of 0xFF or as the user sets.</p>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span></span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>

Changes to docs/srec.html.

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
</ul>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span></span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>

Changes to docs/titxt.html.

31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  Code Composer tools and used by TI's MSP430 programmer.</p>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>







|







31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  Code Composer tools and used by TI's MSP430 programmer.</p>
<h6></h6>
<p>This package documentation is auto-generated with
Pycco: <a href="https://pycco-docs.github.io/pycco/">https://pycco-docs.github.io/pycco/</a></p>
<p>Use "pycco <em>filename</em>" to re-generate HTML documentation in ./docs .</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre><span></span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-1'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-1'>#</a>