# /*********************************************************************
# *                     SEGGER Microcontroller GmbH                    *
# *                        The Embedded Experts                        *
# **********************************************************************
# *                                                                    *
# *       (c) 1995 - 2019 SEGGER Microcontroller GmbH                  *
# *                                                                    *
# *       Internet: segger.com  Support: support_embos@segger.com      *
# *                                                                    *
# **********************************************************************
# *                                                                    *
# *       Zephyr OS                                                    *
# *                                                                    *
# *       Please note:                                                 *
# *                                                                    *
# **********************************************************************
#
# -------------------------- END-OF-HEADER -----------------------------
# File    : SYSVIEW_Zephyr.txt
# Purpose : Zephyr OS description file for SEGGER SystemView.
#           Please copy this file to your SystemView installation folder,
#           e.g. c:\Program Files\SEGGER\SystemView_V250\Description\.
# */

Option    ReversePriority
#
# Types for parameter formatters
#
NamedType Bool          0=false 1=true

NamedType TimeOut       *="%u ticks" 0=TIMEOUT_NO_WAIT 4294967295=FOREVER


NamedType ErrCodePosix  *=%i 0=ESUCCESS  -1=EPERM        -2=ENOENT       -3=ESRCH         -4=EINTR            -5=EIO              -6=ENXIO       -7=E2BIG         -8=ENOEXEC       -9=EBADF       -10=ECHILD         -11=EAGAIN       -12=ENOMEM   -13=EACCES -14=EFAULT -15=ENOTEMPTY    -16=EBUSY   -17=EEXIST -18=EXDEV -19=ENODEV -20=ENOTDIR -21=EISDIR -22=EINVAL -23=ENFILE -24=EMFILE -25=ENOTTY -26=ENAMETOOLONG -27=EFBIG -28=ENOSPC -29=ESPIPE -30=EROFS -31=EMLINK -32=EPIPE -33=EDEADLK -34=ENOLCK -35=ENOTSUP -36=EMSGSIZE -72=ECANCELED -81=ERRMAX
NamedType ErrCodeMath   *=%i 0=ESUCCESS -37=EDOM         -38=ERANGE
NamedType ErrCodeNetArg *=%i 0=ESUCCESS -40=EDESTADDRREQ -41=EPROTOTYPE -42=ENOPROTOOPT  -43=EPROTONOSUPPORT -44=ESOCKTNOSUPPORT -45=EOPNOTSUPP -46=EPFNOSUPPORT -47=EAFNOSUPPORT -48=EADDRINUSE   -49=EADDRNOTAVAIL -50=ENOTSOCK
NamedType ErrCodeNetOps *=%i 0=ESUCCESS -51=ENETUNREACH -52=ENETRESET   -53=ECONNABORTED -54=ECONNRESET      -55=ENOBUFS         -56=EISCONN    -57=ENOTCONN     -58=ESHUTDOWN    -59=ETOOMANYREFS -60=ETIMEDOUT     -61=ECONNREFUSED -62=ENETDOWN -63=ETXTBSY -64=ELOOP -65=EHOSTUNREACH -66=ENOTBLK -67=EHOSTDOWN
NamedType ErrCodeNetIO  *=%i 0=ESUCCESS -68=EINPROGRESS -69=EALREADY    -11=EWOULDBLOCK  -71=ENOSYS
NamedType ErrCodeStream *=%i 0=ESUCCESS -74=ENOSR       -75=ENOSTR      -76=EPROTO       -77=EBADMSG         -78=ENODATA         -79=ETIME      -80=ENOMSG      -138=EILSEQ
NamedType ErrCodeMsg    *=%i 0=ESUCCESS -11=EAGAIN      -80=ENOMSG

NamedType PowerState *=%i 0=ACTIVE 1=RUNTIME_IDLE 2=SUSPEND_TO_IDLE 3=STANDBY 4=SUSPEND_TO_RAM 5=SUSPEND_TO_DISK 6=SOFT_OFF

#
# Task States
#
TaskState 0xBF 1=dummy, 2=Waiting, 4=New, 8=Terminated, 16=Suspended, 32=Terminating, 128=Ready

