51 #ifndef __RKHTRC_DEF_H__
52 #define __RKHTRC_DEF_H__
73 #define RKH_CFG_TRC_SIZEOF_TE_ID 8
75 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
76 #define RKH_TRC_TE_ID(teid) \
78 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
79 #define RKH_TRC_TE_ID(teid) \
81 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
82 #define RKH_TRC_TE_ID(teid) \
85 #define RKH_TRC_TE_ID(teid) \
102 #if RKH_CFG_TRC_RTFIL_SMA_EN == RKH_ENABLED
103 #define RKH_TRC_AO_ISOFF(prio) \
104 && rkh_trc_symFil_isoff(RKHFilterSma, (RKH_TRC_FSLOT)(prio))
106 #define RKH_TRC_AO_ISOFF(prio)
111 #define RKH_TRC_IS_RESERVED_SIG(sig) \
112 (sig == RKH_COMPLETION_EVENT)
127 #if RKH_CFG_TRC_RTFIL_SIGNAL_EN == RKH_ENABLED
128 #define RKH_TRC_SIG_ISOFF(sig) \
129 && (RKH_TRC_IS_RESERVED_SIG(sig) || \
130 rkh_trc_symFil_isoff(RKHFilterSignal, (RKH_TRC_FSLOT)(sig)))
132 #define RKH_TRC_SIG_ISOFF(sig)
136 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
137 #define RKH_NBITS_GROUP 3
138 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
139 #define RKH_NBITS_GROUP 8
140 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
141 #define RKH_NBITS_GROUP 8
143 #define RKH_NBITS_GROUP 3
146 #define RKH_NBIT_EVENT_PER_GROUP (RKH_CFG_TRC_SIZEOF_TE_ID - \
148 #define RKH_TRC_MAX_GROUPS RKH_BIT(RKH_NBITS_GROUP)
149 #define RKH_MAX_NUM_TE_PER_GROUP RKH_BIT(RKH_NBIT_EVENT_PER_GROUP)
150 #define NGSH RKH_NBIT_EVENT_PER_GROUP
151 #define RKH_GRP_MASK \
152 (RKH_TE_ID_T)((RKH_BIT(RKH_NBITS_GROUP) - 1) << \
153 RKH_NBIT_EVENT_PER_GROUP)
154 #define RKH_TE_MASK \
155 (RKH_TE_ID_T)(RKH_BIT(RKH_NBIT_EVENT_PER_GROUP) - 1)
163 #define RKH_TRC_MAX_EVENTS \
164 (RKH_MAX_NUM_TE_PER_GROUP * RKH_TRC_MAX_GROUPS)
166 #if ((RKH_CFG_FWK_MAX_SMA & (8 - 1)) == 0)
172 #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8)
174 #define RKH_TRC_MAX_SMA (RKH_CFG_FWK_MAX_SMA / 8 + 1)
177 #if ((RKH_CFG_FWK_MAX_SIGNALS & (8 - 1)) == 0)
183 #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8)
185 #define RKH_TRC_MAX_SIGNALS (RKH_CFG_FWK_MAX_SIGNALS / 8 + 1)
205 #define RKH_MP_START GRPLSH(RKH_TG_MP)
206 #define RKH_QUE_START GRPLSH(RKH_TG_QUE)
207 #define RKH_SMA_START GRPLSH(RKH_TG_SMA)
208 #define RKH_SM_START GRPLSH(RKH_TG_SM)
209 #define RKH_TMR_START GRPLSH(RKH_TG_TMR)
210 #define RKH_FWK_START GRPLSH(RKH_TG_FWK)
211 #define RKH_USR_START GRPLSH(RKH_TG_USR)
212 #define RKH_UT_START GRPLSH(RKH_TG_UT)
221 #define RKH_MP_TTBL_RANGE 1
222 #define RKH_QUE_TTBL_RANGE 1
223 #define RKH_SMA_TTBL_RANGE 2
224 #define RKH_SM_TTBL_RANGE 3
225 #define RKH_TIM_TTBL_RANGE 1
226 #define RKH_FWK_TTBL_RANGE 3
227 #define RKH_USR_TTBL_RANGE 4
228 #define RKH_UT_TTBL_RANGE 2
234 #define RKH_TOT_NUM_TRC_EVTS \
235 (RKH_MP_TTBL_RANGE + \
236 RKH_QUE_TTBL_RANGE + \
237 RKH_SMA_TTBL_RANGE + \
238 RKH_SM_TTBL_RANGE + \
239 RKH_TIM_TTBL_RANGE + \
240 RKH_FWK_TTBL_RANGE + \
241 RKH_USR_TTBL_RANGE + \
249 #if (RKH_TOT_NUM_TRC_EVTS <= RKH_TOT_NUM_TRC_EVTS)
250 #define RKH_TRC_MAX_EVENTS_IN_BYTES RKH_TOT_NUM_TRC_EVTS
252 #error "rkhtrc.h, the total number of trace events represented"
253 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
256 #define RKH_MP_TTBL_OFFSET 0
257 #define RKH_QUE_TTBL_OFFSET (RKH_MP_TTBL_OFFSET + RKH_MP_TTBL_RANGE)
258 #define RKH_SMA_TTBL_OFFSET (RKH_QUE_TTBL_OFFSET + RKH_QUE_TTBL_RANGE)
259 #define RKH_SM_TTBL_OFFSET (RKH_SMA_TTBL_OFFSET + RKH_SMA_TTBL_RANGE)
260 #define RKH_TIM_TTBL_OFFSET (RKH_SM_TTBL_OFFSET + RKH_SM_TTBL_RANGE)
261 #define RKH_FWK_TTBL_OFFSET (RKH_TIM_TTBL_OFFSET + RKH_TIM_TTBL_RANGE)
262 #define RKH_USR_TTBL_OFFSET (RKH_FWK_TTBL_OFFSET + RKH_FWK_TTBL_RANGE)
263 #define RKH_UT_TTBL_OFFSET (RKH_USR_TTBL_OFFSET + RKH_USR_TTBL_RANGE)
265 #define GRPLSH(grp) \
267 (((grp) & (RKH_TRC_MAX_GROUPS - 1)) << NGSH)
269 #define EXTE(te, grp) \
270 (RKH_TE_ID_T)((te) - GRPLSH(grp))
273 (RKH_TG_T)(((e) & RKH_GRP_MASK) >> RKH_NBIT_EVENT_PER_GROUP)
275 (RKH_TE_ID_T)((e) & RKH_TE_MASK)
284 #define RKH_TRC_ALL_GROUPS RKH_TG_NGROUP
290 #define RKH_TRC_ALL_EVENTS RKH_TE_NEVENT
296 #define RKH_TRC_SET_ALL(mode_) \
297 ((mode_) | RKH_TRC_ALL_FILTERS)
299 #define RKH_TRC_ALL_FILTERS 0x80
300 #define RKH_FILTER_MODE_MASK ~RKH_TRC_ALL_FILTERS
337 #define RKH_TG_NGROUP 8
341 #define RKH_TE_MP_INIT RKH_MP_START
343 #define RKH_TE_MP_GET (RKH_TE_MP_INIT + 1)
345 #define RKH_TE_MP_PUT (RKH_TE_MP_GET + 1)
346 #define RKH_MP_END RKH_TE_MP_PUT
350 #define RKH_TE_QUE_INIT RKH_QUE_START
352 #define RKH_TE_QUE_GET (RKH_TE_QUE_INIT + 1)
354 #define RKH_TE_QUE_FIFO (RKH_TE_QUE_GET + 1)
356 #define RKH_TE_QUE_LIFO (RKH_TE_QUE_FIFO + 1)
358 #define RKH_TE_QUE_FULL (RKH_TE_QUE_LIFO + 1)
360 #define RKH_TE_QUE_DPT (RKH_TE_QUE_FULL + 1)
362 #define RKH_TE_QUE_GET_LAST (RKH_TE_QUE_DPT +1 )
363 #define RKH_QUE_END RKH_TE_QUE_GET_LAST
367 #define RKH_TE_SMA_ACT RKH_SMA_START
369 #define RKH_TE_SMA_TERM (RKH_TE_SMA_ACT + 1)
371 #define RKH_TE_SMA_GET (RKH_TE_SMA_TERM + 1)
373 #define RKH_TE_SMA_FIFO (RKH_TE_SMA_GET + 1)
375 #define RKH_TE_SMA_LIFO (RKH_TE_SMA_FIFO + 1)
377 #define RKH_TE_SMA_REG (RKH_TE_SMA_LIFO + 1)
379 #define RKH_TE_SMA_UNREG (RKH_TE_SMA_REG + 1)
381 #define RKH_TE_SMA_DEFER (RKH_TE_SMA_UNREG + 1)
383 #define RKH_TE_SMA_RCALL (RKH_TE_SMA_DEFER + 1)
384 #define RKH_SMA_END RKH_TE_SMA_RCALL
388 #define RKH_TE_SM_INIT RKH_SM_START
390 #define RKH_TE_SM_CLRH (RKH_TE_SM_INIT + 1)
392 #define RKH_TE_SM_TRN (RKH_TE_SM_CLRH + 1)
394 #define RKH_TE_SM_STATE (RKH_TE_SM_TRN + 1)
396 #define RKH_TE_SM_ENSTATE (RKH_TE_SM_STATE + 1)
398 #define RKH_TE_SM_EXSTATE (RKH_TE_SM_ENSTATE + 1)
400 #define RKH_TE_SM_NENEX (RKH_TE_SM_EXSTATE + 1)
402 #define RKH_TE_SM_NTRNACT (RKH_TE_SM_NENEX + 1)
404 #define RKH_TE_SM_TS_STATE (RKH_TE_SM_NTRNACT + 1)
406 #define RKH_TE_SM_EVT_PROC (RKH_TE_SM_TS_STATE + 1)
408 #define RKH_TE_SM_EVT_NFOUND (RKH_TE_SM_EVT_PROC + 1)
410 #define RKH_TE_SM_GRD_FALSE (RKH_TE_SM_EVT_NFOUND + 1)
412 #define RKH_TE_SM_CND_NFOUND (RKH_TE_SM_GRD_FALSE + 1)
414 #define RKH_TE_SM_UNKN_STATE (RKH_TE_SM_CND_NFOUND + 1)
416 #define RKH_TE_SM_EX_HLEVEL (RKH_TE_SM_UNKN_STATE + 1)
418 #define RKH_TE_SM_EX_TSEG (RKH_TE_SM_EX_HLEVEL + 1)
420 #define RKH_TE_SM_EXE_ACT (RKH_TE_SM_EX_TSEG + 1)
422 #define RKH_TE_SM_DCH (RKH_TE_SM_EXE_ACT + 1)
423 #define RKH_SM_END RKH_TE_SM_DCH
427 #define RKH_TE_TMR_INIT RKH_TMR_START
429 #define RKH_TE_TMR_START (RKH_TE_TMR_INIT + 1)
431 #define RKH_TE_TMR_STOP (RKH_TE_TMR_START + 1)
433 #define RKH_TE_TMR_TOUT (RKH_TE_TMR_STOP + 1)
435 #define RKH_TE_TMR_REM (RKH_TE_TMR_TOUT + 1)
436 #define RKH_TMR_END RKH_TE_TMR_REM
440 #define RKH_TE_FWK_EN RKH_FWK_START
442 #define RKH_TE_FWK_EX (RKH_TE_FWK_EN + 1)
444 #define RKH_TE_FWK_EPREG (RKH_TE_FWK_EX + 1)
446 #define RKH_TE_FWK_AE (RKH_TE_FWK_EPREG + 1)
448 #define RKH_TE_FWK_GC (RKH_TE_FWK_AE + 1)
450 #define RKH_TE_FWK_GCR (RKH_TE_FWK_GC + 1)
452 #define RKH_TE_FWK_OBJ (RKH_TE_FWK_GCR + 1)
454 #define RKH_TE_FWK_SIG (RKH_TE_FWK_OBJ + 1)
456 #define RKH_TE_FWK_FUN (RKH_TE_FWK_SIG + 1)
458 #define RKH_TE_FWK_EXE_FUN (RKH_TE_FWK_FUN + 1)
460 #define RKH_TE_FWK_SYNC_EVT (RKH_TE_FWK_EXE_FUN + 1)
462 #define RKH_TE_FWK_TUSR (RKH_TE_FWK_SYNC_EVT + 1)
464 #define RKH_TE_FWK_TCFG (RKH_TE_FWK_TUSR + 1)
466 #define RKH_TE_FWK_ASSERT (RKH_TE_FWK_TCFG + 1)
468 #define RKH_TE_FWK_AO (RKH_TE_FWK_ASSERT + 1)
470 #define RKH_TE_FWK_STATE (RKH_TE_FWK_AO + 1)
472 #define RKH_TE_FWK_PSTATE (RKH_TE_FWK_STATE + 1)
474 #define RKH_TE_FWK_TIMER (RKH_TE_FWK_PSTATE + 1)
476 #define RKH_TE_FWK_EPOOL (RKH_TE_FWK_TIMER + 1)
478 #define RKH_TE_FWK_QUEUE (RKH_TE_FWK_EPOOL + 1)
480 #define RKH_TE_FWK_ACTOR (RKH_TE_FWK_QUEUE + 1)
481 #define RKH_FWK_END RKH_TE_FWK_ACTOR
484 #define RKH_TE_USER RKH_USR_START
487 #define RKH_TE_UT_INIT RKH_UT_START
488 #define RKH_TE_UT_CLEANUP (RKH_TE_UT_INIT + 1)
489 #define RKH_TE_UT_VERIFY (RKH_TE_UT_CLEANUP + 1)
490 #define RKH_TE_UT_IGNORE_GROUP (RKH_TE_UT_VERIFY + 1)
491 #define RKH_TE_UT_EXPECT (RKH_TE_UT_IGNORE_GROUP + 1)
492 #define RKH_TE_UT_EXPECT_ANYARGS (RKH_TE_UT_EXPECT + 1)
493 #define RKH_TE_UT_IGNORE (RKH_TE_UT_EXPECT_ANYARGS + 1)
494 #define RKH_TE_UT_IGNORE_ARG (RKH_TE_UT_IGNORE + 1)
495 #define RKH_TE_UT_SUCCESS (RKH_TE_UT_IGNORE_ARG + 1)
496 #define RKH_TE_UT_FAIL (RKH_TE_UT_SUCCESS + 1)
497 #define RKH_UT_END RKH_TE_UT_IGNORE_ARG
500 #define RKH_TE_NEVENT (RKH_UT_END + 1)
513 #if ((RKH_MP_END - RKH_MP_START) > ((RKH_MP_TTBL_RANGE * 8) - 1))
514 #error "rkhtrc.h, the total number of trace events represented"
515 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
518 #if ((RKH_QUE_END - RKH_QUE_START) > ((RKH_QUE_TTBL_RANGE * 8) - 1))
519 #error "rkhtrc.h, the total number of trace events represented"
520 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
523 #if ((RKH_SMA_END - RKH_SMA_START) > ((RKH_SMA_TTBL_RANGE * 8) - 1))
524 #error "rkhtrc.h, the total number of trace events represented"
525 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
528 #if ((RKH_SM_END - RKH_SM_START) > ((RKH_SM_TTBL_RANGE * 8) - 1))
529 #error "rkhtrc.h, the total number of trace events represented"
530 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
533 #if ((RKH_TMR_END - RKH_TMR_START) > ((RKH_TIM_TTBL_RANGE * 8) - 1))
534 #error "rkhtrc.h, the total number of trace events represented"
535 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
538 #if ((RKH_FWK_END - RKH_FWK_START) > ((RKH_FWK_TTBL_RANGE * 8) - 1))
539 #error "rkhtrc.h, the total number of trace events represented"
540 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
543 #if ((RKH_UT_END - RKH_UT_START) > ((RKH_UT_TTBL_RANGE * 8) - 1))
544 #error "rkhtrc.h, the total number of trace events represented"
545 #error "by RKH_TOT_NUM_TRC_EVTS must be <= RKH_TRC_MAX_EVENTS"
548 #if RKH_CFG_TRC_RTFIL_EN == RKH_ENABLED
569 #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
570 if (rkh_trc_isoff_(eid_) \
571 RKH_TRC_AO_ISOFF(prio_) \
572 RKH_TRC_SIG_ISOFF(sig_)) \
574 RKH_ENTER_CRITICAL_(); \
577 #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
578 if (rkh_trc_isoff_(eid_) \
579 RKH_TRC_SIG_ISOFF(sig_)) \
581 RKH_ENTER_CRITICAL_(); \
584 #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
585 if (rkh_trc_isoff_(eid_) \
586 RKH_TRC_AO_ISOFF(prio_)) \
588 RKH_ENTER_CRITICAL_(); \
591 #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
592 if (rkh_trc_isoff_(eid_)) \
594 RKH_ENTER_CRITICAL_(); \
607 #define RKH_TRC_END() \
609 RKH_EXIT_CRITICAL_(); \
620 #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
621 if (rkh_trc_isoff_(eid_) \
622 RKH_TRC_AO_ISOFF(prio_) \
623 RKH_TRC_SIG_ISOFF(sig_)) \
635 #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
636 if (rkh_trc_isoff_(eid_) \
637 RKH_TRC_SIG_ISOFF(sig_)) \
649 #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
650 if (rkh_trc_isoff_(eid_) \
651 RKH_TRC_AO_ISOFF(prio_)) \
662 #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
663 if (rkh_trc_isoff_(eid_)) \
670 #define RKH_TRC_END_NOCRIT() \
674 #define RKH_TRC_BEGIN(eid_, prio_, sig_) \
675 RKH_ENTER_CRITICAL_(); \
678 #define RKH_TRC_BEGIN_WOAO(eid_, sig_) \
679 RKH_ENTER_CRITICAL_(); \
682 #define RKH_TRC_BEGIN_WOSIG(eid_, prio_) \
683 RKH_ENTER_CRITICAL_(); \
686 #define RKH_TRC_BEGIN_WOAOSIG(eid_) \
687 RKH_ENTER_CRITICAL_(); \
690 #define RKH_TRC_END() \
692 RKH_EXIT_CRITICAL_();
694 #define RKH_TRC_BEGIN_NOCRIT(eid_, prio_, sig_) \
697 #define RKH_TRC_BEGIN_WOAO_NOCRIT(eid_, sig_) \
700 #define RKH_TRC_BEGIN_WOSIG_NOCRIT(eid_, prio_) \
703 #define RKH_TRC_BEGIN_WOAOSIG_NOCRIT(eid_) \
706 #define RKH_TRC_END_NOCRIT() \
714 #define RKH_TRC_BEGIN_WOFIL(eid_) \
716 RKH_ENTER_CRITICAL_(); \
723 #define RKH_TRC_END_WOFIL() \
725 RKH_EXIT_CRITICAL_();
730 #define RKH_TRC_BEGIN_WOFIL_NOCRIT(eid_) \
737 #define RKH_TRC_END_WOFIL_NOCRIT() \
744 #define RKH_TRC_BEGIN_DFT(eid_) \
746 RKH_ENTER_CRITICAL_(); \
747 rkh_trc_clear_chk(); \
754 #define RKH_TRC_END_DFT() \
756 RKH_EXIT_CRITICAL_();
762 #define RKH_TRC_U8_RAW(d) \
769 #define RKH_TRC_UI8(d) \
770 rkh_trc_u8((rui8_t)(d))
776 #define RKH_TRC_UI16(d) \
783 #define RKH_TRC_UI32(d) \
790 #define RKH_TRC_STR(s) \
793 #if RKH_CFG_TRC_USER_TRACE_EN == RKH_ENABLED
797 #define RKH_TRC_USR_BEGIN(eid_) \
799 if (rkh_trc_isoff_(eid_)) \
801 RKH_ENTER_CRITICAL_(); \
807 #define RKH_TRC_USR_END() \
809 RKH_EXIT_CRITICAL_(); \
816 #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) \
817 if (rkh_trc_isoff_(eid_)) \
824 #define RKH_TRC_USR_END_NOCRIT() \
832 #define RKH_TUSR_I8(w_, d_) \
833 rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I8_T, \
840 #define RKH_TUSR_UI8(w_, d_) \
841 rkh_trc_fmt_u8((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI8_T, \
848 #define RKH_TUSR_I16(w_, d_) \
849 rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I16_T, \
856 #define RKH_TUSR_UI16(w_, d_) \
857 rkh_trc_fmt_u16((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI16_T, \
864 #define RKH_TUSR_I32(w_, d_) \
865 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_I32_T, \
872 #define RKH_TUSR_UI32(w_, d_) \
873 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_UI32_T, \
880 #define RKH_TUSR_X32(w_, d_) \
881 rkh_trc_fmt_u32((rui8_t)(((w_) << 4)) | (rui8_t)RKH_X32_T, \
888 #define RKH_TUSR_STR(s_) \
889 rkh_trc_fmt_str((s_))
896 #define RKH_TUSR_MEM(mem_, size_) \
897 rkh_trc_fmt_mem((mem_), (size_))
903 #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
904 #define RKH_TUSR_OBJ(obj_) \
905 rkh_trc_fmt_u16((rui8_t)RKH_OBJ_T, (rui16_t)(obj_))
906 #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
907 #define RKH_TUSR_OBJ(obj_) \
908 rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
910 #define RKH_TUSR_OBJ(obj_) \
911 rkh_trc_fmt_u32((rui8_t)RKH_OBJ_T, (rui32_t)(obj_))
918 #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16u
919 #define RKH_TUSR_FUN(fun_) \
920 rkh_trc_fmt_u16((rui8_t)RKH_FUN_T, (rui16_t)(fun_))
921 #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
922 #define RKH_TUSR_FUN(fun_) \
923 rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
925 #define RKH_TUSR_FUN(fun_) \
926 rkh_trc_fmt_u32((rui8_t)RKH_FUN_T, (rui32_t)(fun_))
933 #if RKH_CFG_FWK_SIZEOF_EVT == 8
934 #define RKH_TUSR_SIG(sig_) \
935 rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
936 #elif RKH_CFG_FWK_SIZEOF_EVT == 16
937 #define RKH_TUSR_SIG(sig_) \
938 rkh_trc_fmt_u16((rui8_t)RKH_ESIG_T, (rui16_t)(sig_))
939 #elif RKH_CFG_FWK_SIZEOF_EVT == 32
940 #define RKH_TUSR_SIG(sig_) \
941 rkh_trc_fmt_u32((rui8_t)RKH_ESIG_T, (rui32_t)(sig_))
943 #define RKH_TUSR_SIG(sig_) \
944 rkh_trc_fmt_u8((rui8_t)RKH_ESIG_T, (rui8_t)(sig_))
947 #define RKH_TRC_USR_BEGIN(eid_) (void)0;
948 #define RKH_TRC_USR_END() (void)0
949 #define RKH_TRC_USR_BEGIN_NOCRIT(eid_) (void)0
950 #define RKH_TRC_USR_END_NOCRIT() (void)0
951 #define RKH_TUSR_I8(w_, d_) (void)0
952 #define RKH_TUSR_UI8(w_, d_) (void)0
953 #define RKH_TUSR_I16(w_, d_) (void)0
954 #define RKH_TUSR_UI16(w_, d_) (void)0
955 #define RKH_TUSR_I32(w_, d_) (void)0
956 #define RKH_TUSR_UI32(w_, d_) (void)0
957 #define RKH_TUSR_X32(w_, d_) (void)0
958 #define RKH_TUSR_STR(s_) (void)0
959 #define RKH_TUSR_MEM(mem_, size_) (void)0
960 #define RKH_TUSR_OBJ(obj_) (void)0
961 #define RKH_TUSR_FUN(fun_) (void)0
962 #define RKH_TUSR_SIG(sig_) (void)0
969 #if RKH_CFGPORT_TRC_SIZEOF_PTR == 16
970 #define RKH_TRC_SYM(sym) \
971 RKH_TRC_UI16((rui16_t)sym)
972 #elif RKH_CFGPORT_TRC_SIZEOF_PTR == 32
973 #define RKH_TRC_SYM(sym) \
974 RKH_TRC_UI32((rui32_t)sym)
976 #define RKH_TRC_SYM(sym) \
977 RKH_TRC_UI32((rui32_t)sym)
984 #if defined(RKH_USE_TRC_SENDER)
985 #define RKH_TRC_SNDR(sym) \
988 #define RKH_TRC_SNDR(sym)
995 #if RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 16
996 #define RKH_TRC_FUN(sym) \
997 RKH_TRC_UI16((rui16_t)sym)
998 #elif RKH_CFGPORT_TRC_SIZEOF_FUN_PTR == 32
999 #define RKH_TRC_FUN(sym) \
1000 RKH_TRC_UI32((rui32_t)sym)
1002 #define RKH_TRC_FUN(sym) \
1003 RKH_TRC_UI32((rui32_t)sym)
1009 #if RKH_CFG_TMR_SIZEOF_NTIMER == 8
1010 #define RKH_TRC_NTICK(nt) \
1012 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 16
1013 #define RKH_TRC_NTICK(nt) \
1015 #elif RKH_CFG_TMR_SIZEOF_NTIMER == 32
1016 #define RKH_TRC_NTICK(nt) \
1019 #define RKH_TRC_NTICK(nt) \
1026 #if RKH_CFG_MP_SIZEOF_NBLOCK == 8
1027 #define RKH_TRC_NBLK(nb) \
1029 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1030 #define RKH_TRC_MP_NMIN(nm) \
1033 #define RKH_TRC_MP_NMIN(nm)
1035 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 16
1036 #define RKH_TRC_NBLK(nb) \
1038 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1039 #define RKH_TRC_MP_NMIN(nm) \
1042 #define RKH_TRC_MP_NMIN(nm)
1044 #elif RKH_CFG_MP_SIZEOF_NBLOCK == 32
1045 #define RKH_TRC_NBLK(nb) \
1047 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1048 #define RKH_TRC_MP_NMIN(nm) \
1051 #define RKH_TRC_MP_NMIN(nm)
1054 #define RKH_TRC_NBLK(nb) \
1056 #if RKH_CFG_MP_GET_LWM_EN == RKH_ENABLED
1057 #define RKH_TRC_MP_NMIN(nm) \
1060 #define RKH_TRC_MP_NMIN(nm)
1067 #if RKH_CFG_MP_SIZEOF_BSIZE == 8
1068 #define RKH_TRC_BSIZE(bs) \
1070 #elif RKH_CFG_MP_SIZEOF_BSIZE == 16
1071 #define RKH_TRC_BSIZE(bs) \
1073 #elif RKH_CFG_MP_SIZEOF_BSIZE == 32
1074 #define RKH_TRC_BSIZE(bs) \
1077 #define RKH_TRC_BSIZE(bs) \
1084 #if RKH_CFG_QUE_SIZEOF_NELEM == 8
1085 #define RKH_TRC_NE(ne) \
1087 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1088 #define RKH_TRC_QUE_NMIN(nm) \
1091 #define RKH_TRC_QUE_NMIN(nm)
1093 #elif RKH_CFG_QUE_SIZEOF_NELEM == 16
1094 #define RKH_TRC_NE(ne) \
1096 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1097 #define RKH_TRC_QUE_NMIN(nm) \
1100 #define RKH_TRC_QUE_NMIN(nm)
1102 #elif RKH_CFG_QUE_SIZEOF_NELEM == 32
1103 #define RKH_TRC_NE(ne) \
1105 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1106 #define RKH_TRC_QUE_NMIN(nm) \
1109 #define RKH_TRC_QUE_NMIN(nm)
1112 #define RKH_TRC_NE(ne) \
1114 #if RKH_CFG_QUE_GET_LWMARK_EN == RKH_ENABLED
1115 #define RKH_TRC_QUE_NMIN(nm) \
1118 #define RKH_TRC_QUE_NMIN(nm)
1125 #if RKH_CFG_FWK_SIZEOF_EVT == 8
1126 #define RKH_TRC_SIG(e) \
1128 #elif RKH_CFG_FWK_SIZEOF_EVT == 16
1129 #define RKH_TRC_SIG(e) \
1131 #elif RKH_CFG_FWK_SIZEOF_EVT == 32
1132 #define RKH_TRC_SIG(e) \
1135 #define RKH_TRC_SIG(e) \
1142 #if RKH_CFG_FWK_SIZEOF_EVT_SIZE == 8
1143 #define RKH_TRC_ES(es) \
1145 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 16
1146 #define RKH_TRC_ES(es) \
1148 #elif RKH_CFG_FWK_SIZEOF_EVT_SIZE == 32
1149 #define RKH_TRC_ES(es) \
1152 #define RKH_TRC_ES(es) \
1212 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
1214 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
1216 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
1229 #if RKH_CFG_TRC_TSTAMP_EN == RKH_ENABLED
1230 #if RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 8
1232 #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 16
1234 #elif RKH_CFGPORT_TRC_SIZEOF_TSTAMP == 32
1243 #if RKH_CFG_TRC_SIZEOF_STREAM < 255u
1244 typedef rui8_t TRCQTY_T;
1246 typedef rui16_t TRCQTY_T;
1269 #if RKH_CFG_TRC_SIZEOF_TE_ID == 8
1270 typedef rui8_t RKH_GM_OFFSET_T;
1271 typedef rui8_t RKH_GM_RANGE_T;
1272 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 16
1273 typedef rui16_t RKH_GM_OFFSET_T;
1274 typedef rui8_t RKH_GM_RANGE_T;
1275 #elif RKH_CFG_TRC_SIZEOF_TE_ID == 32
1276 typedef rui32_t RKH_GM_OFFSET_T;
1277 typedef rui32_t RKH_GM_RANGE_T;
1279 typedef rui8_t RKH_GM_OFFSET_T;
1280 typedef rui8_t RKH_GM_RANGE_T;
1285 RKH_GM_OFFSET_T offset;
1286 RKH_GM_RANGE_T range;
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
RKH_TRC_FMT
Enumerates data formats recognized by Trazer.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
RKH engine interface.This header file is directly included in RKH interface file, rkh...
RKH_SUBTE_SM_EXE_ACT
Sub-event of RKH_TE_SM_EXE_ACT event.
rui8_t RKH_TE_ID_T
Describes a trace event identification (ID).
rui32_t RKH_TS_T
Defines the size of trace timestamp.
rui8_t RKH_TG_T
Group of events.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.
Executes a behavior (action) of state machine, it could be an entry, exit, effect, init, preprocessor or guard.