You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<dlclass="todo"><dt><b><aclass="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Do we add user code templates for the native FreeRTOS implementation?</dd></dl>
139
-
<ul>
140
-
<li>You can add template files to the project by right-clicking on <b>Source Group 1</b> and selecting <b>Add New Item to 'Source Group 1'</b>. In the new window, click on <b>User Code Template</b>. On the right-hand side you will see all available template files for CMSIS-RTOS RTX:</li>
141
-
</ul>
142
-
<dlclass="todo"><dt><b><aclass="el" href="todo.html#_todo000002">Todo:</a></b></dt><dd>Do we offer an SCVD file for the native FreeRTOS implementation?</dd></dl>
<p>When you have created the native FreeRTOS project, you can configure the real-time operating system using the <b>FreeRTOSConfig.h</b> file. Please refer to the <ahref="http://www.freertos.org/a00110.html" target="_blank">FreeRTOS documentation</a> for more information on the specific settings.</p>
<li>To use the Event Recorder together with RTX5, select the software component <b>Compiler:Event Recorder</b>.</li>
147
-
<li>Select the <b>Source</b> variant of the software component <b>CMSIS:RTOS2 (API):Keil RTX5</b>.</li>
148
-
<li>Call the function <b>EventRecorderInitialize()</b> in your application code (ideally in <code>main()</code>).</li>
149
-
<li>Build the application code and download it to the debug hardware.</li>
147
+
<li>To use the Event Recorder together with FreeRTOS, add the software components <b>::Compiler:Event Recorder</b> and <b>::RTOS:Event Groups</b> to your project.</li>
148
+
<li>Add this include: <code>#include</code><code>"EventRecorder.h"</code></li>
149
+
<li>Call <b>EventRecorderInitialize(EventRecordAll, 1);</b> in your application code (ideally in <code>main()</code>).</li>
150
+
<li>If you are using simulation mode, add an initialization file with the following content: <divclass="fragment"><divclass="line">MAP 0xE0001000, 0xE0001007 READ WRITE </div>
<li>Build the application code and download it to the debug hardware or run it in simulation.</li>
150
160
</ul>
151
161
<p>Once the target application generates event information, it can be viewed in the µVision debugger using the <b>Event</b><b>Recorder</b>.</p>
152
162
<h1><aclass="anchor" id="cmsis_freertos"></a>
153
163
Create a CMSIS-FreeRTOS project</h1>
154
164
<p>The steps to create a microcontroller application using CMSIS-FreeRTOS are:</p>
155
165
<ul>
156
166
<li>Create a new project and select a microcontroller device.</li>
157
-
<li><pclass="startli">In the Manage Run-Time Environment window, select <b>::Device:Startup</b>, <b>::CMSIS::RTOS2 (API)::FreeRTOS</b>, <b>::RTOS:CORE</b> in the <b>FreeRTOS</b> variant, <b>::RTOS:Config</b> in the <b>CMSIS</b><b>RTOS2</b> variant, <b>::RTOS:FreeRTOS:Timers</b>, <b>::RTOS:FreeRTOS:Event Groups</b>, and an applicable <b>::RTOS:Heap</b> scheme (for more information on the heap schemes, visit the FreeRTOS documentation):</p>
167
+
<li><pclass="startli">In the Manage Run-Time Environment window, select <b>::Device:Startup</b>, <b>::CMSIS::RTOS2 (API)::FreeRTOS</b>, <b>::RTOS:CORE</b> in the <b>FreeRTOS</b> variant, <b>::RTOS:Config</b> in the <b>CMSIS</b><b>RTOS2</b> variant, <b>::RTOS:Timers</b>, <b>::RTOS:Event Groups</b>, and an applicable <b>::RTOS:Heap</b> scheme (for more information on the heap schemes, visit the FreeRTOS documentation):</p>
<dlclass="todo"><dt><b><aclass="el" href="todo.html#_todo000003">Todo:</a></b></dt><dd>Do we add user code templates for the RTOS2 FreeRTOS implementation?\</dd></dl>
172
-
<ul>
173
-
<li>You can add template files to the project by right-clicking on <b>Source Group 1</b> and selecting <b>Add New Item to 'Source Group 1'</b>. In the new window, click on <b>User Code Template</b>. On the right-hand side you will see all available template files for CMSIS-RTOS RTX:</li>
174
-
</ul>
175
-
<dlclass="todo"><dt><b><aclass="el" href="todo.html#_todo000004">Todo:</a></b></dt><dd>Do we offer an SCVD file for the RTOS2 FreeRTOS implementation?</dd></dl>
<p>When you have created the CMSIS-FreeRTOS project, you can configure the real-time operating system using the <b>FreeRTOSConfig.h</b> file. It can be opened using the Configuration Wizard view:</p>
<td>Use time slicing </td><td>configUSE_TIME_SLICING </td><td>Enable setting to use time slicing. </td></tr>
205
+
<tr>
206
+
<td>Idle should yield </td><td>configIDLE_SHOULD_YIELD </td><td>Control Yield behavior of the idle task. </td></tr>
207
+
<tr>
208
+
<td>Check for stack overflow </td><td>configCHECK_FOR_STACK_OVERFLOW </td><td>Enable or disable stack overflow checking. </td></tr>
209
+
<tr>
210
+
<td>Use idle hook </td><td>configUSE_IDLE_HOOK </td><td>Enable callback function call on each idle task iteration. </td></tr>
211
+
<tr>
212
+
<td>Use tick hook </td><td>configUSE_TICK_HOOK </td><td>Enable callback function call during each tick interrupt. </td></tr>
213
+
<tr>
214
+
<td>Use daemon task startup hook </td><td>configUSE_DAEMON_TASK_STARTUP_HOOK </td><td>Enable callback function call when timer service starts. </td></tr>
215
+
<tr>
216
+
<td>Use malloc failed hook </td><td>configUSE_MALLOC_FAILED_HOOK </td><td>Enable callback function call when out of dynamic memory. </td></tr>
217
+
</table>
176
218
<h2><aclass="anchor" id="cmsis_freertos_er"></a>
177
219
Add Event Recorder Visibility</h2>
178
220
<ul>
179
-
<li>To use the Event Recorder together with RTX5, select the software component <b>Compiler:Event Recorder</b>.</li>
180
-
<li>Select the <b>Source</b> variant of the software component <b>CMSIS:RTOS2 (API):Keil RTX5</b>.</li>
181
-
<li>Call the function <b>EventRecorderInitialize()</b> in your application code (ideally in <code>main()</code>).</li>
182
-
<li>Build the application code and download it to the debug hardware.</li>
221
+
<li>To use the Event Recorder together with FreeRTOS, add the software component <b>::Compiler:Event Recorder</b> to your project.</li>
222
+
<li>Add this include: <code>#include</code><code>"EventRecorder.h"</code></li>
223
+
<li>Call <b>EventRecorderInitialize(EventRecordAll, 1);</b> in your application code (ideally in <code>main()</code>).</li>
224
+
<li>If you are using simulation mode, add an initialization file with the following content: <divclass="fragment"><divclass="line">MAP 0xE0001000, 0xE0001007 READ WRITE </div>
0 commit comments