#
# API Functions
#
32  k_sched_lock
33  k_sched_unlock
34  k_busy_wait                Timeout=%u us

35  irq_enable                 irq=%u
36  irq_disable                irq=%u

37  k_mutex_init               | Returns %ErrCodePosix
38  k_mutex_unlock             | Returns %ErrCodePosix
39  k_mutex_lock               mutex=%I, | Returns %ErrCodePosix

40  k_sem_init                 sem=%I, initial_count=%u, | Returns %ErrCodePosix
41  k_sem_give                 sem=%I   | Returns %ErrCodePosix
42  k_sem_take                 sem=%I, Timeout=%TimeOut| Returns %ErrCodePosix
91  k_sem_reset                sem=%I

43  k_queue_init               q=%I
44  k_queue_append             q=%I, data=%p          | Returns (void)(%ErrCodePosix)
45  k_queue_alloc_append       q=%I, data=%p          | Returns %ErrCodePosix
46  k_queue_prepend            q=%I, data=%p          | Returns (void)(%ErrCodePosix)
47  k_queue_alloc_prepend      q=%I, data=%p          | Returns %ErrCodePosix
48  k_queue_insert             q=%I, data=%p          | Returns (void)(%ErrCodePosix)
49  k_queue_append_list        q=%I, head=%p, tail=%p | Returns %ErrCodePosix
50  k_queue_get                q=%I, Timeout=%TimeOut | Returns %p
51  k_queue_remove             q=%I, data=%p          | Returns &Bool
52  k_queue_cancel_wait        q=%I
53  k_queue_peek_head          q=%I     | Returns %p
54  k_queue_peek_tail          q=%I     | Returns %p

55  k_stack_init               stack=%I, buffer=%p, num_entries=%u
56  k_stack_push               stack=%I, data=%p      | Returns %ErrCodePosix
57  k_stack_pop                stack=%I, data=%p, Timeout=%TimeOut | Returns %ErrCodePosix
58  k_stack_cleanup            stack=%I | Returns %ErrCodePosix

59  k_msgq_init                msgq=%I, buffer=%p, msg_size=%u, max_msgs=%us
60  k_msgq_put                 msgq=%I, data=%p, Timeout=%TimeOut | Returns %ErrCodeMsg
61  k_msgq_get                 msgq=%I, data=%p, Timeout=%TimeOut | Returns %ErrCodeMsg
62  k_msgq_cleanup             msgq=%I  | Returns %ErrCodePosix
63  k_msgq_peek                msgq=%I, data=%p | Returns %ErrCodeMsg
64  k_msgq_purge               msgq=%I
134 k_msgq_put_front           msgq=%I, data=%p, Timeout=%TimeOut | Returns %ErrCodeMsg

65  k_mbox_init                mbox=%I
66  k_mbox_put                 mbox=%I, tx_msg=%p, Timeout=%TimeOut | Returns %ErrCodeMsg
67  k_mbox_async_put           mbox=%I, tx_msg=%p, sem=%I | Returns (void)(%ErrCodeMsg)
68  k_mbox_get                 mbox=%I, rx_msg=%p, buffer=%p, Timeout=%TimeOut | Returns %ErrCodeMsg
69  k_mbox_data_get            rx_msg=%p, buffer=%p
70  k_mbox_data_block_get      rx_msg=%p, pool=%p, block=%p,  Timeout=%TimeOut | Returns %ErrCodePosix

71  k_pipe_init                pipe=%I, buffer=%p, size=%u

76  k_heap_init                heap=%I, mem=%p, bytes=%u
77  k_heap_alloc               heap=%I, bytes=%u, Timeout=%TimeOut | Returns %p
77  k_heap_calloc              heap=%I, num=%u, size=%u, Timeout=%TimeOut | Returns %p
78  k_heap_free                heap=%I, mem=%p
79  k_heap_aligned_alloc       heap=%I

84  k_mem_slab_init            slab=%I, buffer=%p, bock_size=%u, num_blocks=%u | Returns ErrCodePosix
85  k_mem_slab_alloc           slab=%I, mem=%p, Timeout=%TimeOut | Returns %ErrCodePosix
86  k_mem_slab_free            slab=%I, mem=%p

