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

📄 aduc70xx.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 - ARM7/ADuC70xx Release</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">Releases</th>
</tr>
</thead>
<tbody valign="top">
<tr><td><a class="reference" href="../msp430/index.html">MSP430</a></td>
</tr>
<tr><td><a class="reference" href="../avr/index.html">AVR</a></td>
</tr>
<tr><td><a class="reference" href="../bf/index.html">Blackfin</a></td>
</tr>
<tr><td>ARM7</td>
</tr>
<tr><td><ul class="first last simple">
<li><a class="reference" href="lpc2xxx.html">LPC2xxxx</a></li>
</ul>
</td>
</tr>
<tr><td><ul class="first last simple">
<li><a class="reference" href="at91sam7.html">AT91SAM7</a></li>
</ul>
</td>
</tr>
<tr><td><ul class="first last simple">
<li><a class="reference" href="aduc70xx.html">ADuC70xx</a></li>
</ul>
</td>
</tr>
<tr><td><ul class="first last simple">
<li><a class="reference" href="str71x.html">STR71x</a></li>
</ul>
</td>
</tr>
<tr><td><a class="reference" href="../fr/index.html">FR</a></td>
</tr>
<tr><td />
</tr>
<tr><td><a class="reference" href="../../ports/index.html">Ports</a></td>
</tr>
</tbody>
</table></td>
        <td id="main">
        <div id="breadcrumbs"><a href="../../index.html">Main page</a>&nbsp;> <a href="../index.html">Releases</a>&nbsp;> <a href="./index.html">ARM7</a>&nbsp;> ADuC70xx</div>
        <div id="text">
        <h1>ARM7/ADuC70xx Release</h1><p><strong>IAR Embedded Workbench</strong></p>
<div class="contents topic">
<p class="topic-title first"><a id="table-of-contents" name="table-of-contents">Table of Contents</a></p>
<ul class="simple">
<li><a class="reference" href="#general" id="id4" name="id4">General</a></li>
<li><a class="reference" href="#context-switching" id="id5" name="id5">Context switching</a></li>
<li><a class="reference" href="#interrupts" id="id6" name="id6">Interrupts</a></li>
<li><a class="reference" href="#building" id="id7" name="id7">Building</a><ul>
<li><a class="reference" href="#assembler" id="id8" name="id8">Assembler:</a></li>
<li><a class="reference" href="#compiler" id="id9" name="id9">Compiler:</a></li>
<li><a class="reference" href="#linker" id="id10" name="id10">Linker:</a></li>
</ul>
</li>
<li><a class="reference" href="#addind-support-of-new-device" id="id11" name="id11">Addind support of new device</a></li>
</ul>
</div>
<hr class="docutils" />
<div class="section">
<h1><a class="toc-backref" href="#id4" id="general" name="general">General</a></h1>
<p>Release consists of the RTOS sources and three sample projects - see
<a class="reference" href="../index.html">Release description</a> for details. Each sample located in separate
folder. Structure of test project folder (folders are in brackets '[]'):</p>
<pre class="literal-block">
[Config]          - linker scripts and other utilities
[Exe]             - executable product[s]
[List]            - listings and other temporary text files
[Obj]             - objects and other intermediate files
[settings]        - IAR IDE auxiliary files
[Src]             - test project sources
slon.ewd          - IAR IDE auxiliary file
slon.ewp          - IAR IDE project
slon.eww          - IAR IDE workspace
</pre>
<p><strong>slon</strong> is test project name.</p>
<p>Structure of the RTOS folder:</p>
<pre class="literal-block">
scmRTOS
  Common            - common RTOS sources
  ARM7              - portable part
