index.html
来自「scmRTOS is real-time preemptive operatin」· HTML 代码 · 共 329 行 · 第 1/2 页
HTML
329 行
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">where <tt class="docutils literal"><span class="pre">$TOOLKIT_PATH$</span></tt> - path to folder with toolkit installed.</p>
</div>
</div>
</div>
<hr class="docutils" />
<div class="section">
<h1><a class="toc-backref" href="#id12" id="utilities" name="utilities">Utilities</a></h1>
<p>Additionally, folder Config contains some useful script utilities that user may
take into account. All utilities are <a class="reference" href="http://www.python.org">Python</a> scripts. This means that <a class="reference" href="http://www.python.org">Python</a>
interpreter must be installed to use the utilities. The utilities are:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">vdsp_lst.py</span></tt></li>
<li><tt class="docutils literal"><span class="pre">get_info.py</span></tt></li>
<li><tt class="docutils literal"><span class="pre">ldprg.py</span></tt></li>
<li><tt class="docutils literal"><span class="pre">utils.py</span></tt></li>
</ul>
<div class="section">
<h2><a class="toc-backref" href="#id13" id="vdsp-lst-py" name="vdsp-lst-py">vdsp_lst.py</a></h2>
<p>Some compilers produces auxiliary list files, in which source code interleaved
with assembler mnemonics. This is convenient thing to inspect codegeneration.
Unfortunately, <tt class="docutils literal"><span class="pre">VisualDSP++</span></tt> Blackfin compiler does not generate such listing
file. As maximum, the compiler can generate auxiliary assembler file that
contains assembler code with text links to source code, for example:</p>
<pre class="literal-block">
.LN17:
// "Src\main.cpp" line 125 col 5
P0.L = 1544;
P0.H = -64;
R0 = 10011 (X);
[P0+ 0] = R0;
.LN18:
// "Src\main.cpp" line 126 col 5
P1.L = 1548;
P1.H = -64;
R0 = 5000 (X);
[P1+ 0] = R0;
</pre>
<p><strong>vdsp_lst.py</strong> just performs source code insertion on base of links, so the above
example looks like the following:</p>
<pre class="literal-block">
.LN17:
MMR32(TIMER0_PERIOD) = 10011; // "Src\main.cpp" line 125 col 5
P0.L = 1544;
P0.H = -64;
R0 = 10011 (X);
[P0+ 0] = R0;
.LN18:
MMR32(TIMER0_WIDTH) = 5000; // "Src\main.cpp" line 126 col 5
P1.L = 1548;
P1.H = -64;
R0 = 5000 (X);
[P1+ 0] = R0;
</pre>
<p>The using of <strong>vdsp_lst.py</strong> is very simple: just launch the utility with one
argument - compiler generated .s file (to enable generating of .s files command
line option <tt class="docutils literal"><span class="pre">-save-temps</span></tt> must be specified).</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id14" id="get-info-py" name="get-info-py">get_info.py</a></h2>
<p><tt class="docutils literal"><span class="pre">VisualDSP++</span></tt> linker does not issue any explicit info about code and data sizes of
linked project. To get this info the user has to launch elfdump.exe utility from
<tt class="docutils literal"><span class="pre">VisualDSP++</span></tt> toolkit. Unfortunately, elfdump outputs information in uncomfortable
format (a lot of service info, hexadecimal representation of sizes, etc.). To
fix this inconvenience get_info.py can be used. The utility gets output from
elfdump and produces info in human-readable format. See the example below:</p>
<pre class="literal-block">
Total : Code: 2394 bytes
Data: 3436 bytes (Segment A: 3416 bytes. Segment B: 20 bytes.)
----------------------------------
Details | Section | Size
----------------------------------
| code | 2394 bytes
| data_a | 228 bytes
| data_b | 20 bytes
| bsz_data_a | 3188 bytes
| bsz_data_b | 0 bytes
----------------------------------
</pre>
<p><strong>get_info.py</strong> is used in the following manner:</p>
<p><tt class="docutils literal"><span class="pre">get_info.py</span> <span class="pre">dump.txt</span></tt></p>
<p>where <tt class="docutils literal"><span class="pre">dump.txt</span></tt> - text file with dump from <tt class="docutils literal"><span class="pre">elfdump.exe</span></tt>. <tt class="docutils literal"><span class="pre">dump.txt</span></tt> can be
created by simple redirect elfdump output to file.</p>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id15" id="ldprg-py" name="ldprg-py">ldprg.py</a></h2>
<p><strong>ldprg.py</strong> is a custom user loader. This utility allows to customize loading
process by launch service executable (.dxe) before loading of main executable.
This can be useful, for example, in case when the user's program stores data
objects in SDRAM - these objects must be initialized (according to C/C++
Standard) and initializing is performed during loading the user's program.
So, if at this moment processor's SDRAM controller is not properly set up the
initializing process will fail and processor will not start properly.</p>
<p>Custom loader fixes this situation. The loader allows to run a special service
executable before loading main user's executable. This service executable
performs SDRAM controller setup (and other actions if need).</p>
<p>The using of custom user loader is the following:</p>
<pre class="literal-block">
ldprg.py -p <ProcessorName> -i <Initializer FileName> -e <Executable FileName> -s <Session Name>
where
<ProcessorName> is name of the used processor. Available Processors are: ADSP-BF531, ADSP-BF532, ADSP-BF533
<Initializer FileName> is name of service executable (.dxe file)
<Executable FileName> is name of main executable (.dxe file)
<Session Name> is name of debug session. Only emulator sessions are suitable.
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id16" id="utils-py" name="utils-py">utils.py</a></h2>
<p><tt class="docutils literal"><span class="pre">VisualDSP++</span></tt> compiler performs error message line wrapping, so error message
often occupies several (two or more) lines. Some powerful 3rd party programmer's
editors uses status line to show error message text when error locator opens
source file with error. At that moment the only first line of error message is
displayed in status line. This is very inconvenient.</p>
<p><strong>utils.py</strong> contains function <tt class="docutils literal"><span class="pre">handle_err()</span></tt> that performs error message
unwrapping. The using of the function is very simple:</p>
<pre class="literal-block">
oerr = utils.handle_err(out)
where out - compiler's stderr stream,
oerr - the same stream with error/warning lines unwrapped.
</pre>
<p>This function cannot be used standalone - it can be used only inside Python script.</p>
<hr class="docutils" />
<div class="note">
<p class="first admonition-title">Note</p>
<p class="last">When using <a class="reference" href="http://www.scons.org">Scons</a> to build the project the above utilities (except <tt class="docutils literal"><span class="pre">ldprg.py</span></tt>)
are run automatically.</p>
</div>
<hr class="docutils" />
<table class="docutils footnote" frame="void" id="id5" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2" name="id5">[1]</a></td><td>SConstruct file contains variable <tt class="docutils literal"><span class="pre">TOOLKIT_PATH</span></tt> that specifies path to toolkit on particular PC.
The user should correct this path according to his PC toolkit location. The path can be specified
directly or through system environment variables as well.</td></tr>
</tbody>
</table>
<table class="docutils footnote" frame="void" id="id6" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id3" name="id6">[2]</a></td><td>For example, make or simple bat file.</td></tr>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr></table>
</td></tr>
<tr><td valign="bottom">
<table border="0" cellspacing="0" cellpadding="6" width="100%">
<tr id="footer">
<td><a href="http://sourceforge.net"><img src="http://sflogo.sourceforge.net/sflogo.php?group_id=181958&type=3" width="125" height="37" border="0" alt="SourceForge.net Logo" /></a></td>
<td align="right">Copyright 漏 scmRTOS Team 2006-2008</td>
</tr></table>
</td></tr>
</table>
</body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?