87  k_timer_init               timer=%I, expiry_fn=%I, stop_fn=%I
88  k_timer_start              timer=%I, duration=%TimeOut , period=%u ticks
89  k_timer_stop               timer=%I
90  k_timer_status_sync        timer=%I
91  k_timer_user_data_set      timer=%I, user_data=%p
92  k_timer_user_data_get      timer=%I | Returns %p
93  timer->expiry_fn           timer=%I
94  timer->stop_fn             timer=%I

95  k_sleep                    msec=%u ms | Returns %u
96  k_msleep                   msec=%u ms | Returns %u
97  k_usleep                   usec=%u us | Returns %u

98  k_thread_priority_set      thread=%t, priority=%u
99  k_thread_wakeup
100 k_thread_abort
101 k_thread_start             thread=%t
102 k_thread_suspend
103 k_thread_resume
104 k_thread_join
105 k_thread_yield
106 k_thread_user_mode_enter
107 k_thread_foreach
108 k_thread_foreach_unlocked
155 k_thread_name_set           thread=%I

109 k_condvar_init              condvar=%I
110 k_condvar_signal            condvar=%I
111 k_condvar_broadcast         condvar=%I
112 k_condvar_wait              condvar=%I


113 k_work_cancel                work=%I
114 k_work_canel_delayable       dwork=%I
115 k_work_cancel_delayable_sync dwork=%I, sync=%I
116 k_work_cancel_sync           dwork=%I, sync=%I
117 k_work_delayable_init        dwork=%I
118 k_work_queue_drain           queue=%I
119 k_work_flush                 work=%I
120 k_work_flush_delayable       dwork=%I, sync=%I
121 k_work_init                  work=%I
122 k_work_poll_cancel           work=%I
123 k_work_poll_init             work=%I
124 k_work_poll_submit           work=%I, Timeout=%TimeOut
125 k_work_poll_submit_to_queue  work_q=%I, work=%I, Timeout=%TimeOut
126 k_work_queue_start           queue=%I
127 k_work_reschedule            dwork=%I, Delay=%TimeOut | Returns %u
128 k_work_reschedule_for_queue  queue=%I, dwork=%I, Delay=%TimeOut | Returns %u
129 k_work_schedule              dwork=%I, Delay=%TimeOut | Returns %u
130 k_work_reschedule_for_queue  queue=%I, dwork=%I, Delay=%TimeOut | Returns %u
131 k_work_submit                work=%I | Returns %ErrCodePosix
132 k_work_submit_to_queue       queue=%I, work=%I | Returns %ErrCodePosix
133 k_work_queue_unplug          queue=%I | Returns %ErrCodePosix


142 k_fifo_init                  fifo=%I
143 k_fifo_cancel_wait           fifo=%I
144 k_fifo_alloc_put             fifo=%I, data=%I
145 k_fifo_put_list              fifo=%I
146 k_fifo_put_slist             fifo=%I
147 k_fifo_peak_head             fifo=%I
148 k_fifo_peak_tail             fifo=%I
149 k_fifo_put                   fifo=%I, data=%I
150 k_fifo_get                   fifo=%I, Timeout=%TimeOut


151 k_lifo_init                  lifo=%I
152 k_lifo_put                   lifo=%I
153 k_lifo_get                   lifo=%I, Timeout=%TimeOut
154 k_lifo_alloc_put             lifo=%I, data=%I


156 pm_system_suspend            ticks=%u | Returns %Bool
157 pm_device_runtime_get        dev=%I | Returns %u
158 pm_device_runtime_put        dev=%I | Returns %u
159 pm_device_runtime_put_async  dev=%I, Delay=%TimeOut | Returns %u
160 pm_device_runtime_enable     dev=%I | Returns %u
161 pm_device_runtime_disable    dev=%I | Returns %u

162 syscall                      name=%s

163 named_event                  name=%s arg0=%u arg1=%u

164 k_event_init                 event=%I
165 k_event_post                 event=%I, events=%u, events_mask=%u
166 k_event_wait                 event=%I, events=%u, options=%u, Timeout=%TimeOut
