|
|
@@ -361,46 +361,71 @@ __attribute__((section(".bss.os.msgqueue.mem")));
|
|
|
|
|
|
#if (defined(OS_EVR_INIT) && (OS_EVR_INIT != 0))
|
|
|
|
|
|
-#if defined(RTE_Compiler_EventRecorder)
|
|
|
-
|
|
|
-// Event Recorder Initialize
|
|
|
-__STATIC_INLINE void evr_initialize (void) {
|
|
|
-
|
|
|
- (void)EventRecorderInitialize(OS_EVR_LEVEL, (uint32_t)OS_EVR_START);
|
|
|
+// Initial Thread configuration covered also Thread Flags and Generic Wait
|
|
|
+#if defined(OS_EVR_THREAD_FILTER)
|
|
|
+#if !defined(OS_EVR_THFLAGS_FILTER)
|
|
|
+#define OS_EVR_THFLAGS_FILTER OS_EVR_THREAD_FILTER
|
|
|
+#endif
|
|
|
+#if !defined(OS_EVR_WAIT_FILTER)
|
|
|
+#define OS_EVR_WAIT_FILTER OS_EVR_THREAD_FILTER
|
|
|
+#endif
|
|
|
+#endif
|
|
|
|
|
|
-#if ((OS_EVR_MEMORY_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_MEMORY_FILTER & 0x0FU, EvtRtxMemoryNo, EvtRtxMemoryNo);
|
|
|
+// Migrate initial filter configuration
|
|
|
+#if defined(OS_EVR_MEMORY_FILTER)
|
|
|
+#define OS_EVR_MEMORY_LEVEL (((OS_EVR_MEMORY_FILTER & 0x80U) != 0U) ? (OS_EVR_MEMORY_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_KERNEL_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_KERNEL_FILTER & 0x0FU, EvtRtxKernelNo, EvtRtxKernelNo);
|
|
|
+#if defined(OS_EVR_KERNEL_FILTER)
|
|
|
+#define OS_EVR_KERNEL_LEVEL (((OS_EVR_KERNEL_FILTER & 0x80U) != 0U) ? (OS_EVR_KERNEL_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_THREAD_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_THREAD_FILTER & 0x0FU, EvtRtxThreadNo, EvtRtxThreadNo);
|
|
|
+#if defined(OS_EVR_THREAD_FILTER)
|
|
|
+#define OS_EVR_THREAD_LEVEL (((OS_EVR_THREAD_FILTER & 0x80U) != 0U) ? (OS_EVR_THREAD_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_WAIT_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_WAIT_FILTER & 0x0FU, EvtRtxWaitNo, EvtRtxWaitNo);
|
|
|
+#if defined(OS_EVR_WAIT_FILTER)
|
|
|
+#define OS_EVR_WAIT_LEVEL (((OS_EVR_WAIT_FILTER & 0x80U) != 0U) ? (OS_EVR_WAIT_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_THFLAGS_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_THFLAGS_FILTER & 0x0FU, EvtRtxThreadFlagsNo, EvtRtxThreadFlagsNo);
|
|
|
+#if defined(OS_EVR_THFLAGS_FILTER)
|
|
|
+#define OS_EVR_THFLAGS_LEVEL (((OS_EVR_THFLAGS_FILTER & 0x80U) != 0U) ? (OS_EVR_THFLAGS_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_EVFLAGS_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_EVFLAGS_FILTER & 0x0FU, EvtRtxEventFlagsNo, EvtRtxEventFlagsNo);
|
|
|
+#if defined(OS_EVR_EVFLAGS_FILTER)
|
|
|
+#define OS_EVR_EVFLAGS_LEVEL (((OS_EVR_EVFLAGS_FILTER & 0x80U) != 0U) ? (OS_EVR_EVFLAGS_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_TIMER_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_TIMER_FILTER & 0x0FU, EvtRtxTimerNo, EvtRtxTimerNo);
|
|
|
+#if defined(OS_EVR_TIMER_FILTER)
|
|
|
+#define OS_EVR_TIMER_LEVEL (((OS_EVR_TIMER_FILTER & 0x80U) != 0U) ? (OS_EVR_TIMER_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_MUTEX_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_MUTEX_FILTER & 0x0FU, EvtRtxMutexNo, EvtRtxMutexNo);
|
|
|
+#if defined(OS_EVR_MUTEX_FILTER)
|
|
|
+#define OS_EVR_MUTEX_LEVEL (((OS_EVR_MUTEX_FILTER & 0x80U) != 0U) ? (OS_EVR_MUTEX_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_SEMAPHORE_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_SEMAPHORE_FILTER & 0x0FU, EvtRtxSemaphoreNo, EvtRtxSemaphoreNo);
|
|
|
+#if defined(OS_EVR_SEMAPHORE_FILTER)
|
|
|
+#define OS_EVR_SEMAPHORE_LEVEL (((OS_EVR_SEMAPHORE_FILTER & 0x80U) != 0U) ? (OS_EVR_SEMAPHORE_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_MEMPOOL_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_MEMPOOL_FILTER & 0x0FU, EvtRtxMemoryPoolNo, EvtRtxMemoryPoolNo);
|
|
|
+#if defined(OS_EVR_MEMPOOL_FILTER)
|
|
|
+#define OS_EVR_MEMPOOL_LEVEL (((OS_EVR_MEMPOOL_FILTER & 0x80U) != 0U) ? (OS_EVR_MEMPOOL_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
-#if ((OS_EVR_MSGQUEUE_FILTER & 0x80U) != 0U)
|
|
|
- (void)EventRecorderEnable(OS_EVR_MSGQUEUE_FILTER & 0x0FU, EvtRtxMessageQueueNo, EvtRtxMessageQueueNo);
|
|
|
+#if defined(OS_EVR_MSGQUEUE_FILTER)
|
|
|
+#define OS_EVR_MSGQUEUE_LEVEL (((OS_EVR_MSGQUEUE_FILTER & 0x80U) != 0U) ? (OS_EVR_MSGQUEUE_FILTER & 0x0FU) : 0U)
|
|
|
#endif
|
|
|
+
|
|
|
+#if defined(RTE_Compiler_EventRecorder)
|
|
|
+
|
|
|
+// Event Recorder Initialize
|
|
|
+__STATIC_INLINE void evr_initialize (void) {
|
|
|
+
|
|
|
+ (void)EventRecorderInitialize(OS_EVR_LEVEL, (uint32_t)OS_EVR_START);
|
|
|
+
|
|
|
+ (void)EventRecorderDisable(EventRecordAll, EvtRtxMemoryNo, EvtRtxMessageQueueNo);
|
|
|
+
|
|
|
+ (void)EventRecorderEnable(OS_EVR_MEMORY_LEVEL, EvtRtxMemoryNo, EvtRtxMemoryNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_KERNEL_LEVEL, EvtRtxKernelNo, EvtRtxKernelNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_THREAD_LEVEL, EvtRtxThreadNo, EvtRtxThreadNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_WAIT_LEVEL, EvtRtxWaitNo, EvtRtxWaitNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_THFLAGS_LEVEL, EvtRtxThreadFlagsNo, EvtRtxThreadFlagsNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_EVFLAGS_LEVEL, EvtRtxEventFlagsNo, EvtRtxEventFlagsNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_TIMER_LEVEL, EvtRtxTimerNo, EvtRtxTimerNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_MUTEX_LEVEL, EvtRtxMutexNo, EvtRtxMutexNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_SEMAPHORE_LEVEL, EvtRtxSemaphoreNo, EvtRtxSemaphoreNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_MEMPOOL_LEVEL, EvtRtxMemoryPoolNo, EvtRtxMemoryPoolNo);
|
|
|
+ (void)EventRecorderEnable(OS_EVR_MSGQUEUE_LEVEL, EvtRtxMessageQueueNo, EvtRtxMessageQueueNo);
|
|
|
}
|
|
|
|
|
|
#else
|