Skip to content

Commit be118da

Browse files
committed
Updated documentation (Event Recorder configuration).
1 parent 751f268 commit be118da

3 files changed

Lines changed: 122 additions & 28 deletions

File tree

DoxyGen/General/src/cmsis_freertos.txt

Lines changed: 89 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,11 @@ settings.
142142

143143
\image html freertos_config_h_native.png
144144

145-
145+
146146
\subsection native_freertos_er Add Event Recorder Visibility
147-
- To use the Event Recorder together with FreeRTOS, add the software components <b>\::Compiler:Event Recorder</b> and
148-
<b>\::RTOS:Event Groups</b> to your project.
149-
- Add this include: \c \#include \c "EventRecorder.h"
150-
- Call <b>EventRecorderInitialize(EventRecordAll, 1);</b> in your application code (ideally in \c main()).
147+
- To use the Event Recorder together with FreeRTOS, add the software component <b>\::Compiler:Event Recorder</b> to your project.
148+
- Edit \ref native_freertos_config "FreeRTOSConfig.h" and add Event Recorder configuration definitions (see \ref cmsis_freertos_evr_config)
149+
- Call <b>EvrFreeRTOSSetup();</b> in your application code (ideally in \c main()).
151150
- If you are using simulation mode, add an initialization file with the following content:
152151
\code
153152
MAP 0xE0001000, 0xE0001007 READ WRITE
@@ -161,8 +160,7 @@ settings.
161160
\endcode
162161
- Build the application code and download it to the debug hardware or run it in simulation.
163162

164-
Once the target application generates event information, it can be viewed in the µVision debugger using the \b Event
165-
\b Recorder.
163+
Once the target application generates event information, it can be viewed in the µVision debugger using the <b>Event Recorder</b>.
166164

167165

168166
\section cmsis_freertos Create a CMSIS-FreeRTOS project
@@ -193,28 +191,43 @@ When you have created the CMSIS-FreeRTOS project, you can configure the real-tim
193191

194192
The following settings are available:
195193