</pre>
<hr class="docutils" />
<p>See <a class="reference" href="../index.html#distribution">Distribution section</a> and below about release using manners.</p>
</div>
<hr class="docutils" />
<div class="section">
<h1><a class="toc-backref" href="#id5" id="context-switching" name="context-switching">Context switching</a></h1>
<p>Since noone interrupt can be raised <strong>and</strong> masked by software, the only available context switch scheme
is direct program control flow transfer.</p>
</div>
<div class="section">
<h1><a class="toc-backref" href="#id6" id="interrupts" name="interrupts">Interrupts</a></h1>
<p>Besause of absence of interrupt controller in ADuC family, IRQ exception handler is implemented as
call to project-level function <tt class="docutils literal"><span class="pre">IRQ_Switch()</span></tt>. Function must have &quot;C&quot; linkage and can be qualified
as <tt class="docutils literal"><span class="pre">__arm</span></tt> or <tt class="docutils literal"><span class="pre">__thumb</span></tt>. Function must analyze interrupt flags and masks and call appropriate
interrupt handlers. All interrupt handlers, which is uses OS services must be called from this function.
Function must call  OS::SystemTimer_ISR() handler in case it detects system timer interrupt. Function example:</p>
<pre class="literal-block">
extern &quot;C&quot; __arm void IRQ_Switch()
{
    dword irq = IRQSIG;
    irq &amp;= IRQSTA;
    if(irq &amp; GP_TIMER_BIT)
    {
        Timer_ISR();
    }
    if(irq &amp; RTOS_TIMER_BIT)
    {
        OS::SystemTimer_ISR();
    }
}
</pre>
<p>Interrupt handlers, which is not uses OS services can also be qualified in the same way as handlers with OS
services calls and, sequently, be called from IRQ_Switch() or can be programmed as FIQ and handled in ordinary way.</p>
</div>
<hr class="docutils" />
<div class="section">
<h1><a class="toc-backref" href="#id7" id="building" name="building">Building</a></h1>
<p>There is only one way provided to build any sample - <strong>IAR IDE</strong>.</p>
<p>Just launch IDE, open appropriate workspace (*.eww file), choose project target (RAM/Flash),
and build the project.
Default chip type, the sample project is targeted for is ADuC7020. To alter chip type, three
settings has to be changed:</p>
<ol class="arabic simple">
<li>Project-&gt;Options-&gt;General Options-&gt;Target-&gt;Device</li>
<li>Project-&gt;Options-&gt;C/C++ Compiler-&gt;Preprocessor-&gt;Defined symbols (consult device.h for appropriate value)</li>
<li>Project-&gt;Options-&gt;Assembler-&gt;Preprocessor-&gt;Defined symbols (consult device.h for appropriate value)</li>
</ol>
<p>If  user want to use his own build system <a class="footnote-reference" href="#id3" id="id2" name="id2">[1]</a> he has to specify the following
command-line options for various tools:</p>
<div class="section">
<h2><a class="toc-backref" href="#id8" id="assembler" name="assembler">Assembler:</a></h2>
<pre class="literal-block">
-DADuC7020   (or another suitable ADuC chip type, consult device.h)
--cpu ARM7TDMI
--fpu None
-r
-OObj
-LList
-ISrc
-I..\scmRTOS\Common
-I..\scmRTOS\ARM7
-I$TOOLKIT_PATH$\arm\INC
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id9" id="compiler" name="compiler">Compiler:</a></h2>
<pre class="literal-block">
-e
--eec++
-s9
-DADuC7020   (or another suitable ADuC chip type, consult device.h)
-lCN List
-o Obj
--debug
--cpu_mode thumb
--endian little
--cpu ARM7TDMI-S
--stack_align 4
--interwork
--fpu None
--dlib_config $TOOLKIT_PATH$\arm\LIB\dl4tptinl8n.h
-ISrc
-I$TOOLKIT_PATH$\arm\INC\
-I../scmRTOS/Common
-I../scmRTOS/ARM7
</pre>
</div>
<div class="section">
<h2><a class="toc-backref" href="#id10" id="linker" name="linker">Linker:</a></h2>
<pre class="literal-block">
-s __program_start
-r
-xmseo
dl4tptinl8n.r79
-o Exe\slon.d79
-l List\slon.map
-I $TOOLKIT_PATH$\arm\LIB
-f Config\ADuC70xx_FLASH.xcl (or -f Config\ADuC70xx_RAM.xcl)
-Osimple-code=Exe\slon.sim
</pre>
<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="#id11" id="addind-support-of-new-device" name="addind-support-of-new-device">Addind support of new device</a></h1>
<p>This release supports all ADuC70xx devices, supported by version 4.30 of IAR EWARM. If user
has modern version of compiler and wants to use other ADuC70xx family device, two files has to be
changed: <tt class="docutils literal"><span class="pre">device.h</span></tt> in Src folder and <tt class="docutils literal"><span class="pre">OS_Target_core.h</span></tt> in scmRTOS/ARM7 folder. Contence of those
files is simple enought.</p>
<hr class="docutils" />
<table class="docutils footnote" frame="void" id="id3" rules="none">
<colgroup><col class="label" /><col /></colgroup>
<tbody valign="top">
<tr><td class="label"><a class="fn-backref" href="#id2" name="id3">[1]</a></td><td>For example, make utility or simple bat file.</td></tr>
</tbody>
</table>
</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 + -