53 #ifndef __RKHTRC_DEF_H__
54 #define __RKHTRC_DEF_H__
75 #define RKH_CFG_TRC_SIZEOF_TE_ID 8
77 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
78 #define RKH_TRC_TE_ID(teid) \
80 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
81 #define RKH_TRC_TE_ID(teid) \
83 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
84 #define RKH_TRC_TE_ID(teid) \
87 #define RKH_TRC_TE_ID(teid) \
104 #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
105 #define RKH_TRC_AO_ISOFF(prio) \
106 && rkh_trc_symFil_isoff(RKHFilterSma, (RKH_TRC_FSLOT)(prio))
108 #define RKH_TRC_AO_ISOFF(prio)
113 #define RKH_TRC_IS_RESERVED_SIG(sig) \
114 (sig == RKH_COMPLETION_EVENT)
129 #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
130 #define RKH_TRC_SIG_ISOFF(sig) \
131 && (RKH_TRC_IS_RESERVED_SIG(sig) || \
132 rkh_trc_symFil_isoff(RKHFilterSignal, (RKH_TRC_FSLOT)(sig)))
134 #define RKH_TRC_SIG_ISOFF(sig)
138 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
139 #define RKH_NBITS_GROUP 3
140 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
141 #define RKH_NBITS_GROUP 8
142 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
143 #define RKH_NBITS_GROUP 8
145 #define RKH_NBITS_GROUP 3
148 #define RKH_NBIT_EVENT_PER_GROUP (RKH_CFG_TRC_SIZEOF_TE_ID - \
150 #define RKH_TRC_MAX_GROUPS RKH_BIT(RKH_NBITS_GROUP)
151 #define RKH_MAX_NUM_TE_PER_GROUP RKH_BIT(RKH_NBIT_EVENT_PER_GROUP)
152 #define NGSH RKH_NBIT_EVENT_PER_GROUP
153 #define RKH_GRP_MASK \
154 (RKH_TE_ID_T)((RKH_BIT(RKH_NBITS_GROUP) - 1) << \
155 RKH_NBIT_EVENT_PER_GROUP)
156 #define RKH_TE_MASK \
157 (RKH_TE_ID_T)(RKH_BIT(RKH_NBIT_EVENT_PER_GROUP) - 1)
165 #define RKH_TRC_MAX_EVENTS \
166 (RKH_MAX_NUM_TE_PER_GROUP * RKH_TRC_MAX_GROUPS)
168 #if ((RKH_CFG_FWK_MAX_SMA & (8 - 1)) == 0)
174 #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8)
176 #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8 + 1)
179 #if ((RKH_CFG_FWK_MAX_SIGNALS & (8 - 1)) == 0)
185 #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8)
187 #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8 + 1)
207 #define RKH_MP_START GRPLSH(RKH_TG_MP)
208 #define RKH_QUE_START GRPLSH(RKH_TG_QUE)
209 #define RKH_SMA_START GRPLSH(RKH_TG_SMA)
210 #define RKH_SM_START GRPLSH(RKH_TG_SM)
211 #define RKH_TMR_START GRPLSH(RKH_TG_TMR)
212 #define RKH_FWK_START GRPLSH(RKH_TG_FWK)
213 #define RKH_USR_START GRPLSH(RKH_TG_USR)
214 #define RKH_UT_START GRPLSH(RKH_TG_UT)
223 #define RKH_MP_TTBL_RANGE 1
224 #define RKH_QUE_TTBL_RANGE 1
225 #define RKH_SMA_TTBL_RANGE 2
226 #define RKH_SM_TTBL_RANGE 3
227 #define RKH_TIM_TTBL_RANGE 1
228 #define RKH_FWK_TTBL_RANGE 3
229 #define RKH_USR_TTBL_RANGE 4
230 #define RKH_UT_TTBL_RANGE 2
236 #define RKH_TOT_NUM_TRC_EVTS \
237 (RKH_MP_TTBL_RANGE + \
238 RKH_QUE_TTBL_RANGE + \
239 RKH_SMA_TTBL_RANGE + \
240 RKH_SM_TTBL_RANGE + \
241 RKH_TIM_TTBL_RANGE + \
242 RKH_FWK_TTBL_RANGE + \
243 RKH_USR_TTBL_RANGE + \
251 #if (RKH_TOT_NUM_TRC_EVTS <= RKH_TOT_NUM_TRC_EVTS)
252 #define RKH_TRC_MAX_EVENTS_IN_BYTES RKH_TOT_NUM_TRC_EVTS
254 #error "rkhtrc.h, the total number of trace events represented"
255 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
258 #define RKH_MP_TTBL_OFFSET 0
259 #define RKH_QUE_TTBL_OFFSET (RKH_MP_TTBL_OFFSET + RKH_MP_TTBL_RANGE)
260 #define RKH_SMA_TTBL_OFFSET (RKH_QUE_TTBL_OFFSET + RKH_QUE_TTBL_RANGE)
261 #define RKH_SM_TTBL_OFFSET (RKH_SMA_TTBL_OFFSET + RKH_SMA_TTBL_RANGE)
262 #define RKH_TIM_TTBL_OFFSET (RKH_SM_TTBL_OFFSET + RKH_SM_TTBL_RANGE)
263 #define RKH_FWK_TTBL_OFFSET (RKH_TIM_TTBL_OFFSET + RKH_TIM_TTBL_RANGE)
264 #define RKH_USR_TTBL_OFFSET (RKH_FWK_TTBL_OFFSET + RKH_FWK_TTBL_RANGE)
265 #define RKH_UT_TTBL_OFFSET (RKH_USR_TTBL_OFFSET + RKH_USR_TTBL_RANGE)
267 #define GRPLSH(grp) \
269 (((grp) & (RKH_TRC_MAX_GROUPS - 1)) << NGSH)
271 #define EXTE(te, grp) \
272 (RKH_TE_ID_T)((te) - GRPLSH(grp))
275 (RKH_TG_T)(((e) & RKH_GRP_MASK) >> RKH_NBIT_EVENT_PER_GROUP)
277 (RKH_TE_ID_T)((e) & RKH_TE_MASK)
286 #define RKH_TRC_ALL_GROUPS RKH_TG_NGROUP
292 #define RKH_TRC_ALL_EVENTS RKH_TE_NEVENT
298 #define RKH_TRC_SET_ALL(mode_) \
299 ((mode_) | RKH_TRC_ALL_FILTERS)
301 #define RKH_TRC_ALL_FILTERS 0x80
302 #define RKH_FILTER_MODE_MASK ~RKH_TRC_ALL_FILTERS
339 #define RKH_TG_NGROUP 8
343 #define RKH_TE_MP_INIT RKH_MP_START
345 #define RKH_TE_MP_GET (RKH_TE_MP_INIT + 1)
347 #define RKH_TE_MP_PUT (RKH_TE_MP_GET + 1)
348 #define RKH_MP_END RKH_TE_MP_PUT
352 #define RKH_TE_QUE_INIT RKH_QUE_START
354 #define RKH_TE_QUE_GET (RKH_TE_QUE_INIT + 1)
356 #define RKH_TE_QUE_FIFO (RKH_TE_QUE_GET + 1)
358 #define RKH_TE_QUE_LIFO (RKH_TE_QUE_FIFO + 1)
360 #define RKH_TE_QUE_FULL (RKH_TE_QUE_LIFO + 1)
362 #define RKH_TE_QUE_DPT (RKH_TE_QUE_FULL + 1)
364 #define RKH_TE_QUE_GET_LAST (RKH_TE_QUE_DPT +1 )
365 #define RKH_QUE_END RKH_TE_QUE_GET_LAST
369 #define RKH_TE_SMA_ACT RKH_SMA_START
371 #define RKH_TE_SMA_TERM (RKH_TE_SMA_ACT + 1)
373 #define RKH_TE_SMA_GET (RKH_TE_SMA_TERM + 1)
375 #define RKH_TE_SMA_FIFO (RKH_TE_SMA_GET + 1)
377 #define RKH_TE_SMA_LIFO (RKH_TE_SMA_FIFO + 1)
379 #define RKH_TE_SMA_REG (RKH_TE_SMA_LIFO + 1)
381 #define RKH_TE_SMA_UNREG (RKH_TE_SMA_REG + 1)
383 #define RKH_TE_SMA_DEFER (RKH_TE_SMA_UNREG + 1)
385 #define RKH_TE_SMA_RCALL (RKH_TE_SMA_DEFER + 1)
386 #define RKH_SMA_END RKH_TE_SMA_RCALL
390 #define RKH_TE_SM_INIT RKH_SM_START
392 #define RKH_TE_SM_CLRH (RKH_TE_SM_INIT + 1)
394 #define RKH_TE_SM_TRN (RKH_TE_SM_CLRH + 1)
396 #define RKH_TE_SM_STATE (RKH_TE_SM_TRN + 1)
398 #define RKH_TE_SM_ENSTATE (RKH_TE_SM_STATE + 1)
400 #define RKH_TE_SM_EXSTATE (RKH_TE_SM_ENSTATE + 1)
402 #define RKH_TE_SM_NENEX (RKH_TE_SM_EXSTATE + 1)
404 #define RKH_TE_SM_NTRNACT (RKH_TE_SM_NENEX + 1)
406 #define RKH_TE_SM_TS_STATE (RKH_TE_SM_NTRNACT + 1)
408 #define RKH_TE_SM_EVT_PROC (RKH_TE_SM_TS_STATE + 1)
410 #define RKH_TE_SM_EVT_NFOUND (RKH_TE_SM_EVT_PROC + 1)
412 #define RKH_TE_SM_GRD_FALSE (RKH_TE_SM_EVT_NFOUND + 1)
414 #define RKH_TE_SM_CND_NFOUND (RKH_TE_SM_GRD_FALSE + 1)
416 #define RKH_TE_SM_UNKN_STATE (RKH_TE_SM_CND_NFOUND + 1)
418 #define RKH_TE_SM_EX_HLEVEL (RKH_TE_SM_UNKN_STATE + 1)
420 #define RKH_TE_SM_EX_TSEG (RKH_TE_SM_EX_HLEVEL + 1)
422 #define RKH_TE_SM_EXE_ACT (RKH_TE_SM_EX_TSEG + 1)
424 #define RKH_TE_SM_DCH (RKH_TE_SM_EXE_ACT + 1)
425 #define RKH_SM_END RKH_TE_SM_DCH
429 #define RKH_TE_TMR_INIT RKH_TMR_START
431 #define RKH_TE_TMR_START (RKH_TE_TMR_INIT + 1)
433 #define RKH_TE_TMR_STOP (RKH_TE_TMR_START + 1)
435 #define RKH_TE_TMR_TOUT (RKH_TE_TMR_STOP + 1)
437 #define RKH_TE_TMR_REM (RKH_TE_TMR_TOUT + 1)
438 #define RKH_TMR_END RKH_TE_TMR_REM
442 #define RKH_TE_FWK_EN RKH_FWK_START
444 #define RKH_TE_FWK_EX (RKH_TE_FWK_EN + 1)
446 #define RKH_TE_FWK_EPREG (RKH_TE_FWK_EX + 1)
448 #define RKH_TE_FWK_AE (RKH_TE_FWK_EPREG + 1)
450 #define RKH_TE_FWK_GC (RKH_TE_FWK_AE + 1)
452 #define RKH_TE_FWK_GCR (RKH_TE_FWK_GC + 1)
454 #define RKH_TE_FWK_OBJ (RKH_TE_FWK_GCR + 1)
456 #define RKH_TE_FWK_SIG (RKH_TE_FWK_OBJ + 1)
458 #define RKH_TE_FWK_FUN (RKH_TE_FWK_SIG + 1)
460 #define RKH_TE_FWK_EXE_FUN (RKH_TE_FWK_FUN + 1)
462 #define RKH_TE_FWK_SYNC_EVT (RKH_TE_FWK_EXE_FUN + 1)
464 #define RKH_TE_FWK_TUSR (RKH_TE_FWK_SYNC_EVT + 1)
466 #define RKH_TE_FWK_TCFG (RKH_TE_FWK_TUSR + 1)
468 #define RKH_TE_FWK_ASSERT (RKH_TE_FWK_TCFG + 1)
470 #define RKH_TE_FWK_AO (RKH_TE_FWK_ASSERT + 1)
472 #define RKH_TE_FWK_STATE (RKH_TE_FWK_AO + 1)
474 #define RKH_TE_FWK_PSTATE (RKH_TE_FWK_STATE + 1)
476 #define RKH_TE_FWK_TIMER (RKH_TE_FWK_PSTATE + 1)
478 #define RKH_TE_FWK_EPOOL (RKH_TE_FWK_TIMER + 1)
480 #define RKH_TE_FWK_QUEUE (RKH_TE_FWK_EPOOL + 1)
482 #define RKH_TE_FWK_ACTOR (RKH_TE_FWK_QUEUE + 1)
483 #define RKH_FWK_END RKH_TE_FWK_ACTOR
486 #define RKH_TE_USER RKH_USR_START
489 #define RKH_TE_UT_INIT RKH_UT_START
490 #define RKH_TE_UT_CLEANUP (RKH_TE_UT_INIT + 1)
491 #define RKH_TE_UT_VERIFY (RKH_TE_UT_CLEANUP + 1)
492 #define RKH_TE_UT_IGNORE_GROUP (RKH_TE_UT_VERIFY + 1)
493 #define RKH_TE_UT_EXPECT (RKH_TE_UT_IGNORE_GROUP + 1)
494 #define RKH_TE_UT_EXPECT_ANYARGS (RKH_TE_UT_EXPECT + 1)
495 #define RKH_TE_UT_IGNORE (RKH_TE_UT_EXPECT_ANYARGS + 1)
496 #define RKH_TE_UT_IGNORE_ARG (RKH_TE_UT_IGNORE + 1)
497 #define RKH_TE_UT_SUCCESS (RKH_TE_UT_IGNORE_ARG + 1)
498 #define RKH_TE_UT_FAIL (RKH_TE_UT_SUCCESS + 1)
499 #define RKH_UT_END RKH_TE_UT_IGNORE_ARG
502 #define RKH_TE_NEVENT (RKH_UT_END + 1)
515 #if ((RKH_MP_END - RKH_MP_START) > ((RKH_MP_TTBL_RANGE * 8) - 1))
516 #error "rkhtrc.h, the total number of trace events represented"
517 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
520 #if ((RKH_QUE_END - RKH_QUE_START) > ((RKH_QUE_TTBL_RANGE * 8) - 1))
521 #error "rkhtrc.h, the total number of trace events represented"
522 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
525 #if ((RKH_SMA_END - RKH_SMA_START) > ((RKH_SMA_TTBL_RANGE * 8) - 1))
526 #error "rkhtrc.h, the total number of trace events represented"
527 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
530 #if ((RKH_SM_END - RKH_SM_START) > ((RKH_SM_TTBL_RANGE * 8) - 1))
531 #error "rkhtrc.h, the total number of trace events represented"
532 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
535 #if ((RKH_TMR_END - RKH_TMR_START) > ((RKH_TIM_TTBL_RANGE * 8) - 1))
536 #error "rkhtrc.h, the total number of trace events represented"
537 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
540 #if ((RKH_FWK_END - RKH_FWK_START) > ((RKH_FWK_TTBL_RANGE * 8) - 1))
541 #error "rkhtrc.h, the total number of trace events represented"
542 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
545 #if ((RKH_UT_END - RKH_UT_START) > ((RKH_UT_TTBL_RANGE * 8) - 1))
546 #error "rkhtrc.h, the total number of trace events represented"
547 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
550 #if RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
571 #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
572 if (rkh_trc_isoff_(eid_) \
573 RKH_TRC_AO_ISOFF(prio_) \
574 RKH_TRC_SIG_ISOFF(sig_)) \
576 RKH_ENTER_CRITICAL_(); \
579 #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
580 if (rkh_trc_isoff_(eid_) \
581 RKH_TRC_SIG_ISOFF(sig_)) \
583 RKH_ENTER_CRITICAL_(); \
586 #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
587 if (rkh_trc_isoff_(eid_) \
588 RKH_TRC_AO_ISOFF(prio_)) \
590 RKH_ENTER_CRITICAL_(); \
593 #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
594 if (rkh_trc_isoff_(eid_)) \
596 RKH_ENTER_CRITICAL_(); \
609 #define RKH_TRC_END() \
611 RKH_EXIT_CRITICAL_(); \
622 #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
623 if (rkh_trc_isoff_(eid_) \
624 RKH_TRC_AO_ISOFF(prio_) \
625 RKH_TRC_SIG_ISOFF(sig_)) \
637 #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
638 if (rkh_trc_isoff_(eid_) \
639 RKH_TRC_SIG_ISOFF(sig_)) \
651 #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
652 if (rkh_trc_isoff_(eid_) \
653 RKH_TRC_AO_ISOFF(prio_)) \
664 #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
665 if (rkh_trc_isoff_(eid_)) \
672 #define RKH_TRC_END_NOCRIT() \
676 #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
677 RKH_ENTER_CRITICAL_(); \
680 #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
681 RKH_ENTER_CRITICAL_(); \
684 #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
685 RKH_ENTER_CRITICAL_(); \
688 #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
689 RKH_ENTER_CRITICAL_(); \
692 #define RKH_TRC_END() \
694 RKH_EXIT_CRITICAL_();
696 #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
699 #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
702 #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
705 #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
708 #define RKH_TRC_END_NOCRIT() \
716 #define RKH_TRC_BEGIN_WOFIL(eid_) \
718 RKH_ENTER_CRITICAL_(); \
725 #define RKH_TRC_END_WOFIL() \
727 RKH_EXIT_CRITICAL_();
732 #define RKH_TRC_BEGIN_WOFIL_NOCRIT(eid_) \
739 #define RKH_TRC_END_WOFIL_NOCRIT() \
746 #define RKH_TRC_BEGIN_DFT(eid_) \
748 RKH_ENTER_CRITICAL_(); \
749 rkh_trc_clear_chk(); \
756 #define RKH_TRC_END_DFT() \
758 RKH_EXIT_CRITICAL_();
764 #define RKH_TRC_U8_RAW(d) \
771 #define RKH_TRC_UI8(d) \
772 rkh_trc_u8((rui8_t)(d))
778 #define RKH_TRC_UI16(d) \
785 #define RKH_TRC_UI32(d) \
792 #define RKH_TRC_STR(s) \
795 #if RKH_CFG_TRC_USER_TRACE_EN == RKH_ENABLED
799 #define RKH_TRC_USR_BEGIN(eid_) \
801 if (rkh_trc_isoff_(eid_)) \
803 RKH_ENTER_CRITICAL_(); \
809 #define RKH_TRC_USR_END() \
811 RKH_EXIT_CRITICAL_(); \
818 #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) \
819 if (rkh_trc_isoff_(eid_)) \
826 #define RKH_TRC_USR_END_NOCRIT() \
834 #define RKH_TUSR_I8(w_, d_) \
835 rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I8_T, \
842 #define RKH_TUSR_UI8(w_, d_) \
843 rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI8_T, \
850 #define RKH_TUSR_I16(w_, d_) \
851 rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I16_T, \
858 #define RKH_TUSR_UI16(w_, d_) \
859 rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI16_T, \
866 #define RKH_TUSR_I32(w_, d_) \
867 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I32_T, \
874 #define RKH_TUSR_UI32(w_, d_) \
875 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI32_T, \
882 #define RKH_TUSR_X32(w_, d_) \
883 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_X32_T, \
890 #define RKH_TUSR_STR(s_) \
891 rkh_trc_fmt_str((s_))
898 #define RKH_TUSR_MEM(mem_, size_) \
899 rkh_trc_fmt_mem((mem_), (size_))
905 #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
906 #define RKH_TUSR_OBJ(obj_) \
907 rkh_trc_fmt_u16((rui8_t)RKH_OBJ_T, (rui16_t)(obj_))
908 #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
909 #define RKH_TUSR_OBJ(obj_) \
910 rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
912 #define RKH_TUSR_OBJ(obj_) \
913 rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
920 #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16u
921 #define RKH_TUSR_FUN(fun_) \
922 rkh_trc_fmt_u16((rui8_t)RKH_FUN_T, (rui16_t)(fun_))
923 #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
924 #define RKH_TUSR_FUN(fun_) \
925 rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
927 #define RKH_TUSR_FUN(fun_) \
928 rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
935 #if RKH_CFG_FWK_SIZEOF_EVT == 8
936 #define RKH_TUSR_SIG(sig_) \
937 rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
938 #elif RKH_CFG_FWK_SIZEOF_EVT == 16
939 #define RKH_TUSR_SIG(sig_) \
940 rkh_trc_fmt_u16((rui8_t)RKH_ESIG_T, (rui16_t)(sig_))
941 #elif RKH_CFG_FWK_SIZEOF_EVT == 32
942 #define RKH_TUSR_SIG(sig_) \
943 rkh_trc_fmt_u32((rui8_t)RKH_ESIG_T, (rui32_t)(sig_))
945 #define RKH_TUSR_SIG(sig_) \
946 rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
949 #define RKH_TRC_USR_BEGIN(eid_) (void)0;
950 #define RKH_TRC_USR_END() (void)0
951 #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) (void)0
952 #define RKH_TRC_USR_END_NOCRIT() (void)0
953 #define RKH_TUSR_I8(w_, d_) (void)0
954 #define RKH_TUSR_UI8(w_, d_) (void)0
955 #define RKH_TUSR_I16(w_, d_) (void)0
956 #define RKH_TUSR_UI16(w_, d_) (void)0
957 #define RKH_TUSR_I32(w_, d_) (void)0
958 #define RKH_TUSR_UI32(w_, d_) (void)0
959 #define RKH_TUSR_X32(w_, d_) (void)0
960 #define RKH_TUSR_STR(s_) (void)0
961 #define RKH_TUSR_MEM(mem_, size_) (void)0
962 #define RKH_TUSR_OBJ(obj_) (void)0
963 #define RKH_TUSR_FUN(fun_) (void)0
964 #define RKH_TUSR_SIG(sig_) (void)0
971 #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
972 #define RKH_TRC_SYM(sym) \
973 RKH_TRC_UI16((rui16_t)sym)
974 #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
975 #define RKH_TRC_SYM(sym) \
976 RKH_TRC_UI32((rui32_t)sym)
978 #define RKH_TRC_SYM(sym) \
979 RKH_TRC_UI32((rui32_t)sym)
986 #if defined(RKH_USE_TRC_SENDER)
987 #define RKH_TRC_SNDR(sym) \
990 #define RKH_TRC_SNDR(sym)
997 #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16
998 #define RKH_TRC_FUN(sym) \
999 RKH_TRC_UI16((rui16_t)sym)
1000 #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
1001 #define RKH_TRC_FUN(sym) \
1002 RKH_TRC_UI32((rui32_t)sym)
1004 #define RKH_TRC_FUN(sym) \
1005 RKH_TRC_UI32((rui32_t)sym)
1011 #if RKH_CFG_TMR_SIZEOF_NTIMER == 8
1012 #define RKH_TRC_NTICK(nt) \
1014 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 16
1015 #define RKH_TRC_NTICK(nt) \
1017 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 32
1018 #define RKH_TRC_NTICK(nt) \
1021 #define RKH_TRC_NTICK(nt) \
1028 #if RKH_CFG_MP_SIZEOF_NBLOCK == 8
1029 #define RKH_TRC_NBLK(nb) \
1031 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1032 #define RKH_TRC_MP_NMIN(nm) \
1035 #define RKH_TRC_MP_NMIN(nm)
1037 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 16
1038 #define RKH_TRC_NBLK(nb) \
1040 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1041 #define RKH_TRC_MP_NMIN(nm) \
1044 #define RKH_TRC_MP_NMIN(nm)
1046 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 32
1047 #define RKH_TRC_NBLK(nb) \
1049 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1050 #define RKH_TRC_MP_NMIN(nm) \
1053 #define RKH_TRC_MP_NMIN(nm)
1056 #define RKH_TRC_NBLK(nb) \
1058 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1059 #define RKH_TRC_MP_NMIN(nm) \
1062 #define RKH_TRC_MP_NMIN(nm)
1069 #if RKH_CFG_MP_SIZEOF_BSIZE == 8
1070 #define RKH_TRC_BSIZE(bs) \
1072 #elif RKH_CFG_MP_SIZEOF_BSIZE == 16
1073 #define RKH_TRC_BSIZE(bs) \
1075 #elif RKH_CFG_MP_SIZEOF_BSIZE == 32
1076 #define RKH_TRC_BSIZE(bs) \
1079 #define RKH_TRC_BSIZE(bs) \
1086 #if RKH_CFG_QUE_SIZEOF_NELEM == 8
1087 #define RKH_TRC_NE(ne) \
1089 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1090 #define RKH_TRC_QUE_NMIN(nm) \
1093 #define RKH_TRC_QUE_NMIN(nm)
1095 #elif RKH_CFG_QUE_SIZEOF_NELEM == 16
1096 #define RKH_TRC_NE(ne) \
1098 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1099 #define RKH_TRC_QUE_NMIN(nm) \
1102 #define RKH_TRC_QUE_NMIN(nm)
1104 #elif RKH_CFG_QUE_SIZEOF_NELEM == 32
1105 #define RKH_TRC_NE(ne) \
1107 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1108 #define RKH_TRC_QUE_NMIN(nm) \
1111 #define RKH_TRC_QUE_NMIN(nm)
1114 #define RKH_TRC_NE(ne) \
1116 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1117 #define RKH_TRC_QUE_NMIN(nm) \
1120 #define RKH_TRC_QUE_NMIN(nm)
1127 #if RKH_CFG_FWK_SIZEOF_EVT == 8
1128 #define RKH_TRC_SIG(e) \
1130 #elif RKH_CFG_FWK_SIZEOF_EVT == 16
1131 #define RKH_TRC_SIG(e) \
1133 #elif RKH_CFG_FWK_SIZEOF_EVT == 32
1134 #define RKH_TRC_SIG(e) \
1137 #define RKH_TRC_SIG(e) \
1144 #if RKH_CFG_FWK_SIZEOF_EVT_SIZE == 8
1145 #define RKH_TRC_ES(es) \
1147 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 16
1148 #define RKH_TRC_ES(es) \
1150 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 32
1151 #define RKH_TRC_ES(es) \
1154 #define RKH_TRC_ES(es) \
1214 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
1216 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
1218 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
1231 #if RKH_CFG_TRC_TSTAMP_EN == RKH_ENABLED
1232 #if RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 8
1234 #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 16
1236 #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 32
1245 #if RKH_CFG_TRC_SIZEOF_STREAM < 255u
1246 typedef rui8_t TRCQTY_T;
1248 typedef rui16_t TRCQTY_T;
1271 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
1272 typedef rui8_t RKH_GM_OFFSET_T;
1273 typedef rui8_t RKH_GM_RANGE_T;
1274 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
1275 typedef rui16_t RKH_GM_OFFSET_T;
1276 typedef rui8_t RKH_GM_RANGE_T;
1277 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
1278 typedef rui32_t RKH_GM_OFFSET_T;
1279 typedef rui32_t RKH_GM_RANGE_T;
1281 typedef rui8_t RKH_GM_OFFSET_T;
1282 typedef rui8_t RKH_GM_RANGE_T;
1287 RKH_GM_OFFSET_T offset;
1288 RKH_GM_RANGE_T range;
RKH engine interface.This header file is directly included in RKH interface file, rkh....
rui8_t RKH_TG_T
Group of events.
RKH_TRC_FMT
Enumerates data formats recognized by Trazer.
rui32_t RKH_TS_T
Defines the size of trace timestamp.
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
RKH_SUBTE_SM_EXE_ACT
Sub-event of RKH_TE_SM_EXE_ACT event.
@ RKH_SUBTE_SM_EXE_ACT_EX
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...
@ RKH_SUBTE_SM_EXE_ACT_PP
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...
@ RKH_SUBTE_SM_EXE_ACT_EN
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...
@ RKH_SUBTE_SM_EXE_ACT_EFF
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...
@ RKH_SUBTE_SM_EXE_ACT_INI
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...
@ RKH_SUBTE_SM_EXE_ACT_GRD
Executes a behavior (action) of state machine, it could be an entry, exit, effect,...