|
96 | 96 | #error "FreeRTOSConfig.h: invalid bitmask value - configEVR_LEVEL_STREAMBUFFER." |
97 | 97 | #endif |
98 | 98 |
|
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 |
143 | 99 | #endif /* !defined(EVR_FREERTOS_DISABLE) */ |
144 | 100 |
|
145 | 101 | /* Event IDs for "FreeRTOS Tasks" */ |
|
0 commit comments