⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.html

📁 scmRTOS is real-time preemptive operating system and supports up to 31 user processes (and one syste
💻 HTML
字号:
<html><head>
<META NAME="ROBOTS" CONTENT="INDEX,FOLLOW">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>scmRTOS - Tools</title>
<link rel="icon" href="../favicon.ico" type="ico">
<link rel="stylesheet" type="text/css" href="../description.css" media="all" 
title="Burly Wood Style">
</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" 
leftmargin="0" rightmargin="0">

<table border="0" width="100%" height="100%" cellpadding="0" cellspacing="0">

<tr id="banner" valign="top" height="75px"><td>
    <table border="0" cellpadding="0" cellspacing="0"><tr>
        <td height="72" width="60"><img src="../scmrtos.png" hspace="4"></td>
        <td><h11><nobr>Single-Chip Microcontroller</nobr></h11><br>
        <div id="subtitle"><nobr>Real-Time Operating System</nobr></div></td>
    </tr></table>
</td></tr>

<tr><td valign="top">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr valign="top">
        <td class="menu2"><table align="left" border="0" cellpadding="4" cellspacing="8" class="gridmenu" width="100%">
<colgroup>
<col width="100%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">scmRTOS</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference" href="../description.html">Description</a></td>
</tr>
<tr><td><a class="reference" href="../events.html">Events</a></td>
</tr>
<tr><td><a class="reference" href="../license.html">License</a></td>
</tr>
<tr><td><a class="reference" href="../doc/index.html">Documentation</a></td>
</tr>
<tr><td><a class="reference" href="../ports/index.html">Ports</a></td>
</tr>
<tr><td><a class="reference" href="../releases/index.html">Releases</a></td>
</tr>
<tr><td>Tools</td>
</tr>
<tr><td><a class="reference" href="../releases/WhatsNew.html">What's New</a></td>
</tr>
<tr><td><a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=181958">Download</a></td>
</tr>
<tr><td><a class="reference" href="../sf/index.html">SourceForge</a></td>
</tr>
<tr><td><a class="reference" href="../contact.html">Contacts</a></td>
</tr>
<tr><td><a class="reference" href="../map.html">Site map</a></td>
</tr>
</tbody>
</table></td>
        <td id="main">
        <div id="breadcrumbs"><a href="../index.html">Main page</a>&nbsp;> Tools</div>
        <div id="text">
        <h1>scmRTOS Integrity Checker</h1><div class="section">
<h1><a id="abstract" name="abstract">Abstract</a></h1>
<p>The key features of the scmRTOS are max speed and min code/RAM size requirements.
To achieve these purposes the OS code has been written almost without runtime checks.
Nevertheless, all OS parts are safe enough for the using. This became possible thanks
to C++ programming language and its static strong typing. Unfortunately, programming language
(and language tools such as compiler, linker) cannot control OS integrity over separate
compilation! Therefore, processes types definition, processes declaration and process count have
to be checked manually (by user). But everyone knows that the user (a human) can be a forgetful,
careless, etc. or be abstracted on his project and, thus, can make mistake. In any case,
OS configuration and integrity checking is the job for appropriate tool.</p>
<p>Integrity Checker utility is intended to free user from tedious and stupid job and, also, to improve checking quality.</p>
</div>
<div class="section">
<h1><a id="description" name="description">DESCRIPTION</a></h1>
<p>Integrity Checker utility scans the project source directory (directories), reads and analyzes .h, .c
and .cpp files. The utility carries out the following checks:</p>
<ul class="simple">
<li>Process count specified with macro <tt class="docutils literal"><span class="pre">scmRTOS_PROCESS_COUNT</span></tt> must agree with number
of processes declared in the project.</li>
<li>Process priorities must constitute unbroken sequence without &quot;holes&quot; and duplicates
and the sequence must begin from <tt class="docutils literal"><span class="pre">pr0</span></tt>. For example, if we have declared 4 processes,
these processes must have the following priority values: <tt class="docutils literal"><span class="pre">pr0</span></tt>, <tt class="docutils literal"><span class="pre">pr1</span></tt>, <tt class="docutils literal"><span class="pre">pr2</span></tt>, <tt class="docutils literal"><span class="pre">pr3</span></tt>.</li>
<li>Two or more processes of the same type are not allowed. More than one process of the
same type is valid thing in respect to the programming language but this is invalid
for OS because each process must have its own process function. This process function
is declared as static class member function, therefore, in case of two (or more) objects (processes)
of the same type (class), these processes will share process function. In most cases this is error.</li>
</ul>
<p>If any of these checks not passed the tool issues the corresponding error.</p>
<p><strong>Note:</strong> Integrity Checker does NOT support preprocessor directives, so, for example, code:</p>
<pre class="literal-block">
#if 0
typedef OS::process&lt;OS::pr4, 768&gt; TCommandProc;
#endif
</pre>
<p>is not treated as comment. C/C++ comments are supported.</p>
</div>
<div class="section">
<h1><a id="usage" name="usage">USAGE</a></h1>
<p>The tool is used in the following manner:</p>
<div class="line-block">
<div class="line"><tt class="docutils literal"><span class="pre">scmIC</span> <span class="pre">[options]</span> <span class="pre">DirName1</span> <span class="pre">[DirName2</span> <span class="pre">...</span> <span class="pre">DirNameN]</span></tt></div>
</div>
<blockquote>
<p>Where:</p>
<pre class="literal-block">
scmIC is scmIC.py or scmIC.exe;

options are:

  -q - suppress output;
  -s - show summary;
  -r - recursive folder processing;


DirName1 [DirName2 ... DirNameN] - absolute or relative path of directory with project sources.
</pre>
</blockquote>
<p>To proper working of the checker, the project must meet the following requirements:</p>
<ul class="simple">
<li>All process types must be defined with help of <tt class="docutils literal"><span class="pre">typedef</span></tt>.</li>
<li>Process's root functions (Execs) must be qualified with macro <tt class="docutils literal"><span class="pre">OS_PROCESS</span></tt>.</li>
</ul>
<p>It's strongly recommended to launch the tool just after source files compiled and before (or after)
linking of the project. The main reason to use the integrity checker after compilation of sources
is that the checker does not perform full parsing of the source files (such as compiler does) and in
case of some syntax errors in the source files the checker can work incorrectly. To avoid this
the compiler should be launched before the checker. For example, assume we have project with 3 sources
located in directory %PROJECT%Src. We can build the project in the following way:</p>
<pre class="literal-block">
compiler_executable compiler_options %PROJECT%\Src\file1.cpp
compiler_executable compiler_options %PROJECT%\Src\file2.cpp
compiler_executable compiler_options %PROJECT%\Src\file3.cpp

scmIC %PROJECT%\Src

linker_executable linker_options file1.obj file2.obj file3.obj
</pre>
<p>When using of make utility for project building the integrity checker can be placed as the command
in explicit rule which performs project building before linking command, for example (GNU make):</p>
<pre class="literal-block">
$(target) : $(all_obj)
    &#64;scmIC.exe $(SRC_DIR)
    &#64;$(LINK) $(all_obj) $(LFLAGS)
</pre>
</div>
<div class="section">
<h1><a id="usage-variants" name="usage-variants">USAGE VARIANTS</a></h1>
<p>There are to variants of usage.</p>
<p>Primarily, scmRTOS Integrity Checker is Python script. So, to use script the user has to
install Python interpreter. Just launch <tt class="docutils literal"><span class="pre">scmIC.py</span></tt> as described above.</p>
<p>Since far not all users have Python interpreter installed and do not want to install it,
another way of usage is offered. In this case Python script is converted in executable <tt class="docutils literal"><span class="pre">scmIC.exe</span></tt>
and launched as usual exe file. This way requires Python runtime support - two files:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">library.zip</span></tt></li>
<li><tt class="docutils literal"><span class="pre">python24.dll</span></tt></li>
</ul>
<p>It's recommended to place all three files in location that is pointed by environment variable <tt class="docutils literal"><span class="pre">PATH</span></tt> -
this offers the simplest way of using.</p>
</div>
<div class="section">
<h1><a id="download" name="download">DOWNLOAD</a></h1>
<p>All files can be downloaded from <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=181958">Project Download Page</a>:</p>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">scmIC.py</span></tt> is placed in <tt class="docutils literal"><span class="pre">scmIC.py.zip</span></tt> archive.</li>
<li><tt class="docutils literal"><span class="pre">scmIC.exe</span></tt> is placed in <tt class="docutils literal"><span class="pre">scmIC.exe.zip</span></tt> archive.</li>
<li>And Python runtime files <tt class="docutils literal"><span class="pre">library.zip</span></tt>, <tt class="docutils literal"><span class="pre">python24.dll</span></tt> are placed in
<tt class="docutils literal"><span class="pre">python24_runtime.zip</span></tt> archive.</li>
</ul>
</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&amp;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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -