@@ -360,69 +360,57 @@ __attribute__((section(".bss.os.msgqueue.mem")));
360360
361361#if (defined(OS_EVR_INIT ) && (OS_EVR_INIT != 0 ))
362362
363- // Initial Thread configuration covered also Thread Flags and Generic Wait
364- #if defined(OS_EVR_THREAD_FILTER )
365- #if !defined(OS_EVR_THFLAGS_FILTER )
366- #define OS_EVR_THFLAGS_FILTER OS_EVR_THREAD_FILTER
367- #endif
368- #if !defined(OS_EVR_WAIT_FILTER )
369- #define OS_EVR_WAIT_FILTER OS_EVR_THREAD_FILTER
370- #endif
371- #endif
363+ #ifdef RTE_Compiler_EventRecorder
364+
365+ // Event Recorder Initialize
366+ __STATIC_INLINE void evr_initialize (void ) {
367+
368+ (void )EventRecorderInitialize (OS_EVR_LEVEL , (uint32_t )OS_EVR_START );
372369
373- // Migrate initial filter configuration
374- #if defined( OS_EVR_MEMORY_FILTER )
375- #define OS_EVR_MEMORY_LEVEL (((OS_EVR_MEMORY_FILTER & 0x80U) != 0U) ? (OS_EVR_MEMORY_FILTER & 0x0FU) : 0U)
370+ #if (( OS_EVR_MEMORY_LEVEL & 0x80U ) != 0U )
371+ ( void ) EventRecorderEnable ( OS_EVR_MEMORY_LEVEL & 0x0FU , EvtRtxMemoryNo , EvtRtxMemoryNo );
372+ ( void ) EventRecorderDisable (~ OS_EVR_MEMORY_LEVEL & 0x0FU , EvtRtxMemoryNo , EvtRtxMemoryNo );
376373#endif
377- #if defined(OS_EVR_KERNEL_FILTER )
378- #define OS_EVR_KERNEL_LEVEL (((OS_EVR_KERNEL_FILTER & 0x80U) != 0U) ? (OS_EVR_KERNEL_FILTER & 0x0FU) : 0U)
374+ #if ((OS_EVR_KERNEL_LEVEL & 0x80U ) != 0U )
375+ (void )EventRecorderEnable ( OS_EVR_KERNEL_LEVEL & 0x0FU , EvtRtxKernelNo , EvtRtxKernelNo );
376+ (void )EventRecorderDisable (~OS_EVR_KERNEL_LEVEL & 0x0FU , EvtRtxKernelNo , EvtRtxMemoryNo );
379377#endif
380- #if defined(OS_EVR_THREAD_FILTER )
381- #define OS_EVR_THREAD_LEVEL (((OS_EVR_THREAD_FILTER & 0x80U) != 0U) ? (OS_EVR_THREAD_FILTER & 0x0FU) : 0U)
378+ #if ((OS_EVR_THREAD_LEVEL & 0x80U ) != 0U )
379+ (void )EventRecorderEnable ( OS_EVR_THREAD_LEVEL & 0x0FU , EvtRtxThreadNo , EvtRtxThreadNo );
380+ (void )EventRecorderDisable (~OS_EVR_THREAD_LEVEL & 0x0FU , EvtRtxThreadNo , EvtRtxThreadNo );
382381#endif
383- #if defined(OS_EVR_WAIT_FILTER )
384- #define OS_EVR_WAIT_LEVEL (((OS_EVR_WAIT_FILTER & 0x80U) != 0U) ? (OS_EVR_WAIT_FILTER & 0x0FU) : 0U)
382+ #if ((OS_EVR_WAIT_LEVEL & 0x80U ) != 0U )
383+ (void )EventRecorderEnable ( OS_EVR_WAIT_LEVEL & 0x0FU , EvtRtxWaitNo , EvtRtxWaitNo );
384+ (void )EventRecorderDisable (~OS_EVR_WAIT_LEVEL & 0x0FU , EvtRtxWaitNo , EvtRtxWaitNo );
385385#endif
386- #if defined(OS_EVR_THFLAGS_FILTER )
387- #define OS_EVR_THFLAGS_LEVEL (((OS_EVR_THFLAGS_FILTER & 0x80U) != 0U) ? (OS_EVR_THFLAGS_FILTER & 0x0FU) : 0U)
386+ #if ((OS_EVR_THFLAGS_LEVEL & 0x80U ) != 0U )
387+ (void )EventRecorderEnable ( OS_EVR_THFLAGS_LEVEL & 0x0FU , EvtRtxThreadFlagsNo , EvtRtxThreadFlagsNo );
388+ (void )EventRecorderDisable (~OS_EVR_THFLAGS_LEVEL & 0x0FU , EvtRtxThreadFlagsNo , EvtRtxThreadFlagsNo );
388389#endif
389- #if defined(OS_EVR_EVFLAGS_FILTER )
390- #define OS_EVR_EVFLAGS_LEVEL (((OS_EVR_EVFLAGS_FILTER & 0x80U) != 0U) ? (OS_EVR_EVFLAGS_FILTER & 0x0FU) : 0U)
390+ #if ((OS_EVR_EVFLAGS_LEVEL & 0x80U ) != 0U )
391+ (void )EventRecorderEnable ( OS_EVR_EVFLAGS_LEVEL & 0x0FU , EvtRtxEventFlagsNo , EvtRtxEventFlagsNo );
392+ (void )EventRecorderDisable (~OS_EVR_EVFLAGS_LEVEL & 0x0FU , EvtRtxEventFlagsNo , EvtRtxEventFlagsNo );
391393#endif
392- #if defined(OS_EVR_TIMER_FILTER )
393- #define OS_EVR_TIMER_LEVEL (((OS_EVR_TIMER_FILTER & 0x80U) != 0U) ? (OS_EVR_TIMER_FILTER & 0x0FU) : 0U)
394+ #if ((OS_EVR_TIMER_LEVEL & 0x80U ) != 0U )
395+ (void )EventRecorderEnable ( OS_EVR_TIMER_LEVEL & 0x0FU , EvtRtxTimerNo , EvtRtxTimerNo );
396+ (void )EventRecorderDisable (~OS_EVR_TIMER_LEVEL & 0x0FU , EvtRtxTimerNo , EvtRtxTimerNo );
394397#endif
395- #if defined(OS_EVR_MUTEX_FILTER )
396- #define OS_EVR_MUTEX_LEVEL (((OS_EVR_MUTEX_FILTER & 0x80U) != 0U) ? (OS_EVR_MUTEX_FILTER & 0x0FU) : 0U)
398+ #if ((OS_EVR_MUTEX_LEVEL & 0x80U ) != 0U )
399+ (void )EventRecorderEnable ( OS_EVR_MUTEX_LEVEL & 0x0FU , EvtRtxMutexNo , EvtRtxMutexNo );
400+ (void )EventRecorderDisable (~OS_EVR_MUTEX_LEVEL & 0x0FU , EvtRtxMutexNo , EvtRtxMutexNo );
397401#endif
398- #if defined(OS_EVR_SEMAPHORE_FILTER )
399- #define OS_EVR_SEMAPHORE_LEVEL (((OS_EVR_SEMAPHORE_FILTER & 0x80U) != 0U) ? (OS_EVR_SEMAPHORE_FILTER & 0x0FU) : 0U)
402+ #if ((OS_EVR_SEMAPHORE_LEVEL & 0x80U ) != 0U )
403+ (void )EventRecorderEnable ( OS_EVR_SEMAPHORE_LEVEL & 0x0FU , EvtRtxSemaphoreNo , EvtRtxSemaphoreNo );
404+ (void )EventRecorderDisable (~OS_EVR_SEMAPHORE_LEVEL & 0x0FU , EvtRtxSemaphoreNo , EvtRtxSemaphoreNo );
400405#endif
401- #if defined(OS_EVR_MEMPOOL_FILTER )
402- #define OS_EVR_MEMPOOL_LEVEL (((OS_EVR_MEMPOOL_FILTER & 0x80U) != 0U) ? (OS_EVR_MEMPOOL_FILTER & 0x0FU) : 0U)
406+ #if ((OS_EVR_MEMPOOL_LEVEL & 0x80U ) != 0U )
407+ (void )EventRecorderEnable ( OS_EVR_MEMPOOL_LEVEL & 0x0FU , EvtRtxMemoryPoolNo , EvtRtxMemoryPoolNo );
408+ (void )EventRecorderDisable (~OS_EVR_MEMPOOL_LEVEL & 0x0FU , EvtRtxMemoryPoolNo , EvtRtxMemoryPoolNo );
403409#endif
404- #if defined(OS_EVR_MSGQUEUE_FILTER )
405- #define OS_EVR_MSGQUEUE_LEVEL (((OS_EVR_MSGQUEUE_FILTER & 0x80U) != 0U) ? (OS_EVR_MSGQUEUE_FILTER & 0x0FU) : 0U)
410+ #if ((OS_EVR_MSGQUEUE_LEVEL & 0x80U ) != 0U )
411+ (void )EventRecorderEnable ( OS_EVR_MSGQUEUE_LEVEL & 0x0FU , EvtRtxMessageQueueNo , EvtRtxMessageQueueNo );
412+ (void )EventRecorderDisable (~OS_EVR_MSGQUEUE_LEVEL & 0x0FU , EvtRtxMessageQueueNo , EvtRtxMessageQueueNo );
406413#endif
407-
408- #if defined(RTE_Compiler_EventRecorder )
409-
410- // Event Recorder Initialize
411- __STATIC_INLINE void evr_initialize (void ) {
412-
413- (void )EventRecorderInitialize (OS_EVR_LEVEL , (uint32_t )OS_EVR_START );
414-
415- (void )EventRecorderEnable (OS_EVR_MEMORY_LEVEL , EvtRtxMemoryNo , EvtRtxMemoryNo );
416- (void )EventRecorderEnable (OS_EVR_KERNEL_LEVEL , EvtRtxKernelNo , EvtRtxKernelNo );
417- (void )EventRecorderEnable (OS_EVR_THREAD_LEVEL , EvtRtxThreadNo , EvtRtxThreadNo );
418- (void )EventRecorderEnable (OS_EVR_WAIT_LEVEL , EvtRtxWaitNo , EvtRtxWaitNo );
419- (void )EventRecorderEnable (OS_EVR_THFLAGS_LEVEL , EvtRtxThreadFlagsNo , EvtRtxThreadFlagsNo );
420- (void )EventRecorderEnable (OS_EVR_EVFLAGS_LEVEL , EvtRtxEventFlagsNo , EvtRtxEventFlagsNo );
421- (void )EventRecorderEnable (OS_EVR_TIMER_LEVEL , EvtRtxTimerNo , EvtRtxTimerNo );
422- (void )EventRecorderEnable (OS_EVR_MUTEX_LEVEL , EvtRtxMutexNo , EvtRtxMutexNo );
423- (void )EventRecorderEnable (OS_EVR_SEMAPHORE_LEVEL , EvtRtxSemaphoreNo , EvtRtxSemaphoreNo );
424- (void )EventRecorderEnable (OS_EVR_MEMPOOL_LEVEL , EvtRtxMemoryPoolNo , EvtRtxMemoryPoolNo );
425- (void )EventRecorderEnable (OS_EVR_MSGQUEUE_LEVEL , EvtRtxMessageQueueNo , EvtRtxMessageQueueNo );
426414}
427415
428416#else
0 commit comments