196-
Name | \#define | Description |
197-
-------------------------------|------------------------------------|------------------------------------------------------------|
198-
Minimal stack size [words] | configMINIMAL_STACK_SIZE | Stack for idle task and default task stack in words. |
199-
Total heap size [bytes] | configTOTAL_HEAP_SIZE | Heap memory size in bytes. |
200-
Kernel tick frequency [Hz] | configTICK_RATE_HZ | Kernel tick rate in Hz. |
201-
Timer task stack depth [words] | configTIMER_TASK_STACK_DEPTH | Stack for timer task in words. |
202-
Timer task priority | configTIMER_TASK_PRIORITY | Timer task priority. |
203-
Timer queue length | configTIMER_QUEUE_LENGTH | Timer command queue length. |
204-
Use time slicing | configUSE_TIME_SLICING | Enable setting to use time slicing. |
205-
Idle should yield | configIDLE_SHOULD_YIELD | Control Yield behavior of the idle task. |
206-
Check for stack overflow | configCHECK_FOR_STACK_OVERFLOW | Enable or disable stack overflow checking. |
207-
Use idle hook | configUSE_IDLE_HOOK | Enable callback function call on each idle task iteration. |
208-
Use tick hook | configUSE_TICK_HOOK | Enable callback function call during each tick interrupt. |
209-
Use daemon task startup hook | configUSE_DAEMON_TASK_STARTUP_HOOK | Enable callback function call when timer service starts. |
210-
Use malloc failed hook | configUSE_MALLOC_FAILED_HOOK | Enable callback function call when out of dynamic memory. |
194+
Name | \#define | Description |
195+
-------------------------------|--------------------------------------|-----------------------------------------------------------------------|
196+
Minimal stack size [words] | configMINIMAL_STACK_SIZE | Stack for idle task and default task stack in words. |
197+
Total heap size [bytes] | configTOTAL_HEAP_SIZE | Heap memory size in bytes. |
198+
Kernel tick frequency [Hz] | configTICK_RATE_HZ | Kernel tick rate in Hz. |
199+
Timer task stack depth [words] | configTIMER_TASK_STACK_DEPTH | Stack for timer task in words. |
200+
Timer task priority | configTIMER_TASK_PRIORITY | Timer task priority. |
201+
Timer queue length | configTIMER_QUEUE_LENGTH | Timer command queue length. |
202+
Preemption interrupt priority | configMAX_SYSCALL_INTERRUPT_PRIORITY | Maximum priority of interrupts that are safe to call FreeRTOS API. |
203+
Use time slicing | configUSE_TIME_SLICING | Enable setting to use time slicing. |
204+
Idle should yield | configIDLE_SHOULD_YIELD | Control Yield behavior of the idle task. |
205+
Check for stack overflow | configCHECK_FOR_STACK_OVERFLOW | Enable or disable stack overflow checking. |
206+
Use idle hook | configUSE_IDLE_HOOK | Enable callback function call on each idle task iteration. |
207+
Use tick hook | configUSE_TICK_HOOK | Enable callback function call during each tick interrupt. |
208+
Use daemon task startup hook | configUSE_DAEMON_TASK_STARTUP_HOOK | Enable callback function call when timer service starts. |
209+
Use malloc failed hook | configUSE_MALLOC_FAILED_HOOK | Enable callback function call when out of dynamic memory. |
210+
Queue registry size | configQUEUE_REGISTRY_SIZE | Define maximum number of queue objects registered for debug purposes. |
211+
212+
<b> Event Recorder Configuration </b>
213+
214+
The following settings are available (see \ref cmsis_freertos_evr_config for details):
215+
216+
Name | \#define | Description |
217+
-------------------------------|--------------------------------------|-----------------------------------------------------------------------------------------|
218+
Initialize Event Recorder | configEVR_INITIALIZE | Initialize Event Recorder before FreeRTOS kernel start. |
219+
Setup recording level filter | configEVR_SETUP_LEVEL | Enable configuration of FreeRTOS events recording level. |
220+
Task functions | configEVR_LEVEL_TASKS | Define event recording level bitmask for events generated from Tasks functions. |
221+
Queue functions | configEVR_LEVEL_QUEUE | Define event recording level bitmask for events generated from Queue functions. |
222+
Timer functions | configEVR_LEVEL_TIMERS | Define event recording level bitmask for events generated from Timer functions. |
223+
Event Groups functions | configEVR_LEVEL_EVENTGROUPS | Define event recording level bitmask for events generated from Event Groups functions. |
224+
Heap functions | configEVR_LEVEL_HEAP | Define event recording level bitmask for events generated from Heap functions. |
225+
Stream Buffer functions | configEVR_LEVEL_STREAMBUFFER | Define event recording level bitmask for events generated from Stream Buffer functions. |
211226

212227

213228
\subsection cmsis_freertos_er Add Event Recorder Visibility
214-
- To use the Event Recorder together with FreeRTOS, add the software component <b>\::Compiler:Event Recorder</b> to your
215-
project.
216-
- Add this include: \c \#include \c "EventRecorder.h"
217-
- Call <b>EventRecorderInitialize(EventRecordAll, 1);</b> in your application code (ideally in \c main()).
229+
- To use the Event Recorder together with FreeRTOS, add the software component <b>\::Compiler:Event Recorder</b> to your project.
230+
- Call <b>osKernelInitialize</b> in your application code (ideally in \c main()) to setup Event Recorder according to configuration settings.
218231
- If you are using simulation mode, add an initialization file with the following content:
219232
\code
220233
MAP 0xE0001000, 0xE0001007 READ WRITE
@@ -228,8 +241,56 @@ Use malloc failed hook | configUSE_MALLOC_FAILED_HOOK | Enable cal
228241
\endcode
229242
- Build the application code and download it to the debug hardware or run it in simulation.
230243

