gnuk/ChibiOS_2.0.6/docs/html/article_integrationguide.html
2010-11-22 14:53:37 +09:00

95 lines
5.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChibiOS/RT: Integration Guide</title>
<link href="custom.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<table style="text-align: center; width: 100%;" border="0"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 80px;"><img alt="ChibiOS/RT Logo" src="logo_small.png"></td>
<td><big><big>ChibiOS/RT</big></big><br><br>Architecture - Reference Manual - Guides</td>
<td style="width: 80px;"></td>
</tr>
</tbody>
</table>
<hr size="1">
<!-- Generated by Doxygen 1.7.1 -->
<div class="navigation" id="top">
<div class="tabs">
<ul class="tablist">
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="navpath">
<ul>
<li><a class="el" href="main.html">ChibiOS/RT</a> </li>
<li><a class="el" href="articles.html">Articles and Code Samples</a> </li>
<li><a class="el" href="page_kb.html">Knowledge Base</a> </li>
</ul>
</div>
</div>
<div class="header">
<div class="headertitle">
<h1>Integration Guide </h1> </div>
</div>
<div class="contents">
<p>All the delivered ChibiOS/RT demos are stand alone applications so if you just start your application from an existing demo there isn't any integration effort, you are simply using the existing makefiles, the default startup files etc, minimal effort.<br/>
The matter is very different if you are going to integrate the OS into a different runtime framework or if you want to use a different build system, in that case you have the problem to integrate the OS source code into your application.</p>
<h2>What this guide does not cover</h2>
<p>This guide has a limited scope, the following topics are handled elsewhere:</p>
<ul>
<li>Porting the OS to different architectures or different compilers is not covered in this guide, see <a class="el" href="article_portguide.html">Porting ChibiOS/RT for Dummies</a> instead.</li>
<li>This guide does not describe any specific environment or development tool, it is assumed you already know in detail the environment you want to work with.</li>
</ul>
<h2>Article Index</h2>
<ul>
<li><a class="el" href="article_integrationguide.html#integrationguide_kernel">Integrating the Kernel</a></li>
<li><a class="el" href="article_integrationguide.html#integrationguide_hal">Integrating the HAL</a></li>
</ul>
<h2><a class="anchor" id="integrationguide_kernel"></a>
Integrating the Kernel</h2>
<p>This section covers the scenario where you want to use the ChibiOS/RT kernel into an existing application. In order to accomplish this you need to import in your project two components:</p>
<ul>
<li>The portable kernel.</li>
<li>The port layer for your microcontroller.</li>
</ul>
<p>See the <a class="el" href="architecture.html">Architecture</a> for more details. You need to add the following files to your build process:</p>
<ul>
<li>All the source files contained under <code>./os/kernel/src</code>, note that you should add all of them even if you don't plan to use some of the subsystems. Unused subsystems can be excluded from the kernel configuration file <code><a class="el" href="chconf_8h.html" title="Configuration file template.">chconf.h</a></code>.</li>
<li>All the source files contained under <code>./os/ports/<em>&lt;compiler&gt;</em>/<em>&lt;architecture&gt;</em></code>. Note that those could be both C source files and assembler source files and that some architectures have an extra directories layer containing files required for a specific platform.</li>
</ul>
<p>You also need to add to the compiler options the following paths for searching header files:</p>
<ul>
<li>The portable kernel headers <code>./os/kernel/include</code>.</li>
<li>The port layer headers <code>./os/ports/<em>&lt;compiler&gt;</em>/<em>&lt;architecture&gt;</em></code>.</li>
</ul>
<h2><a class="anchor" id="integrationguide_hal"></a>
Integrating the HAL</h2>
<p>If, in addition to the kernel as described in the previous section, you also need to integrate the HAL into your application you also need to import the following components:</p>
<ul>
<li>HAL portable files.</li>
<li>Platform specific files.</li>
</ul>
<p>See the <a class="el" href="architecture.html">Architecture</a> for more details. You need to add the following files to your build process:</p>
<ul>
<li>All the source files contained under <code>./os/hal/src</code>, note that you should add all of them even if you don't plan to use some of the subsystems. Unused drivers can be excluded from the HAL configuration file <code><a class="el" href="halconf_8h.html" title="HAL configuration header.">halconf.h</a></code>.</li>
<li>All the source files contained under <code>./os/hal/platforms/<em>&lt;platform&gt;</em></code>.</li>
<li>All the source files contained under <code>./boards/<em>&lt;board_model&gt;</em></code>.</li>
</ul>
<p>You also need to add to the compiler options the following paths for searching header files:</p>
<ul>
<li>The portable HAL headers <code>./os/hal/include</code>.</li>
<li>The platform layer headers <code>./os/hal/platforms/<em>&lt;platform&gt;</em></code>.</li>
<li>The board description headers <code>./boards/<em>&lt;board_model&gt;</em></code>.</li>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Sun Oct 24 2010 09:40:45 for ChibiOS/RT by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.7.1</small></address>
</body>
</html>