summaryrefslogtreecommitdiff
path: root/CMSIS/Documentation/RTX/html/_files.html
blob: 4f9dbc564d8996f24076c071078caaae4bf1c392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Directory Structure and File Overview</title>
<title>CMSIS-RTOS RTX: Directory Structure and File Overview</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="cmsis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="printComponentTabs.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="stylsheetf" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 46px;">
  <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">CMSIS-RTOS RTX
   &#160;<span id="projectnumber">Version 4.80</span>
   </div>
   <div id="projectbrief">CMSIS-RTOS RTX: Real-Time Operating System for Cortex-M processor-based devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<div id="CMSISnav" class="tabs1">
    <ul class="tablist">
      <script type="text/javascript">
		<!--
		writeComponentTabs.call(this);
		//-->
      </script>
	  </ul>
</div>
<!-- Generated by Doxygen 1.8.2 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li>
      <li><a href="modules.html"><span>Reference</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_files.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">Directory Structure and File Overview </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The following section provides an overview of the directory structure and the files that are relevant for the user's for CMSIS-RTOS RTX.</p>
<h1><a class="anchor" id="Folders"></a>
CMSIS-RTOS RTX Directory Structure</h1>
<p>The CMSIS-RTOS RTX is delivered in source code and several examples are provided.</p>
<table  class="cmtable" summary="CMSIS-RTOS RTX Library Files">
<tr>
<th>Directory </th><th>Content  </th></tr>
<tr>
<td>INC </td><td>The include files for CMSIS-RTOS RTX. <a class="el" href="cmsis__os_8h.html">cmsis_os.h</a> is the central include file for user applications.  </td></tr>
<tr>
<td>LIB </td><td>CMSIS-RTOS RTX library files for ARMCC, GCC, and IAR Compiler.  </td></tr>
<tr>
<td>SRC </td><td>Source code of CMSIS-RTOS RTX library along with project files for ARMCC, GCC, and IAR Compiler.  </td></tr>
<tr>
<td>Templates </td><td>CMSIS-RTOS RTX configuration file (<a class="el" href="_files.html#RTX_Conf_CM">RTX_Conf_CM.c</a>).  </td></tr>
<tr>
<td>UserCode Templates </td><td>Template files for creating application projects with CMSIS-RTOS RTX.  </td></tr>
</table>
<h1><a class="anchor" id="LibFiles"></a>
CMSIS-RTOS RTX Library Files</h1>
<p>The CMSIS-RTOS RTX Library is available pre-compiled for ARMCC, GCC, and IAR C/C++ Compilers and supports all Cortex-M processor variants in every configuration.</p>
<table  class="cmtable" summary="CMSIS-RTOS RTX Library Files">
<tr>
<th>Library File </th><th>Processor Configuration  </th></tr>
<tr>
<td>LIB\ARM\RTX_CM0.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M0 and M1, little-endian.  </td></tr>
<tr>
<td>LIB\ARM\RTX_CM0_B.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M0 and M1, big-endian.  </td></tr>
<tr>
<td>LIB\ARM\RTX_CM3.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M3, M4, and M7 without FPU, little-endian.  </td></tr>
<tr>
<td>LIB\ARM\RTX_CM3_B.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M3, M4, and M7 without FPU, big-endian.  </td></tr>
<tr>
<td>LIB\ARM\RTX_CM4.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M4 and M7 with FPU, little-endian.  </td></tr>
<tr>
<td>LIB\ARM\RTX_CM4_B.lib </td><td>CMSIS-RTOS RTX Library for ARMCC Compiler, Cortex-M4 and M7 with FPU, big-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM0.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M0 and M1, little-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM0_B.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M0 and M1, big-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM3.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M3, M4, and M7 without FPU, little-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM3_B.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M3, M4, and M7 without FPU, big-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM4.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M4 and M7 with FPU, little-endian.  </td></tr>
<tr>
<td>LIB\GCC\libRTX_CM4_B.a </td><td>CMSIS-RTOS RTX Library for GCC Compiler, Cortex-M4 and M7 with FPU, big-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM0.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M0 and M1, little-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM0_B.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M0 and M1, big-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM3.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M3, M4, and M7 without FPU, little-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM3_B.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M3, M4, and M7 without FPU, big-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM4.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M4 and M7 with FPU, little-endian.  </td></tr>
<tr>
<td>LIB\IAR\RTX_CM4_B.lib </td><td>CMSIS-RTOS RTX Library for IAR Compiler, Cortex-M4 and M7 with FPU, big-endian.  </td></tr>
</table>
<h1><a class="anchor" id="RTX_Conf_CM"></a>
Configuration File RTX_Conf_CM.c</h1>
<div class="fragment"><div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      CMSIS-RTOS  -  RTX</span></div>
<div class="line"><span class="comment"> *----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      Name:    RTX_Conf_CM.C</span></div>
<div class="line"><span class="comment"> *      Purpose: Configuration of CMSIS RTX Kernel for Cortex-M</span></div>
<div class="line"><span class="comment"> *      Rev.:    V4.70.1</span></div>
<div class="line"><span class="comment"> *----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * Copyright (c) 1999-2009 KEIL, 2009-2015 ARM Germany GmbH</span></div>
<div class="line"><span class="comment"> * All rights reserved.</span></div>
<div class="line"><span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div>
<div class="line"><span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div>
<div class="line"><span class="comment"> *  - Redistributions of source code must retain the above copyright</span></div>
<div class="line"><span class="comment"> *    notice, this list of conditions and the following disclaimer.</span></div>
<div class="line"><span class="comment"> *  - Redistributions in binary form must reproduce the above copyright</span></div>
<div class="line"><span class="comment"> *    notice, this list of conditions and the following disclaimer in the</span></div>
<div class="line"><span class="comment"> *    documentation and/or other materials provided with the distribution.</span></div>
<div class="line"><span class="comment"> *  - Neither the name of ARM  nor the names of its contributors may be used </span></div>
<div class="line"><span class="comment"> *    to endorse or promote products derived from this software without </span></div>
<div class="line"><span class="comment"> *    specific prior written permission.</span></div>
<div class="line"><span class="comment"> *</span></div>
<div class="line"><span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; </span></div>
<div class="line"><span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE </span></div>
<div class="line"><span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div>
<div class="line"><span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE</span></div>
<div class="line"><span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div>
<div class="line"><span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF </span></div>
<div class="line"><span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS </span></div>
<div class="line"><span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN </span></div>
<div class="line"><span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) </span></div>
<div class="line"><span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div>
<div class="line"><span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;<a class="code" href="cmsis__os_8h.html">cmsis_os.h</a>&quot;</span></div>
<div class="line"> </div>
<div class="line"></div>
<div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      RTX User configuration part BEGIN</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">//-------- &lt;&lt;&lt; Use Configuration Wizard in Context Menu &gt;&gt;&gt; -----------------</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;h&gt;Thread Configuration</span></div>
<div class="line"><span class="comment">// =======================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">//   &lt;o&gt;Number of concurrent running user threads &lt;1-250&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines max. number of user threads that will run at the same time.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 6</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TASKCNT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TASKCNT     6</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Default Thread stack size [bytes] &lt;64-4096:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines default stack size for threads with osThreadDef stacksz = 0</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_STKSIZE     50      // this stack size value is in words</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Main Thread stack size [bytes] &lt;64-32768:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines stack size for main thread.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_MAINSTKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_MAINSTKSIZE 50      // this stack size value is in words</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Number of threads with user-provided stack size &lt;0-250&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the number of threads with user-provided stack size.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 0</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_PRIVCNT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_PRIVCNT     0</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Total stack size [bytes] for threads with user-provided stack size &lt;0-1048576:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the combined stack size for threads with user-provided stack size.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 0</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_PRIVSTKSIZE</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_PRIVSTKSIZE 0       // this stack size value is in words</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;q&gt;Stack overflow checking</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Enable stack overflow checks at thread switch.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Enabling this option increases slightly the execution time of a thread switch.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKCHECK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_STKCHECK    1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;q&gt;Stack usage watermark</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Initialize thread stack with watermark pattern for analyzing stack usage (current/maximum) in System and Thread Viewer.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Enabling this option increases significantly the execution time of osThreadCreate.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_STKINIT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_STKINIT      0</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Processor mode for thread execution </span></div>
<div class="line"><span class="comment">//     &lt;0=&gt; Unprivileged mode </span></div>
<div class="line"><span class="comment">//     &lt;1=&gt; Privileged mode</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: Privileged mode</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_RUNPRIV</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_RUNPRIV     1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// &lt;h&gt;RTX Kernel Timer Tick Configuration</span></div>
<div class="line"><span class="comment">// ======================================</span></div>
<div class="line"><span class="comment">//   &lt;q&gt; Use Cortex-M SysTick timer as RTX Kernel Timer</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Cortex-M processors provide in most cases a SysTick timer that can be used as </span></div>
<div class="line"><span class="comment">//   &lt;i&gt; as time-base for RTX.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_SYSTICK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_SYSTICK     1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span><span class="comment">//</span></div>
<div class="line"><span class="comment">//   &lt;o&gt;RTOS Kernel Timer input clock frequency [Hz] &lt;1-1000000000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines the input frequency of the RTOS Kernel Timer.  </span></div>
<div class="line"><span class="comment">//   &lt;i&gt; When the Cortex-M SysTick timer is used, the input clock </span></div>
<div class="line"><span class="comment">//   &lt;i&gt; is on most systems identical with the core clock.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_CLOCK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_CLOCK       12000000</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;RTX Timer tick interval value [us] &lt;1-1000000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; The RTX Timer tick interval value is used to calculate timeout values.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; When the Cortex-M SysTick timer is enabled, the value also configures the SysTick timer.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 1000  (1ms)</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TICK</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TICK        1000</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// &lt;h&gt;System Configuration</span></div>
<div class="line"><span class="comment">// =======================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;e&gt;Round-Robin Thread switching</span></div>
<div class="line"><span class="comment">// ===============================</span></div>
<div class="line"><span class="comment">//</span></div>
<div class="line"><span class="comment">// &lt;i&gt; Enables Round-Robin Thread switching.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBIN</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_ROBIN       1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Round-Robin Timeout [ticks] &lt;1-1000&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines how long a thread will execute before a thread switch.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 5</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_ROBINTOUT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_ROBINTOUT   5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">// &lt;/e&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// &lt;e&gt;User Timers</span></div>
<div class="line"><span class="comment">// ==============</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Enables user Timers</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERS</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERS      1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Thread Priority</span></div>
<div class="line"><span class="comment">//                        &lt;1=&gt; Low</span></div>
<div class="line"><span class="comment">//     &lt;2=&gt; Below Normal  &lt;3=&gt; Normal  &lt;4=&gt; Above Normal</span></div>
<div class="line"><span class="comment">//                        &lt;5=&gt; High</span></div>
<div class="line"><span class="comment">//                        &lt;6=&gt; Realtime (highest)</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines priority for Timer Thread</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: High</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERPRIO</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERPRIO   5</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Thread stack size [bytes] &lt;64-4096:8&gt;&lt;#/4&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Defines stack size for Timer thread.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 200</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERSTKSZ</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERSTKSZ  50     // this stack size value is in words</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">//   &lt;o&gt;Timer Callback Queue size &lt;1-32&gt;</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Number of concurrent active timer callback functions.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 4</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_TIMERCBQS</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_TIMERCBQS   4</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">// &lt;/e&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">//   &lt;o&gt;ISR FIFO Queue size&lt;4=&gt;   4 entries  &lt;8=&gt;   8 entries</span></div>
<div class="line"><span class="comment">//                         &lt;12=&gt; 12 entries  &lt;16=&gt; 16 entries</span></div>
<div class="line"><span class="comment">//                         &lt;24=&gt; 24 entries  &lt;32=&gt; 32 entries</span></div>
<div class="line"><span class="comment">//                         &lt;48=&gt; 48 entries  &lt;64=&gt; 64 entries</span></div>
<div class="line"><span class="comment">//                         &lt;96=&gt; 96 entries</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; ISR functions store requests to this buffer,</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; when they are called from the interrupt handler.</span></div>
<div class="line"><span class="comment">//   &lt;i&gt; Default: 16 entries</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_FIFOSZ</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_FIFOSZ      16</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">// &lt;/h&gt;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">//------------- &lt;&lt;&lt; end of configuration section &gt;&gt;&gt; -----------------------</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">// Standard library system mutexes</span></div>
<div class="line"><span class="comment">// ===============================</span></div>
<div class="line"><span class="comment">//  Define max. number system mutexes that are used to protect </span></div>
<div class="line"><span class="comment">//  the arm standard runtime library. For microlib they are not used.</span></div>
<div class="line"><span class="preprocessor">#ifndef OS_MUTEXCNT</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor"> #define OS_MUTEXCNT    8</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#endif</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      RTX User configuration part END</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#define OS_TRV          ((uint32_t)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1)</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"></div>
<div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      Global Functions</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">/*--------------------------- os_idle_demon ---------------------------------*/</span></div>
<div class="line"><span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief The idle demon is running when no other thread is ready to run</span></div>
<div class="line"><span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group___r_t_x___global___functions.html#gafb4dc4d3dff8343a393726d2860282e4" title="The idle demon is running when no other thread is ready to run.">os_idle_demon</a> (<span class="keywordtype">void</span>) {</div>
<div class="line"> </div>
<div class="line">  <span class="keywordflow">for</span> (;;) {</div>
<div class="line">    <span class="comment">/* HERE: include optional user code to be executed when no thread runs.*/</span></div>
<div class="line">  }</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#if (OS_SYSTICK == 0)   // Functions for alternative timer as RTX kernel timer</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">/*--------------------------- os_tick_init ----------------------------------*/</span></div>
<div class="line"> <span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief Initializes an alternative hardware timer as RTX kernel timer</span></div>
<div class="line"><span class="comment">/// \return                             IRQ number of the alternative hardware timer</span></div>
<div class="line"><span class="comment"></span><span class="keywordtype">int</span> <a class="code" href="group___r_t_x___global___functions.html#ga145e7eafdd042bb522020cbb3b469d9c" title="Initializes an alternative hardware timer as RTX kernel timer.">os_tick_init</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (-1);  <span class="comment">/* Return IRQ number of timer (0..239) */</span></div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/*--------------------------- os_tick_val -----------------------------------*/</span></div>
<div class="line"> <span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief Get alternative hardware timer&#39;s current value (0 .. OS_TRV)</span></div>
<div class="line"><span class="comment">/// \return                             Current value of the alternative hardware timer</span></div>
<div class="line"><span class="comment"></span>uint32_t <a class="code" href="group___r_t_x___global___functions.html#ga567543bf38239a91f09751686c23017b" title="Get alternative hardware timer&#39;s current value (0 .. OS_TRV)">os_tick_val</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (0);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/*--------------------------- os_tick_ovf -----------------------------------*/</span></div>
<div class="line"> <span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief Get alternative hardware timer&#39;s  overflow flag</span></div>
<div class="line"><span class="comment">/// \return                             Overflow flag\n</span></div>
<div class="line"><span class="comment">///                                     - 1 : overflow</span></div>
<div class="line"><span class="comment">///                                     - 0 : no overflow</span></div>
<div class="line"><span class="comment"></span>uint32_t <a class="code" href="group___r_t_x___global___functions.html#gad5deddec3fea0fb31798f571afc3c692" title="Get alternative hardware timer&#39;s overflow flag.">os_tick_ovf</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="keywordflow">return</span> (0);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="comment">/*--------------------------- os_tick_irqack --------------------------------*/</span></div>
<div class="line"> <span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief Acknowledge alternative hardware timer interrupt</span></div>
<div class="line"><span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group___r_t_x___global___functions.html#ga85dab8408f27236c7341a69feb6258c7" title="Acknowledge alternative hardware timer interrupt.">os_tick_irqack</a> (<span class="keywordtype">void</span>) {</div>
<div class="line">  <span class="comment">/* ... */</span></div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#endif   // (OS_SYSTICK == 0)</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="comment">/*--------------------------- os_error --------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">/* OS Error Codes */</span></div>
<div class="line"><span class="preprocessor">#define OS_ERROR_STACK_OVF      1</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ERROR_FIFO_OVF       2</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ERROR_MBX_OVF        3</span></div>
<div class="line"><span class="preprocessor"></span><span class="preprocessor">#define OS_ERROR_TIMER_OVF      4</span></div>
<div class="line"><span class="preprocessor"></span> </div>
<div class="line"><span class="keyword">extern</span> <a class="code" href="cmsis__os_8h.html#adfeb153a84a81309e2d958268197617f" title="Thread ID identifies the thread (pointer to a thread control block).">osThreadId</a> <a class="code" href="_r_t_x___conf___c_m_8c.html#a395cca131b7746fc43c104a3485b77f7">svcThreadGetId</a> (<span class="keywordtype">void</span>);</div>
<div class="line"> <span class="comment"></span></div>
<div class="line"><span class="comment">/// \brief Called when a runtime error is detected</span></div>
<div class="line"><span class="comment">/// \param[in]   error_code   actual error code that has been detected</span></div>
<div class="line"><span class="comment"></span><span class="keywordtype">void</span> <a class="code" href="group___r_t_x___global___functions.html#ga651ae76b3acf45f80bf0e0487b51d6e6" title="Called when a runtime error is detected.">os_error</a> (uint32_t error_code) {</div>
<div class="line"> </div>
<div class="line">  <span class="comment">/* HERE: include optional code to be executed on runtime error. */</span></div>
<div class="line">  <span class="keywordflow">switch</span> (error_code) {</div>
<div class="line">    <span class="keywordflow">case</span> <a class="code" href="_r_t_x___conf___c_m_8c.html#abf8311a7a239ec56c6d725f926ba766d">OS_ERROR_STACK_OVF</a>:</div>
<div class="line">      <span class="comment">/* Stack overflow detected for the currently running task. */</span></div>
<div class="line">      <span class="comment">/* Thread can be identified by calling svcThreadGetId().   */</span></div>
<div class="line">      <span class="keywordflow">break</span>;</div>
<div class="line">    <span class="keywordflow">case</span> <a class="code" href="_r_t_x___conf___c_m_8c.html#a075d54df14c85a6afe32b7f5c99c9c29">OS_ERROR_FIFO_OVF</a>:</div>
<div class="line">      <span class="comment">/* ISR FIFO Queue buffer overflow detected. */</span></div>
<div class="line">      <span class="keywordflow">break</span>;</div>
<div class="line">    <span class="keywordflow">case</span> <a class="code" href="_r_t_x___conf___c_m_8c.html#ab715d7d66c341c067ef0a97b55db8a10">OS_ERROR_MBX_OVF</a>:</div>
<div class="line">      <span class="comment">/* Mailbox overflow detected. */</span></div>
<div class="line">      <span class="keywordflow">break</span>;</div>
<div class="line">    <span class="keywordflow">case</span> <a class="code" href="_r_t_x___conf___c_m_8c.html#a79d7e388d951f11bd0dabd13f722cea8">OS_ERROR_TIMER_OVF</a>:</div>
<div class="line">      <span class="comment">/* User Timer Callback Queue overflow detected. */</span></div>
<div class="line">      <span class="keywordflow">break</span>;</div>
<div class="line">    <span class="keywordflow">default</span>:</div>
<div class="line">      <span class="keywordflow">break</span>;</div>
<div class="line">  }</div>
<div class="line">  <span class="keywordflow">for</span> (;;);</div>
<div class="line">}</div>
<div class="line"> </div>
<div class="line"></div>
<div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> *      RTX Configuration Functions</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
<div class="line"> </div>
<div class="line"><span class="preprocessor">#include &quot;RTX_CM_lib.h&quot;</span></div>
<div class="line"> </div>
<div class="line"><span class="comment">/*----------------------------------------------------------------------------</span></div>
<div class="line"><span class="comment"> * end of file</span></div>
<div class="line"><span class="comment"> *---------------------------------------------------------------------------*/</span></div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="index.html">index</a></li><li class="navelem"><a class="el" href="_overview.html">Overview</a></li>
    <li class="footer">Generated on Tue Oct 27 2015 14:35:45 for CMSIS-RTOS RTX by ARM Ltd. All rights reserved.
	<!--
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.2 
	-->
	</li>
  </ul>
</div>
</body>
</html>