xmclib/CMSIS/Documentation/RTOS2/html/config_rtx5.html
2024-10-17 17:09:59 +02:00

384 lines
31 KiB
HTML

<!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>Configure RTX v5</title>
<title>CMSIS-RTOS2: Configure RTX v5</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);
$(window).load(resizeHeight);
</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>
</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-RTOS2
&#160;<span id="projectnumber">Version 2.1.0</span>
</div>
<div id="projectbrief">Real-Time Operating System: API and RTX Reference Implementation</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.6 -->
<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('config_rtx5.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">Configure RTX v5 </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>The file "RTX_Config.h" defines the configuration parameters of CMSIS-RTOS RTX and must be part of every project that is using the CMSIS-RTOS RTX kernel. The file "RTX_Config.c" contains stubs of the functions <b>osRtxIdleThread</b> and <b>osRtxErrorNotify</b> that can be adapted to the application's needs.</p>
<p>The configuration file uses <a href="http://www.keil.com/pack/doc/CMSIS/Pack/html/_config_wizard.html" class="el" target="_blank">Configuration Wizard Annotations</a>. Depending on the development tool, the annotations might lead to a more user-friendly graphical representation of the settings. The screenshot below is a screenshot from the µVision <b>Configuration</b> <b>Wizard</b> view:</p>
<div class="image">
<img src="config_wizard.png" alt="config_wizard.png"/>
<div class="caption">
RTX_Config.h in Configuration Wizard View</div></div>
<p> The configuration options are explained on these pages:</p>
<ul>
<li><a class="el" href="config_rtx5.html#systemConfig">System Configuration</a></li>
<li><a class="el" href="config_rtx5.html#threadConfig">Thread Configuration</a></li>
<li><a class="el" href="config_rtx5.html#timerConfig">Timer Configuration</a></li>
<li><a class="el" href="config_rtx5.html#eventFlagsConfig">Event Flags Configuration</a></li>
<li><a class="el" href="config_rtx5.html#mutexConfig">Mutex Configuration</a></li>
<li><a class="el" href="config_rtx5.html#semaphoreConfig">Semaphore Configuration</a></li>
<li><a class="el" href="config_rtx5.html#memPoolConfig">Memory Pool Configuration</a></li>
<li><a class="el" href="config_rtx5.html#msgQueueConfig">Message Queue Configuration</a></li>
</ul>
<h1><a class="anchor" id="systemConfig"></a>
System Configuration</h1>
<p>The system configuration covers system-wide settings for the global memory pool, tick frequency, ISR event buffer and round-robin thread switching.</p>
<p><b>System Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_system.png" alt="config_wizard_system.png"/>
<div class="caption">
RTX_Config.h: System Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Global Dynamic Memory size [bytes] </td><td><code>OS_DYNAMIC_MEM_SIZE</code> </td><td>Defines the combined global dynamic memory size for the <a class="el" href="theory_of_operation.html#GlobalMemoryPool">Global Memory Pool</a>. Default value is <span class="XML-Token">4096</span>. Value range is <span class="XML-Token">[0-1073741824]</span> bytes, in multiples of <span class="XML-Token">8</span> bytes. </td></tr>
<tr>
<td>Kernel Tick Frequency (Hz) </td><td><code>OS_TICK_FREQ</code> </td><td>Defines base time unit for delays and timeouts in Hz. Default: 1000Hz = 1ms period. </td></tr>
<tr>
<td>Round-Robin Thread switching </td><td><code>OS_ROBIN_ENABLE</code> </td><td>Enables Round-Robin Thread switching. </td></tr>
<tr>
<td>Round-Robin Timeout </td><td><code>OS_ROBIN_TIMEOUT</code> </td><td>Defines how long a thread will execute before a thread switch. Default value is <span class="XML-Token">5</span>. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
<tr>
<td>ISR FIFO Queue </td><td><code>OS_ISR_FIFO_QUEUE</code> </td><td>RTOS Functions called from ISR store requests to this buffer. Default value is <span class="XML-Token">16 entries</span>. Value range is <span class="XML-Token">[4-256]</span> entries in multiples of <span class="XML-Token">4</span>. </td></tr>
</table>
<h2><a class="anchor" id="systemConfig_glob_mem"></a>
Global dynamic memory</h2>
<p>Refer to <a class="el" href="theory_of_operation.html#GlobalMemoryPool">Global Memory Pool</a>.</p>
<h2><a class="anchor" id="systemConfig_rr"></a>
Round-Robin Thread Switching</h2>
<p>RTX5 may be configured to use round-robin multitasking thread switching. Round-robin allows quasi-parallel execution of several threads of the <em>same</em> priority. Threads are not really executed concurrently, but are scheduled where the available CPU time is divided into time slices and RTX5 assigns a time slice to each thread. Because the time slice is typically short (only a few milliseconds), it appears as though threads execute simultaneously.</p>
<p>Round-robin thread switching functions as follows:</p>
<ul>
<li>the tick is preloaded with the timeout value when a thread switch occurs</li>
<li>the tick is decremented (if not already zero) each system tick if the same thread is still executing</li>
<li>when the tick reaches 0 it indicates that a timeout has occurred. If there is another thread ready with the <em>same</em> priority, then the system switches to that thread and the tick is preloaded with timeout again.</li>
</ul>
<p>In other words, threads execute for the duration of their time slice (unless a thread's time slice is given up). Then, RTX switches to the next thread that is in <b>READY</b> state and has the same priority. If no other thread with the same priority is ready to run, the current running thread resumes it execution.</p>
<dl class="section note"><dt>Note</dt><dd>When switching to higher priority threads, the round-robin timeout value is reset.</dd></dl>
<p>Round-Robin multitasking is controlled with the <b>#define OS_ROBIN_ENABLE</b>. The time slice period is configured (in RTX timer ticks) with the <b>#define OS_ROBIN_TIMEOUT</b>.</p>
<h2><a class="anchor" id="systemConfig_isr_fifo"></a>
ISR FIFO Queue</h2>
<p>The RTX functions (<a class="el" href="theory_of_operation.html#CMSIS_RTOS_ISR_Calls">Calls from Interrupt Service Routines</a>), when called from and interrupt handler, store the request type and optional parameter to the ISR FIFO queue buffer to be processed later, after the interrupt handler exits.</p>
<p>The scheduler is activated immediately after the IRQ handler has finished its execution to process the requests stored to the FIFO queue buffer. The required size of this buffer depends on the number of functions that are called within the interrupt handler. An insufficient queue size will be caught by <b>osRtxErrorNotify</b> with error code <b>osRtxErrorISRQueueOverflow</b>.</p>
<h1><a class="anchor" id="threadConfig"></a>
Thread Configuration</h1>
<p>The RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html">Thread Management</a> functions.</p>
<p><b>Thread Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_threads.png" alt="config_wizard_threads.png"/>
<div class="caption">
RTX_Config.h: Thread Configuration</div></div>
<p> <br/>
</p>
<table class="doxtable">
<tr>
<th align="left">Option </th><th align="left">#define </th><th align="left">Description </th></tr>
<tr>
<td align="left">Object specific Memory allocation </td><td align="left"><code>OS_THREAD_OBJ_MEM</code> </td><td align="left">Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td align="left">Number of user Threads </td><td align="left"><code>OS_THREAD_NUM</code> </td><td align="left">Defines maximum number of user threads that can be active at the same time. Applies to user threads with system provided memory for control blocks. Default value is <span class="XML-Token">1</span>. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
<tr>
<td align="left">Number of user Threads with default Stack size </td><td align="left"><code>OS_THREAD_DEF_STACK_NUM</code> </td><td align="left">Defines maximum number of user threads with default stack size and applies to user threads with <span class="XML-Token">0</span> stack size specified. Value range is <span class="XML-Token">[0-1000]</span>. </td></tr>
<tr>
<td align="left">Total Stack size [bytes] for user Threads with user-provided Stack size </td><td align="left"><code>OS_THREAD_USER_STACK_SIZE</code> </td><td align="left">Defines the combined stack size for user threads with user-provided stack size. Default value is <span class="XML-Token">0</span>. Value range is <span class="XML-Token">[0-1073741824]</span> Bytes, in multiples of <span class="XML-Token">8</span>. </td></tr>
<tr>
<td align="left">Default Thread Stack size [bytes] </td><td align="left"><code>OS_STACK_SIZE</code> </td><td align="left">Defines stack size for threads with zero stack size specified. Default value is <span class="XML-Token">200</span>. Value range is <span class="XML-Token">[96-1073741824]</span> Bytes, in multiples of <span class="XML-Token">8</span>. </td></tr>
<tr>
<td align="left">Idle Thread Stack size [bytes] </td><td align="left"><code>OS_IDLE_THREAD_STACK_SIZE</code> </td><td align="left">Defines stack size for Idle thread. Default value is <span class="XML-Token">200</span>. Value range is <span class="XML-Token">[72-1073741824]</span> bytes, in multiples of <span class="XML-Token">8</span>. </td></tr>
<tr>
<td align="left">Stack overrun checking </td><td align="left"><code>OS_STACK_CHECK</code> </td><td align="left">Enable stack overrun checks at thread switch. </td></tr>
<tr>
<td align="left">Stack usage watermark </td><td align="left"><code>OS_STACK_WATERMARK</code> </td><td align="left">Initialize thread stack with watermark pattern for analyzing stack usage. Enabling this option increases significantly the execution time of thread creation. </td></tr>
<tr>
<td align="left">Processor mode for Thread execution </td><td align="left"><code>OS_PRIVILEGE_MODE</code> </td><td align="left">Controls the processor mode. Default value is <span class="XML-Token">Privileged</span> mode. Value range is <span class="XML-Token">[0=Unprivileged; 1=Privileged]</span> mode. </td></tr>
</table>
<h2><a class="anchor" id="threadConfig_countstack"></a>
Configuration of Thread Count and Stack Space</h2>
<p>The RTX5 kernel uses a separate stack space for each thread and provides two methods for defining the stack requirements:</p>
<ul>
<li><b>Static allocation</b>: when <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ad7c9b42355a4c8b9467130ab3fb19e43">osThreadAttr_t::stack_mem</a> and <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#aacbc9a219f2d6870e9ce89bb93f975c9">osThreadAttr_t::stack_size</a> specify a memory area which is used for the thread stack.</li>
<li><b>Dynamic allocation</b>: when <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#structosThreadAttr__t">osThreadAttr_t</a> is NULL or <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ad7c9b42355a4c8b9467130ab3fb19e43">osThreadAttr_t::stack_mem</a> is NULL, the system allocates the stack memory from:<ul>
<li>Object-specific Memory Pool (default Stack size) when "Object specific Memory allocation" is enabled and "Number of
user Threads with default Stack size" is not <span class="XML-Token">0</span> and <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#aacbc9a219f2d6870e9ce89bb93f975c9">osThreadAttr_t::stack_size</a> is <span class="XML-Token">0</span> (or <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#structosThreadAttr__t">osThreadAttr_t</a> is NULL).</li>
<li>Object-specific Memory Pool (user-provided Stack size) when "Object specific Memory allocation" is enabled and "Total
Stack size for user..." is not <span class="XML-Token">0</span> and <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#aacbc9a219f2d6870e9ce89bb93f975c9">osThreadAttr_t::stack_size</a> is not <span class="XML-Token">0</span>.</li>
<li>Global Memory Pool when "Object specific Memory allocation" is disabled or (<a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#aacbc9a219f2d6870e9ce89bb93f975c9">osThreadAttr_t::stack_size</a> is not <span class="XML-Token">0</span> and "Total Stack size for user..." is <span class="XML-Token">0</span>) or (<a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#aacbc9a219f2d6870e9ce89bb93f975c9">osThreadAttr_t::stack_size</a> is <span class="XML-Token">0</span> and "Number of user Threads with default Stack size" is <span class="XML-Token">0</span>).</li>
</ul>
</li>
</ul>
<p><a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#structosThreadAttr__t">osThreadAttr_t</a> is a parameter of the function <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga48d68b8666d99d28fa646ee1d2182b8f">osThreadNew</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Before the RTX kernel is started by the <a class="el" href="group__CMSIS__RTOS__KernelCtrl.html#ga9ae2cc00f0d89d7b6a307bba942b5221">osKernelStart()</a> function, the main stack defined in startup_<em>device</em>.s is used. The main stack is also used for:<ul>
<li>user application calls to RTX functions in <b>thread</b> <b>mode</b> using SVC calls</li>
<li>interrupt/exception handlers.</li>
</ul>
</dd></dl>
<h2><a class="anchor" id="threadConfig_ovfcheck"></a>
Stack Overflow Checking</h2>
<p>RTX5 implements a software stack overflow checking that traps stack overruns. Stack is used for return addresses and automatic variables. Extensive usage or incorrect stack configuration may cause a stack overflow. Software stack overflow checking is controlled with the define <code>OS_STACK_CHECK</code>.</p>
<p>If a stack overflow is detected, the function <b>osRtxErrorNotify</b> with error code <b>osRtxErrorStackUnderflow</b> is called. By default, this function is implemented as an endless loop and will practically stop code execution.</p>
<h2><a class="anchor" id="threadConfig_watermark"></a>
Stack Usage Watermark</h2>
<p>RTX5 initializes thread stack with a watermark pattern (0xCC) when a thread is created. This allows the debugger to determine the maximum stack usage for each thread. It is typically used during development but removed from the final application. Stack usage watermark is controlled with the define <code>OS_STACK_WATERMARK</code>.</p>
<p>Enabling this option significantly increases the execution time of <a class="el" href="group__CMSIS__RTOS__ThreadMgmt.html#ga48d68b8666d99d28fa646ee1d2182b8f">osThreadNew</a> (depends on thread stack size).</p>
<h2><a class="anchor" id="threadConfig_procmode"></a>
Processor Mode for Thread Execution</h2>
<p>RTX5 allows to execute threads in unprivileged or privileged processor mode. The processor mode is controlled with the define <code>OS_PRIVILEGE_MODE</code>.</p>
<p>In <b>unprivileged</b> processor mode, the application software:</p>
<ul>
<li>has limited access to the MSR and MRS instructions, and cannot use the CPS instruction.</li>
<li>cannot access the system timer, NVIC, or system control block.</li>
<li>might have restricted access to memory or peripherals.</li>
</ul>
<p>In <b>privileged</b> processor mode, the application software can use all the instructions and has access to all resources.</p>
<h1><a class="anchor" id="timerConfig"></a>
Timer Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__TimerMgmt.html">Timer Management</a> functions.</p>
<p><b>Timer Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_timer.png" alt="config_wizard_timer.png"/>
<div class="caption">
RTX_Config.h: Timer Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_TIMER_OBJ_MEM</code> </td><td>Enables object specific memory allocation. </td></tr>
<tr>
<td>Number of Timer objects </td><td><code>OS_TIMER_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
<tr>
<td>Timer Thread Priority </td><td><code>OS_TIMER_THREAD_PRIO</code> </td><td>Defines priority for timer thread. Default value is <span class="XML-Token">40</span>. Value range is <span class="XML-Token">[8-48]</span>, in multiples of <span class="XML-Token">8</span>. The numbers have the following priority correlation: <span class="XML-Token">8=Low</span>; <span class="XML-Token">16=Below Normal</span>; <span class="XML-Token">24=Normal</span>; <span class="XML-Token">32=Above Normal</span>; <span class="XML-Token">40=High</span>; <span class="XML-Token">48=Realtime</span> </td></tr>
<tr>
<td>Timer Thread Stack size [bytes] </td><td><code>OS_TIMER_THREAD_STACK_SIZE</code> </td><td>Defines stack size for Timer thread. May be set to 0 when timers are not used. Default value is <span class="XML-Token">200</span>. Value range is <span class="XML-Token">[0-1073741824]</span>, in multiples of <span class="XML-Token">8</span>. </td></tr>
<tr>
<td>Timer Callback Queue entries </td><td><code>OS_TIMER_CB_QUEUE</code> </td><td>Number of concurrent active timer callback functions. May be set to 0 when timers are not used. Default value is <span class="XML-Token">4</span>. Value range is <span class="XML-Token">[0-256]</span>. </td></tr>
</table>
<h2><a class="anchor" id="timerConfig_obj"></a>
Object-specific memory allocation</h2>
<p>See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>.</p>
<h2><a class="anchor" id="timerConfig_user"></a>
User Timer Thread</h2>
<p>The RTX5 function <b>osRtxTimerThread</b> executes callback functions when a time period expires. The priority of the timer subsystem within the complete RTOS system is inherited from the priority of the <b>osRtxTimerThread</b>. This is configured by <code>OS_TIMER_THREAD_PRIO</code>. Stack for callback functions is supplied by <b>osRtxTimerThread</b>. <code>OS_TIMER_THREAD_STACK_SIZE</code> must satisfy the stack requirements of the callback function with the highest stack usage.</p>
<h1><a class="anchor" id="eventFlagsConfig"></a>
Event Flags Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__EventFlags.html">Event Flags</a> functions.</p>
<p><b>Event Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_eventFlags.png" alt="config_wizard_eventFlags.png"/>
<div class="caption">
RTX_Config.h: Event Flags Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_EVFLAGS_OBJ_MEM</code> </td><td>Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td>Number of Event Flags objects </td><td><code>OS_EVFLAGS_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
</table>
<h2><a class="anchor" id="eventFlagsConfig_obj"></a>
Object-specific memory allocation</h2>
<p>When object-specific memory is used, the pool size for all Event objects is specified by <code>OS_EVFLAGS_NUM</code>. Refer to <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>.</p>
<h1><a class="anchor" id="mutexConfig"></a>
Mutex Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__MutexMgmt.html">Mutex Management</a> functions.</p>
<p><b>Mutex Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_mutex.png" alt="config_wizard_mutex.png"/>
<div class="caption">
RTX_Config.h: Mutex Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_MUTEX_OBJ_MEM</code> </td><td>Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td>Number of Mutex objects </td><td><code>OS_MUTEX_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
</table>
<h2><a class="anchor" id="mutexConfig_obj"></a>
Object-specific Memory Allocation</h2>
<p>When object-specific memory is used, the pool size for all Mutex objects is specified by <code>OS_MUTEX_NUM</code>. Refer to <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>.</p>
<h1><a class="anchor" id="semaphoreConfig"></a>
Semaphore Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__SemaphoreMgmt.html">Semaphores</a> functions.</p>
<p><b>Semaphore Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_semaphore.png" alt="config_wizard_semaphore.png"/>
<div class="caption">
RTX_Config.h: Semaphore Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_SEMAPHORE_OBJ_MEM</code> </td><td>Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td>Number of Semaphore objects </td><td><code>OS_SEMAPHORE_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
</table>
<h2><a class="anchor" id="semaphoreConfig_obj"></a>
Object-specific memory allocation</h2>
<p>When Object-specific Memory is used, the pool size for all Semaphore objects is specified by <code>OS_SEMAPHORE_NUM</code>. Refer to <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>.</p>
<h1><a class="anchor" id="memPoolConfig"></a>
Memory Pool Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__PoolMgmt.html">Memory Pool</a> functions.</p>
<p><b>Memory Pool Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_memPool.png" alt="config_wizard_memPool.png"/>
<div class="caption">
RTX_Config.h: Memory Pool Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_MEMPOOL_OBJ_MEM</code> </td><td>Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td>Number of Memory Pool objects </td><td><code>OS_MEMPOOL_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
<tr>
<td>Data Storage Memory size [bytes] </td><td><code>OS_MEMPOOL_DATA_SIZE</code> </td><td>Defines the combined data storage memory size. Applies to objects with system provided memory for data storage. Default value is <span class="XML-Token">0</span>. Value range is <span class="XML-Token">[0-1073741824]</span>, in multiples of <span class="XML-Token">8</span>. </td></tr>
</table>
<h2><a class="anchor" id="memPoolConfig_obj"></a>
Object-specific memory allocation</h2>
<p>When object-specific memory is used, the number of pools for all MemoryPool objects is specified by <code>OS_MEMPOOL_NUM</code>. The total storage size reserved for all pools is configured in <code>OS_MEMPOOL_DATA_SIZE</code>. Refer to <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>.</p>
<h1><a class="anchor" id="msgQueueConfig"></a>
Message Queue Configuration</h1>
<p>RTX5 provides several parameters to configure the <a class="el" href="group__CMSIS__RTOS__Message.html">Message Queue</a> functions.</p>
<p><b>MessageQueue Configuration Options</b> </p>
<div class="image">
<img src="config_wizard_msgQueue.png" alt="config_wizard_msgQueue.png"/>
<div class="caption">
RTX_Config.h: Message Queue Configuration</div></div>
<table class="doxtable">
<tr>
<th>Name </th><th>#define </th><th>Description </th></tr>
<tr>
<td>Object specific Memory allocation </td><td><code>OS_MSGQUEUE_OBJ_MEM</code> </td><td>Enables object specific memory allocation. See <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </td></tr>
<tr>
<td>Number of Message Queue objects </td><td><code>OS_MSGQUEUE_NUM</code> </td><td>Defines maximum number of objects that can be active at the same time. Applies to objects with system provided memory for control blocks. Value range is <span class="XML-Token">[1-1000]</span>. </td></tr>
<tr>
<td>Data Storage Memory size [bytes] </td><td><code>OS_MSGQUEUE_DATA_SIZE</code> </td><td>Defines the combined data storage memory size. Applies to objects with system provided memory for data storage. Default value is <span class="XML-Token">0</span>. Value range is <span class="XML-Token">[0-1073741824]</span>, in multiples of <span class="XML-Token">8</span>. </td></tr>
</table>
<h2><a class="anchor" id="msgQueueConfig_obj"></a>
Object-specific memory allocation</h2>
<p>When Object-specific Memory is used, the number of queues for all Message Queue objects is specified by <code>OS_MSGQUEUE_NUM</code>. The total storage size reserved for all queues is configured in <code>OS_MSGQUEUE_DATA_SIZE</code>. Refer to <a class="el" href="theory_of_operation.html#ObjectMemoryPool">Object-specific Memory Pools</a>. </p>
</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="rtx5_impl.html">RTX v5 Implementation</a></li>
<li class="footer">Generated on Wed Feb 8 2017 10:21:03 for CMSIS-RTOS2 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.6
-->
</li>
</ul>
</div>
</body>
</html>