Skip to content

Commit d1aea9a

Browse files
committed
Native FreeRTOS requires explicit EvrFreeRTOSSetup call to apply Event Recorder configuration.
1 parent be118da commit d1aea9a

2 files changed

Lines changed: 2 additions & 44 deletions

File tree

CMSIS/RTOS2/FreeRTOS/Examples/Native_Blinky/Blinky.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ void app_main (void *argument) {
132132
int main (void) {
133133
SystemCoreClockUpdate();
134134

135+
EvrFreeRTOSSetup();
136+
135137
xTaskCreate (app_main, "app_main", 64, NULL, tskIDLE_PRIORITY+1, NULL);
136138

137139
vTaskStartScheduler();

CMSIS/RTOS2/FreeRTOS/Source/freertos_evr.c

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -96,50 +96,6 @@
9696
#error "FreeRTOSConfig.h: invalid bitmask value - configEVR_LEVEL_STREAMBUFFER."
9797
#endif
9898

99-
/* Event Recorder setup hooks for FreeRTOS without CMSIS-RTOS2 API */
100-
#if !defined(RTE_CMSIS_RTOS2_FreeRTOS) && !defined(EVR_FREERTOS_HOOK_DISABLE)
101-
102-
#if defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050)
103-
/* Sub and Super use dollar characters - disable compiler warning */
104-
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
105-
#endif
106-
107-
extern void $Sub$$SystemInit (void);
108-
extern void $Super$$SystemInit(void);
109-
110-
extern void $Sub$$SystemCoreClockUpdate (void);
111-
extern void $Super$$SystemCoreClockUpdate(void);
112-
113-
/*
114-
Event Recorder setup hook for FreeRTOS
115-
116-
Event Recorder must be initialized and configured before first event is recorded.
117-
Therefore we replace global SystemInit function with patched implementation to
118-
setup Event Recorder before FreeRTOS API functions send out the first event.
119-
*/
120-
void $Sub$$SystemInit(void) {
121-
/* Call system initialization function */
122-
$Super$$SystemInit();
123-
124-
/* Initialize, setup level filter and start Event Recorder */
125-
EvrFreeRTOSSetup();
126-
}
127-
128-
/*
129-
Event Recorder clock update hook for FreeRTOS
130-
131-
Event Recorder timestamp clock must be updated when a clock change in the system occured.
132-
Therefore we replace global SystemCoreClockUpdate function with patched implementation to
133-
update Event Recorder timestamp clock after SystemCoreClock is updated.
134-
*/
135-
void $Sub$$SystemCoreClockUpdate(void) {
136-
/* Update SystemCoreClock */
137-
$Super$$SystemCoreClockUpdate();
138-
139-
/* Update Event Recorder timestamp clock */
140-
EventRecorderClockUpdate();
141-
}
142-
#endif
14399
#endif /* !defined(EVR_FREERTOS_DISABLE) */
144100

145101
/* Event IDs for "FreeRTOS Tasks" */

0 commit comments

Comments
 (0)