You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

475 lines
10 KiB

  1. /*
  2. *********************************************************************************************************
  3. * uC/OS-II
  4. * The Real-Time Kernel
  5. *
  6. * Copyright 1992-2021 Silicon Laboratories Inc. www.silabs.com
  7. *
  8. * SPDX-License-Identifier: APACHE-2.0
  9. *
  10. * This software is subject to an open source license and is distributed by
  11. * Silicon Laboratories Inc. pursuant to the terms of the Apache License,
  12. * Version 2.0 available at www.apache.org/licenses/LICENSE-2.0.
  13. *
  14. *********************************************************************************************************
  15. */
  16. /*
  17. *********************************************************************************************************
  18. *
  19. * TRACE SUPPORT
  20. *
  21. * Filename : os_trace.h
  22. * Version : V2.93.01
  23. *********************************************************************************************************
  24. * Note(s) : (1) The header file os_trace_events.h is the interface between uC/OS-II and your trace
  25. * recorder of choice.
  26. * To support trace recording, include one of the sub-folders at uCOS-II/Trace/ into
  27. * your project.
  28. *********************************************************************************************************
  29. */
  30. #ifndef OS_TRACE_H
  31. #define OS_TRACE_H
  32. #include <os_cfg.h>
  33. #if (defined(OS_TRACE_EN) && (OS_TRACE_EN > 0u))
  34. #include <os_trace_events.h> /* See Note #1. */
  35. #endif
  36. /*
  37. **************************************************************************************************************************
  38. * uC/OS-II Trace Default Macros (Empty)
  39. **************************************************************************************************************************
  40. */
  41. #ifndef OS_TRACE_INIT
  42. #define OS_TRACE_INIT()
  43. #endif
  44. #ifndef OS_TRACE_START
  45. #define OS_TRACE_START()
  46. #endif
  47. #ifndef OS_TRACE_STOP
  48. #define OS_TRACE_STOP()
  49. #endif
  50. #ifndef OS_TRACE_CLEAR
  51. #define OS_TRACE_CLEAR()
  52. #endif
  53. #ifndef OS_TRACE_ISR_ENTER
  54. #define OS_TRACE_ISR_ENTER()
  55. #endif
  56. #ifndef OS_TRACE_ISR_EXIT
  57. #define OS_TRACE_ISR_EXIT()
  58. #endif
  59. #ifndef OS_TRACE_ISR_EXIT_TO_SCHEDULER
  60. #define OS_TRACE_ISR_EXIT_TO_SCHEDULER()
  61. #endif
  62. #ifndef OS_TRACE_TICK_INCREMENT
  63. #define OS_TRACE_TICK_INCREMENT(OSTickCtr)
  64. #endif
  65. #ifndef OS_TRACE_TASK_CREATE
  66. #define OS_TRACE_TASK_CREATE(p_tcb)
  67. #endif
  68. #ifndef OS_TRACE_TASK_CREATE_FAILED
  69. #define OS_TRACE_TASK_CREATE_FAILED(p_tcb)
  70. #endif
  71. #ifndef OS_TRACE_TASK_DEL
  72. #define OS_TRACE_TASK_DEL(p_tcb)
  73. #endif
  74. #ifndef OS_TRACE_TASK_READY
  75. #define OS_TRACE_TASK_READY(p_tcb)
  76. #endif
  77. #ifndef OS_TRACE_TASK_SWITCHED_IN
  78. #define OS_TRACE_TASK_SWITCHED_IN(p_tcb)
  79. #endif
  80. #ifndef OS_TRACE_TASK_DLY
  81. #define OS_TRACE_TASK_DLY(dly_ticks)
  82. #endif
  83. #ifndef OS_TRACE_TASK_SUSPEND
  84. #define OS_TRACE_TASK_SUSPEND(p_tcb)
  85. #endif
  86. #ifndef OS_TRACE_TASK_SUSPENDED
  87. #define OS_TRACE_TASK_SUSPENDED(p_tcb)
  88. #endif
  89. #ifndef OS_TRACE_TASK_RESUME
  90. #define OS_TRACE_TASK_RESUME(p_tcb)
  91. #endif
  92. #ifndef OS_TRACE_TASK_PRIO_CHANGE
  93. #define OS_TRACE_TASK_PRIO_CHANGE(p_tcb, prio)
  94. #endif
  95. #ifndef OS_TRACE_TASK_NAME_SET
  96. #define OS_TRACE_TASK_NAME_SET(p_tcb)
  97. #endif
  98. #ifndef OS_TRACE_EVENT_NAME_SET
  99. #define OS_TRACE_EVENT_NAME_SET(p_event, p_name)
  100. #endif
  101. #ifndef OS_TRACE_ISR_REGISTER
  102. #define OS_TRACE_ISR_REGISTER(isr_id, isr_name, isr_prio)
  103. #endif
  104. #ifndef OS_TRACE_ISR_BEGIN
  105. #define OS_TRACE_ISR_BEGIN(isr_id)
  106. #endif
  107. #ifndef OS_TRACE_ISR_END
  108. #define OS_TRACE_ISR_END()
  109. #endif
  110. #ifndef OS_TRACE_MBOX_CREATE
  111. #define OS_TRACE_MBOX_CREATE(p_mbox, p_name)
  112. #endif
  113. #ifndef OS_TRACE_MUTEX_CREATE
  114. #define OS_TRACE_MUTEX_CREATE(p_mutex, p_name)
  115. #endif
  116. #ifndef OS_TRACE_MUTEX_DEL
  117. #define OS_TRACE_MUTEX_DEL(p_mutex)
  118. #endif
  119. #ifndef OS_TRACE_MUTEX_POST
  120. #define OS_TRACE_MUTEX_POST(p_mutex)
  121. #endif
  122. #ifndef OS_TRACE_MUTEX_POST_FAILED
  123. #define OS_TRACE_MUTEX_POST_FAILED(p_mutex)
  124. #endif
  125. #ifndef OS_TRACE_MUTEX_PEND
  126. #define OS_TRACE_MUTEX_PEND(p_mutex)
  127. #endif
  128. #ifndef OS_TRACE_MUTEX_PEND_FAILED
  129. #define OS_TRACE_MUTEX_PEND_FAILED(p_mutex)
  130. #endif
  131. #ifndef OS_TRACE_MUTEX_PEND_BLOCK
  132. #define OS_TRACE_MUTEX_PEND_BLOCK(p_mutex)
  133. #endif
  134. #ifndef OS_TRACE_MUTEX_TASK_PRIO_INHERIT
  135. #define OS_TRACE_MUTEX_TASK_PRIO_INHERIT(p_tcb, prio)
  136. #endif
  137. #ifndef OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT
  138. #define OS_TRACE_MUTEX_TASK_PRIO_DISINHERIT(p_tcb, prio)
  139. #endif
  140. #ifndef OS_TRACE_SEM_CREATE
  141. #define OS_TRACE_SEM_CREATE(p_sem, p_name)
  142. #endif
  143. #ifndef OS_TRACE_SEM_DEL
  144. #define OS_TRACE_SEM_DEL(p_sem)
  145. #endif
  146. #ifndef OS_TRACE_SEM_POST
  147. #define OS_TRACE_SEM_POST(p_sem)
  148. #endif
  149. #ifndef OS_TRACE_SEM_POST_FAILED
  150. #define OS_TRACE_SEM_POST_FAILED(p_sem)
  151. #endif
  152. #ifndef OS_TRACE_SEM_PEND
  153. #define OS_TRACE_SEM_PEND(p_sem)
  154. #endif
  155. #ifndef OS_TRACE_SEM_PEND_FAILED
  156. #define OS_TRACE_SEM_PEND_FAILED(p_sem)
  157. #endif
  158. #ifndef OS_TRACE_SEM_PEND_BLOCK
  159. #define OS_TRACE_SEM_PEND_BLOCK(p_sem)
  160. #endif
  161. #ifndef OS_TRACE_Q_CREATE
  162. #define OS_TRACE_Q_CREATE(p_q, p_name)
  163. #endif
  164. #ifndef OS_TRACE_Q_DEL
  165. #define OS_TRACE_Q_DEL(p_q)
  166. #endif
  167. #ifndef OS_TRACE_Q_POST
  168. #define OS_TRACE_Q_POST(p_q)
  169. #endif
  170. #ifndef OS_TRACE_Q_POST_FAILED
  171. #define OS_TRACE_Q_POST_FAILED(p_q)
  172. #endif
  173. #ifndef OS_TRACE_Q_PEND
  174. #define OS_TRACE_Q_PEND(p_q)
  175. #endif
  176. #ifndef OS_TRACE_Q_PEND_FAILED
  177. #define OS_TRACE_Q_PEND_FAILED(p_q)
  178. #endif
  179. #ifndef OS_TRACE_Q_PEND_BLOCK
  180. #define OS_TRACE_Q_PEND_BLOCK(p_q)
  181. #endif
  182. #ifndef OS_TRACE_FLAG_CREATE
  183. #define OS_TRACE_FLAG_CREATE(p_grp, p_name)
  184. #endif
  185. #ifndef OS_TRACE_FLAG_DEL
  186. #define OS_TRACE_FLAG_DEL(p_grp)
  187. #endif
  188. #ifndef OS_TRACE_FLAG_POST
  189. #define OS_TRACE_FLAG_POST(p_grp)
  190. #endif
  191. #ifndef OS_TRACE_FLAG_POST_FAILED
  192. #define OS_TRACE_FLAG_POST_FAILED(p_grp)
  193. #endif
  194. #ifndef OS_TRACE_FLAG_PEND
  195. #define OS_TRACE_FLAG_PEND(p_grp)
  196. #endif
  197. #ifndef OS_TRACE_FLAG_PEND_FAILED
  198. #define OS_TRACE_FLAG_PEND_FAILED(p_grp)
  199. #endif
  200. #ifndef OS_TRACE_FLAG_PEND_BLOCK
  201. #define OS_TRACE_FLAG_PEND_BLOCK(p_grp)
  202. #endif
  203. #ifndef OS_TRACE_MEM_CREATE
  204. #define OS_TRACE_MEM_CREATE(p_mem)
  205. #endif
  206. #ifndef OS_TRACE_MEM_PUT
  207. #define OS_TRACE_MEM_PUT(p_mem)
  208. #endif
  209. #ifndef OS_TRACE_MEM_PUT_FAILED
  210. #define OS_TRACE_MEM_PUT_FAILED(p_mem)
  211. #endif
  212. #ifndef OS_TRACE_MEM_GET
  213. #define OS_TRACE_MEM_GET(p_mem)
  214. #endif
  215. #ifndef OS_TRACE_MEM_GET_FAILED
  216. #define OS_TRACE_MEM_GET_FAILED(p_mem)
  217. #endif
  218. #ifndef OS_TRACE_TMR_CREATE
  219. #define OS_TRACE_TMR_CREATE(p_tmr, p_name)
  220. #endif
  221. #ifndef OS_TRACE_MBOX_DEL_ENTER
  222. #define OS_TRACE_MBOX_DEL_ENTER(p_mbox, opt)
  223. #endif
  224. #ifndef OS_TRACE_MBOX_POST_ENTER
  225. #define OS_TRACE_MBOX_POST_ENTER(p_mbox)
  226. #endif
  227. #ifndef OS_TRACE_MBOX_POST_OPT_ENTER
  228. #define OS_TRACE_MBOX_POST_OPT_ENTER(p_mbox, opt)
  229. #endif
  230. #ifndef OS_TRACE_MBOX_PEND_ENTER
  231. #define OS_TRACE_MBOX_PEND_ENTER(p_mbox, timeout)
  232. #endif
  233. #ifndef OS_TRACE_MUTEX_DEL_ENTER
  234. #define OS_TRACE_MUTEX_DEL_ENTER(p_mutex, opt)
  235. #endif
  236. #ifndef OS_TRACE_MUTEX_POST_ENTER
  237. #define OS_TRACE_MUTEX_POST_ENTER(p_mutex)
  238. #endif
  239. #ifndef OS_TRACE_MUTEX_PEND_ENTER
  240. #define OS_TRACE_MUTEX_PEND_ENTER(p_mutex, timeout)
  241. #endif
  242. #ifndef OS_TRACE_SEM_DEL_ENTER
  243. #define OS_TRACE_SEM_DEL_ENTER(p_sem, opt)
  244. #endif
  245. #ifndef OS_TRACE_SEM_POST_ENTER
  246. #define OS_TRACE_SEM_POST_ENTER(p_sem)
  247. #endif
  248. #ifndef OS_TRACE_SEM_PEND_ENTER
  249. #define OS_TRACE_SEM_PEND_ENTER(p_sem, timeout)
  250. #endif
  251. #ifndef OS_TRACE_Q_DEL_ENTER
  252. #define OS_TRACE_Q_DEL_ENTER(p_q, opt)
  253. #endif
  254. #ifndef OS_TRACE_Q_POST_ENTER
  255. #define OS_TRACE_Q_POST_ENTER(p_q)
  256. #endif
  257. #ifndef OS_TRACE_Q_POST_FRONT_ENTER
  258. #define OS_TRACE_Q_POST_FRONT_ENTER(p_q)
  259. #endif
  260. #ifndef OS_TRACE_Q_POST_OPT_ENTER
  261. #define OS_TRACE_Q_POST_OPT_ENTER(p_q, opt)
  262. #endif
  263. #ifndef OS_TRACE_Q_PEND_ENTER
  264. #define OS_TRACE_Q_PEND_ENTER(p_q, timeout)
  265. #endif
  266. #ifndef OS_TRACE_FLAG_DEL_ENTER
  267. #define OS_TRACE_FLAG_DEL_ENTER(p_grp, opt)
  268. #endif
  269. #ifndef OS_TRACE_TMR_DEL_ENTER
  270. #define OS_TRACE_TMR_DEL_ENTER(p_tmr)
  271. #endif
  272. #ifndef OS_TRACE_TMR_START_ENTER
  273. #define OS_TRACE_TMR_START_ENTER(p_tmr)
  274. #endif
  275. #ifndef OS_TRACE_TMR_STOP_ENTER
  276. #define OS_TRACE_TMR_STOP_ENTER(p_tmr)
  277. #endif
  278. #ifndef OS_TRACE_TMR_EXPIRED
  279. #define OS_TRACE_TMR_EXPIRED(p_tmr)
  280. #endif
  281. #ifndef OS_TRACE_FLAG_POST_ENTER
  282. #define OS_TRACE_FLAG_POST_ENTER(p_grp, flags, opt)
  283. #endif
  284. #ifndef OS_TRACE_FLAG_PEND_ENTER
  285. #define OS_TRACE_FLAG_PEND_ENTER(p_grp, flags, timeout, opt)
  286. #endif
  287. #ifndef OS_TRACE_MEM_PUT_ENTER
  288. #define OS_TRACE_MEM_PUT_ENTER(p_mem, p_blk)
  289. #endif
  290. #ifndef OS_TRACE_MEM_GET_ENTER
  291. #define OS_TRACE_MEM_GET_ENTER(p_mem)
  292. #endif
  293. #ifndef OS_TRACE_MBOX_DEL_EXIT
  294. #define OS_TRACE_MBOX_DEL_EXIT(RetVal)
  295. #endif
  296. #ifndef OS_TRACE_MBOX_POST_EXIT
  297. #define OS_TRACE_MBOX_POST_EXIT(RetVal)
  298. #endif
  299. #ifndef OS_TRACE_MBOX_POST_OPT_EXIT
  300. #define OS_TRACE_MBOX_POST_OPT_EXIT(RetVal)
  301. #endif
  302. #ifndef OS_TRACE_MBOX_PEND_EXIT
  303. #define OS_TRACE_MBOX_PEND_EXIT(RetVal)
  304. #endif
  305. #ifndef OS_TRACE_MUTEX_DEL_EXIT
  306. #define OS_TRACE_MUTEX_DEL_EXIT(RetVal)
  307. #endif
  308. #ifndef OS_TRACE_MUTEX_POST_EXIT
  309. #define OS_TRACE_MUTEX_POST_EXIT(RetVal)
  310. #endif
  311. #ifndef OS_TRACE_MUTEX_PEND_EXIT
  312. #define OS_TRACE_MUTEX_PEND_EXIT(RetVal)
  313. #endif
  314. #ifndef OS_TRACE_SEM_DEL_EXIT
  315. #define OS_TRACE_SEM_DEL_EXIT(RetVal)
  316. #endif
  317. #ifndef OS_TRACE_SEM_POST_EXIT
  318. #define OS_TRACE_SEM_POST_EXIT(RetVal)
  319. #endif
  320. #ifndef OS_TRACE_SEM_PEND_EXIT
  321. #define OS_TRACE_SEM_PEND_EXIT(RetVal)
  322. #endif
  323. #ifndef OS_TRACE_Q_DEL_EXIT
  324. #define OS_TRACE_Q_DEL_EXIT(RetVal)
  325. #endif
  326. #ifndef OS_TRACE_Q_POST_EXIT
  327. #define OS_TRACE_Q_POST_EXIT(RetVal)
  328. #endif
  329. #ifndef OS_TRACE_Q_POST_FRONT_EXIT
  330. #define OS_TRACE_Q_POST_FRONT_EXIT(RetVal)
  331. #endif
  332. #ifndef OS_TRACE_Q_POST_OPT_EXIT
  333. #define OS_TRACE_Q_POST_OPT_EXIT(RetVal)
  334. #endif
  335. #ifndef OS_TRACE_Q_PEND_EXIT
  336. #define OS_TRACE_Q_PEND_EXIT(RetVal)
  337. #endif
  338. #ifndef OS_TRACE_FLAG_DEL_EXIT
  339. #define OS_TRACE_FLAG_DEL_EXIT(RetVal)
  340. #endif
  341. #ifndef OS_TRACE_FLAG_POST_EXIT
  342. #define OS_TRACE_FLAG_POST_EXIT(RetVal)
  343. #endif
  344. #ifndef OS_TRACE_FLAG_PEND_EXIT
  345. #define OS_TRACE_FLAG_PEND_EXIT(RetVal)
  346. #endif
  347. #ifndef OS_TRACE_MEM_PUT_EXIT
  348. #define OS_TRACE_MEM_PUT_EXIT(RetVal)
  349. #endif
  350. #ifndef OS_TRACE_MEM_GET_EXIT
  351. #define OS_TRACE_MEM_GET_EXIT(RetVal)
  352. #endif
  353. #ifndef OS_TRACE_TMR_DEL_EXIT
  354. #define OS_TRACE_TMR_DEL_EXIT(RetVal)
  355. #endif
  356. #ifndef OS_TRACE_TMR_START_EXIT
  357. #define OS_TRACE_TMR_START_EXIT(RetVal)
  358. #endif
  359. #ifndef OS_TRACE_TMR_STOP_EXIT
  360. #define OS_TRACE_TMR_STOP_EXIT(RetVal)
  361. #endif
  362. #endif