231-
Once the target application generates event information, it can be viewed in the µVision debugger using the \b Event
232-
\b Recorder.
244+
Once the target application generates event information, it can be viewed in the µVision debugger using the <b>Event Recorder.</b>
245+
246+
\section cmsis_freertos_evr_config Configure Event Recorder
247+
248+
This section describes the configuration settings for the <a href="http://www.keil.com/pack/doc/compiler/EventRecorder/html/index.html" target="_blank">Event Recorder</a>
249+
annotations. For more information refer to section \ref native_freertos_er "Add Event Recorder Visibility to native FreeRTOS project" or
250+
\ref cmsis_freertos_er "Add Event Recorder Visibility to CMSIS-FreeRTOS project".
251+
252+
Use below definitions to configure Event Recorder initialization and recording level filter setup.
253+
254+
\code
255+
#define configEVR_INITIALIZE
256+
\endcode
257+
258+
Value | Description |
259+
-------|---------------------------------------|
260+
0 | Disable Event Recorder initialization |
261+
1 | Enable Event Recorder initialization |
262+
263+
Definition configEVR_INITIALIZE enables Event Recorder initialization during execution of function \ref EvrFreeRTOSSetup. Default value is \token{1}.
264+
265+
\code
266+
#define configEVR_SETUP_LEVEL
267+
\endcode
268+
269+
Value | Description |
270+
-------|---------------------------------------|
271+
0 | Disable recording level filter setup |
272+
1 | Enable recording level filter setup |
273+
274+
Definition configEVR_SETUP_LEVEL enables setup of recording level filter for events generated by FreeRTOS. Recording level is configured during execution of function \ref EvrFreeRTOSSetup. Default value is \token{1}.
275+
276+
\code
277+
#define configEVR_LEVEL_TASKS
278+
#define configEVR_LEVEL_QUEUE
279+
#define configEVR_LEVEL_TIMERS
280+
#define configEVR_LEVEL_EVENTGROUPS
281+
#define configEVR_LEVEL_HEAP
282+
#define configEVR_LEVEL_STREAMBUFFER
283+
\endcode
284+
285+
Value | Description |
286+
-------|---------------------------------------------------|
287+
0x00 | Disable event generation |
288+
0x01 | Enable generation of error events |
289+
0x05 | Enable generation of error and operational events |
290+
0x0F | Enable generation of all events |
291+
292+
Definitions configEVR_LEVEL_x set the recording level bitmask for events generated by each function group. They are taken into account only when recording level filter setup is enabled. Default value is \token{0x05}.
293+
233294
*/
234295

235296

DoxyGen/General/src/freertos_evr.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
2+
/**
3+
\defgroup freertos_setup Event Recorder Setup
4+
\ingroup freertos_specific
5+
\brief Information about Event Recorder configuration and setup
6+
\details
7+
CMSIS-FreeRTOS interfaces to the
8+
<a href="http://www.keil.com/pack/doc/compiler/EventRecorder/html/index.html" target="_blank"><b>Event Recorder</b></a>
9+
to provide event information which helps you to understand and analyze the operation.
10+
11+
To use the Event Recorder together with CMSIS-FreeRTOS, it is required to create an image that generates event information.
12+
The steps are described under \ref cre_freertos_proj.
13+
@{
14+
*/
15+
16+
/**
17+
\fn void EvrFreeRTOSSetup (void)
18+
\details
19+
The function \b EvrFreeRTOSSetup initializes Event Recorder and configures recording level filter. It must be called before any event is sent to the Event Recorder.
20+
21+
Behavior of this function execution is defined with Event Recorder Configuration (\ref cmsis_freertos_evr_config). Calling this function has
22+
no effect when Event Recorder component is not selected.
23+
24+
\note \b EvrFreeRTOSSetup is called by function \b osKernelInitialize when CMSIS-RTOS2 API is in use and should not be called explicitly.
25+
26+
27+
28+
*/
29+
30+
/**
31+
@}
32+
*/
33+
134
/**
235
\defgroup freertos_evr Event functions
336
\ingroup freertos_specific
16.4 KB
Loading

0 commit comments

Comments
 (0)