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

Overview
Comment:Regen documentation.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:094858366ab93f59f3e10d9154e0f1386745be8d
User & Date: erikj 2017-12-07 01:16:16
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
01:15
Titxt writer ignores HEADER & STARTADDR segments, updates comments; rawbin writer clarified that startAddr changes the address the binary block starts at, subtracting that from all segment addresses. check-in: e09058b487 user: erikj tags: trunk
Changes

Changes to docs/rawbin.html.

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
137

138
139
140
141
142
143
144
145
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-5'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-5'>#</a>
      </div>
      <p>Scan the list for the end address.</p>



    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">set</span> maxAddr <span class="mi">0</span>
    <span class="k">foreach</span> <span class="k">{</span><span class="nv">addr</span> dataL<span class="k">}</span> <span class="nv">$segmentList</span> <span class="k">{</span>






        <span class="k">if</span> <span class="k">{</span><span class="nv">$maxAddr</span> <span class="o">&lt;</span> <span class="k">(</span><span class="nv">$addr</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">])}</span> <span class="k">{</span>
            <span class="k">set</span> maxAddr <span class="k">[expr</span> <span class="k">{</span><span class="nv">$addr</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">]}]</span>
        <span class="k">}</span>
    <span class="k">}</span>
    <span class="k">set</span> outL <span class="k">[</span><span class="nb">lrepeat</span> <span class="nv">$fillValue</span><span class="k">]</span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-6'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-6'>#</a>
      </div>
      <p>We have our filled output list.  For each segment, replace the data
in the appropriate range with the segment data.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">foreach</span> <span class="k">{</span><span class="nv">addr</span> dataL<span class="k">}</span> <span class="nv">$segmentList</span> <span class="k">{</span>

        <span class="k">set</span> outL <span class="k">[</span><span class="nb">lreplace</span> <span class="nv">$outL</span> <span class="nv">$addr</span> <span class="k">[expr</span> <span class="k">{</span><span class="nv">$addr</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">]}]</span> <span class="k">{</span><span class="o">*</span><span class="k">}</span><span class="nv">$dataL</span><span class="k">]</span><span class="err">]</span>
    <span class="k">}</span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-7'>
    <div class='docs'>
      <div class='octowrap'>







|
>
>
>




>
>
>
>
>
>




|













>
|







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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-5'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-5'>#</a>
      </div>
      <p>Scan the list for the end address.  Use that to create a list of byte
values covering all segments, filled with a value (nominally 0xFF).
The list starts at the input startAddr, and segments are expected to
be placed within it.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">set</span> maxAddr <span class="mi">0</span>
    <span class="k">foreach</span> <span class="k">{</span><span class="nv">addr</span> dataL<span class="k">}</span> <span class="nv">$segmentList</span> <span class="k">{</span>
        <span class="k">if</span> <span class="k">{</span><span class="nv">$addr</span> <span class="o">&lt;</span> <span class="nv">$startAddr</span><span class="k">}</span> <span class="k">{</span>
            <span class="k">set</span> errMsg <span class="s2">&quot;Invalid start address: segment starts at $addr,\</span>
<span class="s2">                        output file defined to start at $startAddr&quot;</span>
            <span class="nv">log</span><span class="o">::</span>error <span class="nv">$errMsg</span>
            <span class="k">error</span> <span class="nv">$errMsg</span>
        <span class="k">}</span>
        <span class="k">if</span> <span class="k">{</span><span class="nv">$maxAddr</span> <span class="o">&lt;</span> <span class="k">(</span><span class="nv">$addr</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">])}</span> <span class="k">{</span>
            <span class="k">set</span> maxAddr <span class="k">[expr</span> <span class="k">{</span><span class="nv">$addr</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">]}]</span>
        <span class="k">}</span>
    <span class="k">}</span>
    <span class="k">set</span> outL <span class="k">[</span><span class="nb">lrepeat</span> <span class="k">[expr</span> <span class="k">{</span><span class="nv">$maxAddr</span> <span class="nv">-</span> <span class="nv">$startAddr</span><span class="k">}]</span> <span class="nv">$fillValue</span><span class="k">]</span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-6'>
    <div class='docs'>
      <div class='octowrap'>
        <a class='octothorpe' href='#section-6'>#</a>
      </div>
      <p>We have our filled output list.  For each segment, replace the data
in the appropriate range with the segment data.</p>
    </div>
    <div class='code'>
      <div class="highlight"><pre>    <span class="k">foreach</span> <span class="k">{</span><span class="nv">addr</span> dataL<span class="k">}</span> <span class="nv">$segmentList</span> <span class="k">{</span>
        <span class="k">set</span> offset <span class="k">[expr</span> <span class="k">{</span><span class="nv">$addr</span> <span class="nv">-</span> <span class="nv">$startAddr</span><span class="k">}]</span>
        <span class="k">set</span> outL <span class="k">[</span><span class="nb">lreplace</span> <span class="nv">$outL</span> <span class="nv">$offset</span> <span class="k">[expr</span> <span class="k">{</span><span class="nv">$offset</span> <span class="o">+</span> <span class="k">[</span><span class="nb">llength</span> <span class="nv">$dataL</span><span class="k">]</span> <span class="nv">-</span> <span class="mi">1</span><span class="k">}]</span> <span class="k">{</span><span class="o">*</span><span class="k">}</span><span class="nv">$dataL</span><span class="k">]</span><span class="err">]</span>
    <span class="k">}</span></pre></div>
    </div>
  </div>
  <div class='clearall'></div>
  <div class='section' id='section-7'>
    <div class='docs'>
      <div class='octowrap'>