-
Notifications
You must be signed in to change notification settings - Fork 22
/
RTX5.scvd
1682 lines (1466 loc) · 133 KB
/
RTX5.scvd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<component_viewer schemaVersion="1.2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation="Component_Viewer.xsd">
<component name="CMSIS:RTOS2:Keil RTX5" shortname="RTX5" version="5.9.0"/> <!-- name and version of the component -->
<typedefs>
<!-- Attributes structure for thread -->
<typedef name="osThreadAttr_t" info="" size="36">
<member name="name" type="uint32_t" offset="0" info="name of the thread (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
<member name="stack_mem" type="uint32_t" offset="16" info="memory for stack (type is void *)"/>
<member name="stack_size" type="uint32_t" offset="20" info="size of stack"/>
<member name="priority" type="uint32_t" offset="24" info="initial thread priority (type is osPriority_t)"/>
<member name="tz_module" type="uint32_t" offset="28" info="TrustZone module identifier (type is TZ_ModuleId_t)"/>
<member name="reserved" type="uint32_t" offset="32" info="reserved (must be 0)"/>
</typedef>
<!-- Attributes structure for timer -->
<typedef name="osTimerAttr_t" info="" size="16">
<member name="name" type="uint32_t" offset="0" info="name of the timer (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
</typedef>
<!-- Attributes structure for event flags -->
<typedef name="osEventFlagsAttr_t" info="" size="16">
<member name="name" type="uint32_t" offset="0" info="name of the event flags (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
</typedef>
<!-- Attributes structure for mutex -->
<typedef name="osMutexAttr_t" info="" size="16">
<member name="name" type="uint32_t" offset="0" info="name of the mutex (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
</typedef>
<!-- Attributes structure for semaphore -->
<typedef name="osSemaphoreAttr_t" info="" size="16">
<member name="name" type="uint32_t" offset="0" info="name of the semaphore (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
</typedef>
<!-- Attributes structure for memory pool -->
<typedef name="osMemoryPoolAttr_t" info="" size="24">
<member name="name" type="uint32_t" offset="0" info="name of the semaphore (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
<member name="mp_mem" type="uint32_t" offset="16" info="memory for data storage (type is void *)"/>
<member name="mp_size" type="uint32_t" offset="20" info="size of provided memory for data storage"/>
</typedef>
<!-- Attributes structure for message queue -->
<typedef name="osMessageQueueAttr_t" info="" size="24">
<member name="name" type="uint32_t" offset="0" info="name of the semaphore (type is const char *)"/>
<member name="attr_bits" type="uint32_t" offset="4" info="attribute bits"/>
<member name="cb_mem" type="uint32_t" offset="8" info="memory for control block (type is void *)"/>
<member name="cb_size" type="uint32_t" offset="12" info="size of provided memory for control block"/>
<member name="mq_mem" type="uint32_t" offset="16" info="memory for data storage (type is void *)"/>
<member name="mq_size" type="uint32_t" offset="20" info="size of provided memory for data storage"/>
</typedef>
<!-- Thread Control Block -->
<typedef name="osRtxThread_t" info="" size="80">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State">
<enum name="osThreadInactive" value="0" info=""/>
<enum name="osThreadReady" value="1" info=""/>
<enum name="osThreadRunning" value="2" info=""/>
<enum name="osThreadBlocked" value="3" info=""/>
<enum name="osThreadTerminated" value="4" info=""/>
<enum name="osThreadError" value="-1" info=""/>
<enum name="Delay" value="0x13" info=""/>
<enum name="Join" value="0x23" info=""/>
<enum name="Thread Flags" value="0x33" info=""/>
<enum name="Event Flags" value="0x43" info=""/>
<enum name="Mutex" value="0x53" info=""/>
<enum name="Semaphore" value="0x63" info=""/>
<enum name="Memory Pool" value="0x73" info=""/>
<enum name="Message Get" value="0x83" info=""/>
<enum name="Message Put" value="0x93" info=""/>
</member>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes">
<enum name="osThreadDetached" value="0x00" info="Thread created in detached mode"/>
<enum name="osThreadJoinable" value="0x01" info="Thread created in joinable mode"/>
<enum name="osThreadUnprivileged" value="0x02" info="Thread created in unprivileged mode"/>
<enum name="osThreadPrivileged" value="0x04" info="Thread created in privileged mode"/>
</member>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_next" type="*osRtxThread_t" offset="8" info="Link pointer to next Thread in Object list"/>
<member name="thread_prev" type="*osRtxThread_t" offset="12" info="Link pointer to previous Thread in Object list"/>
<member name="delay_next" type="*osRtxThread_t" offset="16" info="Link pointer to next Thread in Delay list"/>
<member name="delay_prev" type="*osRtxThread_t" offset="20" info="Link pointer to previous Thread in Delay list"/>
<member name="thread_join" type="*osRtxThread_t" offset="24" info="Thread waiting to Join"/>
<member name="delay" type="uint32_t" offset="28" info="Delay time"/>
<member name="priority" type="int8_t" offset="32" info="Thread priority">
<enum name="osPriorityNone" value="0" info=""/>
<enum name="osPriorityIdle" value="1" info=""/>
<enum name="osPriorityLow" value="8" info=""/>
<enum name="osPriorityLow1" value="8+1" info=""/>
<enum name="osPriorityLow2" value="8+2" info=""/>
<enum name="osPriorityLow3" value="8+3" info=""/>
<enum name="osPriorityLow4" value="8+4" info=""/>
<enum name="osPriorityLow5" value="8+5" info=""/>
<enum name="osPriorityLow6" value="8+6" info=""/>
<enum name="osPriorityLow7" value="8+7" info=""/>
<enum name="osPriorityBelowNormal" value="16" info=""/>
<enum name="osPriorityBelowNormal1" value="16+1" info=""/>
<enum name="osPriorityBelowNormal2" value="16+2" info=""/>
<enum name="osPriorityBelowNormal3" value="16+3" info=""/>
<enum name="osPriorityBelowNormal4" value="16+4" info=""/>
<enum name="osPriorityBelowNormal5" value="16+5" info=""/>
<enum name="osPriorityBelowNormal6" value="16+6" info=""/>
<enum name="osPriorityBelowNormal7" value="16+7" info=""/>
<enum name="osPriorityNormal" value="24" info=""/>
<enum name="osPriorityNormal1" value="24+1" info=""/>
<enum name="osPriorityNormal2" value="24+2" info=""/>
<enum name="osPriorityNormal3" value="24+3" info=""/>
<enum name="osPriorityNormal4" value="24+4" info=""/>
<enum name="osPriorityNormal5" value="24+5" info=""/>
<enum name="osPriorityNormal6" value="24+6" info=""/>
<enum name="osPriorityNormal7" value="24+7" info=""/>
<enum name="osPriorityAboveNormal" value="32" info=""/>
<enum name="osPriorityAboveNormal1" value="32+1" info=""/>
<enum name="osPriorityAboveNormal2" value="32+2" info=""/>
<enum name="osPriorityAboveNormal3" value="32+3" info=""/>
<enum name="osPriorityAboveNormal4" value="32+4" info=""/>
<enum name="osPriorityAboveNormal5" value="32+5" info=""/>
<enum name="osPriorityAboveNormal6" value="32+6" info=""/>
<enum name="osPriorityAboveNormal7" value="32+7" info=""/>
<enum name="osPriorityHigh" value="40" info=""/>
<enum name="osPriorityHigh1" value="40+1" info=""/>
<enum name="osPriorityHigh2" value="40+2" info=""/>
<enum name="osPriorityHigh3" value="40+3" info=""/>
<enum name="osPriorityHigh4" value="40+4" info=""/>
<enum name="osPriorityHigh5" value="40+5" info=""/>
<enum name="osPriorityHigh6" value="40+6" info=""/>
<enum name="osPriorityHigh7" value="40+7" info=""/>
<enum name="osPriorityRealtime" value="48" info=""/>
<enum name="osPriorityRealtime1" value="48+1" info=""/>
<enum name="osPriorityRealtime2" value="48+2" info=""/>
<enum name="osPriorityRealtime3" value="48+3" info=""/>
<enum name="osPriorityRealtime4" value="48+4" info=""/>
<enum name="osPriorityRealtime5" value="48+5" info=""/>
<enum name="osPriorityRealtime6" value="48+6" info=""/>
<enum name="osPriorityRealtime7" value="48+7" info=""/>
<enum name="osPriorityISR" value="56" info=""/>
<enum name="osPriorityError" value="-1" info=""/>
</member>
<member name="priority_base" type="int8_t" offset="33" info="Base priority"/>
<member name="stack_frame" type="uint8_t" offset="34" info="Stack frame"/>
<member name="flags_options" type="uint8_t" offset="35" info="Thread/Event flags options">
<enum name="osFlagsWaitAny" value="0x00" info="Wait for any flag."/>
<enum name="osFlagsWaitAll" value="0x01" info="Wait for all flags."/>
<enum name="osFlagsNoClear" value="0x02" info="Do not clear flags which have been specified to wait for."/>
</member>
<member name="wait_flags" type="int32_t" offset="36" info="Waiting Thread/Event flags"/>
<member name="thread_flags" type="int32_t" offset="40" info="Thread flags"/>
<member name="mutex_list" type="*osRtxMutex_t" offset="44" info="Link pointer to list of owned mutexes"/>
<member name="stack_mem" type="uint32_t" offset="48" info="Stack memory (type is void *)"/>
<member name="stack_size" type="uint32_t" offset="52" info="Stack size"/>
<member name="sp" type="uint32_t" offset="56" info="Current stack pointer"/>
<member name="thread_addr" type="uint32_t" offset="60" info="Thread entry address"/>
<member name="tz_memory" type="uint32_t" offset="64" info="TrustZone Memory Identifier"/>
<member name="zone" type="uint8_t" offset="68" info="Thread Zone"/>
<member name="reserved" type="uint8_t" offset="69" info="Reserved bytes"/>
<member name="wdog_next" type="*osRtxThread_t" offset="72" info="Link pointer to next Thread in Watchdog list"/>
<member name="wdog_tick" type="uint32_t" offset="76" info="Watchdog tick counter"/>
<var name="cb_valid" type="uint32_t" info="Control block validation status (valid=1, invalid=0)"/>
<var name="sp_valid" type="uint32_t" info="Stack pointer validation status (valid=1, invalid=0)"/>
<var name="out_type" type="uint8_t" info="Output display type ID"/>
<var name="ex_delay" type="uint32_t" info="Calculated execution delay"/>
<var name="wd_tick" type="uint32_t" info="Calculated absolute watchdog tick time"/>
<var name="wd_state" type="uint32_t" info="Watchdog state (0=not running, 1=running)"/>
<var name="stack_val" type="uint32_t" info="Stack usage: analysis result"/>
<var name="stack_cur" type="uint32_t" info="Stack usage: current (address)"/>
<var name="stack_curp" type="uint32_t" info="Stack usage: current (in percent)"/>
<var name="stack_curb" type="uint32_t" info="Stack usage: current (in bytes)"/>
<var name="stack_maxb" type="uint32_t" info="Stack usage: maximum (in bytes)"/>
<var name="stack_maxp" type="uint32_t" info="Stack usage: maximum (in percent)"/>
<var name="stack_over" type="uint8_t" info="Stack usage: overflow"/>
</typedef>
<!-- Timer Control Block -->
<typedef name="osRtxTimer_t" info="" size="32">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State">
<enum name="Inactive" value="0" info="Timer is not active"/>
<enum name="Stopped" value="1" info="Timer is stopped"/>
<enum name="Running" value="2" info="Timer is running"/>
</member>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes">
<enum name="osTimerOnce" value="0" info="One-shot timer"/>
<enum name="osTimerPeriodic" value="1" info="Periodic timer"/>
</member>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="prev" type="*osRtxTimer_t" offset="8" info="Pointer to previous active timer"/>
<member name="next" type="*osRtxTimer_t" offset="12" info="Pointer to next active timer"/>
<member name="tick" type="uint32_t" offset="16" info="Timer current tick"/>
<member name="load" type="uint32_t" offset="20" info="Timer load value"/>
<!-- Inlined "osRtxTimerFinfo_t" structure -->
<member name="finfo_fp" type="uint32_t" offset="24" info="Timer function pointer (type is void *)"/>
<member name="finfo_arg" type="uint32_t" offset="28" info="Timer function argument (type is void *)"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="ex_tick" type="uint32_t" info="Calculated absolute tick time"/>
</typedef>
<!-- Event Flags Control Block -->
<typedef name="osRtxEventFlags_t" info="" size="16">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes"/>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_list" type="*osRtxThread_t" offset="8" info="Waiting threads list"/>
<member name="event_flags" type="int32_t" offset="12" info="Event flags"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="wl_idx" type="uint32_t" info="EventFlags waiting list (EWL) index" />
<var name="wl_cnt" type="uint32_t" info="Number of threads waiting for event flags" />
</typedef>
<!-- Mutex Control Block -->
<typedef name="osRtxMutex_t" info="" size="28">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes">
<enum name="osMutexRecursive" value="0x01" info="Recursive mutex."/>
<enum name="osMutexPrioInherit" value="0x02" info="Priority inherit protocol."/>
<enum name="osMutexRobust" value="0x08" info="Robust mutex."/>
</member>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_list" type="*osRtxThread_t" offset="8" info="Waiting threads list"/>
<member name="owner_thread" type="*osRtxThread_t" offset="12" info="Owner thread"/>
<member name="owner_prev" type="*osRtxMutex_t" offset="16" info="Pointer to previous owned mutex"/>
<member name="owner_next" type="*osRtxMutex_t" offset="20" info="Pointer to next owned mutex"/>
<member name="lock" type="uint8_t" offset="24" info="Lock counter"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="wl_idx" type="uint32_t" info="Mutex waiting list (MWL) index" />
<var name="wl_cnt" type="uint32_t" info="Number of threads waiting for current mutex" />
</typedef>
<!-- Semaphore Control Block -->
<typedef name="osRtxSemaphore_t" info="" size="16">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes"/>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_list" type="*osRtxThread_t" offset="8" info="Waiting threads list"/>
<member name="tokens" type="uint16_t" offset="12" info="Current number of tokens"/>
<member name="max_tokens" type="uint16_t" offset="14" info="Maximum number of tokens"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="wl_idx" type="uint32_t" info="Semaphore waiting list (SWL) index" />
<var name="wl_cnt" type="uint32_t" info="Number of threads waiting for current semaphore" />
</typedef>
<!-- Memory Pool Information -->
<typedef name="osRtxMpInfo_t" info="Memory pool information" size="24">
<member name="max_blocks" type="uint32_t" offset="0" info="Maximum number of blocks"/>
<member name="used_blocks" type="uint32_t" offset="4" info="Number of used blocks"/>
<member name="block_size" type="uint32_t" offset="8" info="Block size"/>
<member name="block_base" type="uint32_t" offset="12" info="Block memory base address (type is void *)"/>
<member name="block_lim" type="uint32_t" offset="16" info="Block memory limit address (type is void *)"/>
<member name="block_free" type="uint32_t" offset="20" info="First free block address (type is void *)"/>
</typedef>
<!-- Memory Pool Control Block -->
<typedef name="osRtxMemoryPool_t" info="" size="36">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes"/>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_list" type="*osRtxThread_t" offset="8" info="Waiting threads list"/>
<!-- Inlined "osRtxMpInfo_t" structure -->
<member name="max_blocks" type="uint32_t" offset="12+0" info="Maximum number of blocks"/>
<member name="used_blocks" type="uint32_t" offset="12+4" info="Number of used blocks"/>
<member name="block_size" type="uint32_t" offset="12+8" info="Block size"/>
<member name="block_base" type="uint32_t" offset="12+12" info="Block memory base address (type is void *)"/>
<member name="block_lim" type="uint32_t" offset="12+16" info="Block memory limit address (type is void *)"/>
<member name="block_free" type="uint32_t" offset="12+20" info="First free block address (type is void *)"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="wl_idx" type="uint32_t" info="Memory Pool waiting list (PWL) index" />
<var name="wl_cnt" type="uint32_t" info="Number of threads waiting for memory pool" />
</typedef>
<!-- Message Control Block -->
<typedef name="osRtxMessage_t" info="" size="12">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="priority" type="uint8_t" offset="3" info="Message priority"/>
<member name="prev" type="*osRtxMessage_t" offset="4" info="Pointer to previous message"/>
<member name="next" type="*osRtxMessage_t" offset="8" info="Pointer to next message"/>
<var name="addr" type="uint32_t" info="Message location address" />
</typedef>
<!-- Message Queue Control Block -->
<typedef name="osRtxMessageQueue_t" info="" size="52">
<member name="id" type="uint8_t" offset="0" info="Object Identifier"/>
<member name="state" type="uint8_t" offset="1" info="Object State"/>
<member name="flags" type="uint8_t" offset="2" info="Object Flags"/>
<member name="attr" type="uint8_t" offset="3" info="Object Attributes"/>
<member name="name" type="uint32_t" offset="4" info="Object name (type is *uint8_t)"/>
<member name="thread_list" type="*osRtxThread_t" offset="8" info="Waiting threads list"/>
<!-- Inlined "osRtxMpInfo_t" structure -->
<member name="max_blocks" type="uint32_t" offset="12+0" info="Maximum number of blocks"/>
<member name="used_blocks" type="uint32_t" offset="12+4" info="Number of used blocks"/>
<member name="block_size" type="uint32_t" offset="12+8" info="Block size"/>
<member name="block_base" type="uint32_t" offset="12+12" info="Block memory base address (type is void *)"/>
<member name="block_lim" type="uint32_t" offset="12+16" info="Block memory limit address (type is void *)"/>
<member name="block_free" type="uint32_t" offset="12+20" info="First free block address (type is void *)"/>
<member name="msg_size" type="uint32_t" offset="36" info="Message size"/>
<member name="msg_count" type="uint32_t" offset="40" info="Number of queued messages"/>
<member name="msg_first" type="*osRtxMessage_t" offset="44" info="Pointer to first message"/>
<member name="msg_last" type="*osRtxMessage_t" offset="48" info="Pointer to last message"/>
<var name="cb_valid" type="uint32_t" info="Control Block validation status (valid=1, invalid=0)"/>
<var name="wl_idx" type="uint32_t" info="Waiting list index (QWL)" />
<var name="wl_cnt" type="uint32_t" info="Number of threads waiting" />
<var name="ml_idx" type="uint32_t" info="Queue message list index (QML)" />
<var name="ml_cnt" type="uint32_t" info="Number of enqueued messages" />
</typedef>
<!-- OS Runtime Information structure -->
<typedef name="osRtxInfo_t" info="OS Runtime Information" size="164">
<member name="os_id" type="uint32_t" offset="0" info="OS Identification (type is *uint8_t)"/>
<member name="version" type="uint32_t" offset="4" info="OS Version"/>
<member name="kernel_state" type="uint8_t" offset="8" info="Kernel state">
<enum name="osKernelInactive" value="0" info="Inactive"/>
<enum name="osKernelReady" value="1" info="Ready"/>
<enum name="osKernelRunning" value="2" info="Running"/>
<enum name="osKernelLocked" value="3" info="Locked"/>
<enum name="osKernelSuspended" value="4" info="Suspended"/>
<enum name="osKernelError" value="5" info="Error"/>
</member>
<member name="kernel_blocked" type="uint8_t" offset="9" info="Kernel blocked"/>
<member name="kernel_pendSV" type="uint8_t" offset="10" info="Kernel pending SV"/>
<member name="kernel_protect" type="uint8_t" offset="11" info="Protect options"/>
<member name="kernel_tick" type="uint32_t" offset="12" info="Kernel tick counter"/>
<member name="tick_irqn" type="int32_t" offset="16" info="Tick timer IRQ number"/>
<member name="thread_run_curr" type="*osRtxThread_t" offset="20" info="Current running thread"/>
<member name="thread_run_next" type="*osRtxThread_t" offset="24" info="Next thread to run"/>
<!-- Inlined "osRtxObject_t" structure at offset: 28 -->
<member name="thread_ready_id" type="uint8_t" offset="28+0" info="Object Identifier" />
<member name="thread_ready_state" type="uint8_t" offset="28+1" info="Object State" />
<member name="thread_ready_flags" type="uint8_t" offset="28+2" info="Object Flags" />
<member name="thread_ready_attr" type="uint8_t" offset="28+3" info="Object Attributes"/>
<member name="thread_ready_name" type="uint32_t" offset="28+4" info="Object Name (type is *uint8_t)" />
<member name="thread_ready_thread_list" type="*osRtxThread_t" offset="28+8" info="Threads List" />
<member name="thread_idle" type="*osRtxThread_t" offset="40" info="Idle thread"/>
<member name="thread_delay_list" type="*osRtxThread_t" offset="44" info="Delay list"/>
<member name="thread_wait_list" type="*osRtxThread_t" offset="48" info="Wait list (no timeout)"/>
<member name="thread_terminate_list" type="*osRtxThread_t" offset="52" info="Terminate list"/>
<member name="thread_wdog_list" type="*osRtxThread_t" offset="56" info="Watchdog list"/>
<member name="thread_robin_thread" type="*osRtxThread_t" offset="60" info="Round Robin thread"/>
<member name="thread_timeout" type="uint32_t" offset="64" info="Round Robin timeout"/>
<member name="timer_list" type="*osRtxTimer_t" offset="68" info="Active timer list"/>
<member name="timer_thread" type="*osRtxThread_t" offset="72" info="Timer thread"/>
<member name="timer_mq" type="*osRtxMessageQueue_t" offset="76" info="Timer message queue"/>
<member name="timer_tick" type="uint32_t" offset="80" info="Timer tick function (type is func *)"/>
<member name="isr_queue_max" type="uint16_t" offset="84" info="Maximum items"/>
<member name="isr_queue_cnt" type="uint16_t" offset="86" info="Item count"/>
<member name="isr_queue_in" type="uint16_t" offset="88" info="Incoming item index"/>
<member name="isr_queue_out" type="uint16_t" offset="90" info="Outgoing item index"/>
<member name="isr_queue_data" type="uint32_t" offset="92" info="Queue data (type is void **)"/>
<member name="post_process_thread" type="uint32_t" offset="96" info="Thread post processing function (type is func *)"/>
<member name="post_process_event_flags" type="uint32_t" offset="100" info="Event flags post processing function (type is func *)"/>
<member name="post_process_semaphore" type="uint32_t" offset="104" info="Semaphore post processing function (type is func *)"/>
<member name="post_process_memory_pool" type="uint32_t" offset="108" info="Memory pool post processing function (type is func *)"/>
<member name="post_process_message_queue" type="uint32_t" offset="112" info="Message queue post processing function (type is func *)"/>
<member name="mem_stack" type="uint32_t" offset="116" info="Stack memory (type is void *)"/>
<member name="mem_mp_data" type="uint32_t" offset="120" info="Memory pool data memory (type is void *)"/>
<member name="mem_mq_data" type="uint32_t" offset="124" info="Message queue Data memory (type is void *)"/>
<member name="mem_common" type="uint32_t" offset="128" info="Common memory address (type is void *)"/>
<member name="mpi_stack" type="*osRtxMpInfo_t" offset="132" info="Stack for threads"/>
<member name="mpi_thread" type="*osRtxMpInfo_t" offset="136" info="Thread control blocks"/>
<member name="mpi_timer" type="*osRtxMpInfo_t" offset="140" info="Timer control blocks"/>
<member name="mpi_event_flags" type="*osRtxMpInfo_t" offset="144" info="Event flags control blocks"/>
<member name="mpi_mutex" type="*osRtxMpInfo_t" offset="148" info="Mutex control blocks"/>
<member name="mpi_semaphore" type="*osRtxMpInfo_t" offset="152" info="Semaphore control blocks"/>
<member name="mpi_memory_pool" type="*osRtxMpInfo_t" offset="156" info="Memory pool control blocks"/>
<member name="mpi_message_queue" type="*osRtxMpInfo_t" offset="160" info="Message queue control blocks"/>
<var name="robin_tick" type="uint32_t" info="Round Robin time tick (thread_robin_thread.delay)"/>
</typedef>
<!-- OS Runtime Object Memory Usage structure -->
<typedef name="osRtxObjectMemUsage_t" info="OS Runtime Object Memory Usage" size="12">
<member name="cnt_alloc" type="uint32_t" offset="0" info="Counter for alloc"/>
<member name="cnt_free" type="uint32_t" offset="4" info="Counter for free"/>
<member name="max_used" type="uint32_t" offset="8" info="Maximum used"/>
</typedef>
<!-- OS Configuration structure -->
<typedef name="osRtxConfig_t" const="1" info="OS Configuration Structure" size="112">
<member name="flags" type="uint32_t" offset="0" info="OS configuration flags"/>
<member name="tick_freq" type="uint32_t" offset="4" info="Kernel tick frequency"/>
<member name="robin_timeout" type="uint32_t" offset="8" info="Round Robin timeout tick"/>
<member name="isr_queue_data" type="uint32_t" offset="12" info="ISR post processing queue (type is void **)"/>
<member name="isr_queue_max" type="uint16_t" offset="16" info="Maximum data"/>
<member name="isr_queue_padding" type="uint16_t" offset="18" info="Padding bytes"/>
<member name="mem_stack_addr" type="uint32_t" offset="20" info="Stack memory address"/>
<member name="mem_stack_size" type="uint32_t" offset="24" info="Stack memory size"/>
<member name="mem_mp_data_addr" type="uint32_t" offset="28" info="Memory pool data memory address"/>
<member name="mem_mp_data_size" type="uint32_t" offset="32" info="Memory pool data memory size"/>
<member name="mem_mq_data_addr" type="uint32_t" offset="36" info="Message queue data memory address"/>
<member name="mem_mq_data_size" type="uint32_t" offset="40" info="Message queue data memory size"/>
<member name="mem_common_addr" type="uint32_t" offset="44" info="Common memory address"/>
<member name="mem_common_size" type="uint32_t" offset="48" info="Common memory size"/>
<member name="mpi_stack" type="*osRtxMpInfo_t" offset="52" info="Stack for threads"/>
<member name="mpi_thread" type="*osRtxMpInfo_t" offset="56" info="Thread control blocks"/>
<member name="mpi_timer" type="*osRtxMpInfo_t" offset="60" info="Timer control blocks"/>
<member name="mpi_event_flags" type="*osRtxMpInfo_t" offset="64" info="Event flags control blocks"/>
<member name="mpi_mutex" type="*osRtxMpInfo_t" offset="68" info="Mutex control blocks"/>
<member name="mpi_semaphore" type="*osRtxMpInfo_t" offset="72" info="Semaphore control blocks"/>
<member name="mpi_memory_pool" type="*osRtxMpInfo_t" offset="76" info="Memory pool control blocks"/>
<member name="mpi_message_queue" type="*osRtxMpInfo_t" offset="80" info="Message queue control blocks"/>
<member name="thread_stack_size" type="uint32_t" offset="84" info="Default thread stack size"/>
<member name="idle_thread_attr" type="uint32_t" offset="88" info="Idle thread attributes (type is osThreadAttr_s *)"/>
<member name="timer_thread_attr" type="uint32_t" offset="92" info="Timer thread attributes (type is osThreadAttr_s *)"/>
<member name="timer_thread" type="uint32_t" offset="96" info="Timer Thread Function (type is void(*func)(void *)"/>
<member name="timer_setup" type="uint32_t" offset="100" info="Timer Setup Function (type is int32_t(*func)(void)"/>
<member name="timer_mq_attr" type="uint32_t" offset="104" info="Timer message queue attributes (type is osMessageQueueAttr_s *)"/>
<member name="timer_mq_mcnt" type="uint32_t" offset="108" info="Timer message queue maximum messages"/>
<var name="stack_check" type="uint8_t" info="Stack checking (0:disabled, 1:enabled)"/>
<var name="stack_wmark" type="uint8_t" info="Stack watermark (0:disabled, 1:enabled)"/>
<var name="safety_feat" type="uint8_t" info="Safety features (0:disabled, 1:enabled)"/>
<var name="safety_class" type="uint8_t" info="Thread safety class (0:disabled, 1:enabled)"/>
<var name="exec_zone" type="uint8_t" info="Execution zone (0:disabled, 1:enabled)"/>
<var name="watchdog" type="uint8_t" info="Thread watchdog (0:disabled, 1:enabled)"/>
<var name="obj_check" type="uint8_t" info="Object pointer checking (0:disabled, 1:enabled)"/>
<var name="svc_check" type="uint8_t" info="SVC function pointer checking (0:disabled, 1:enabled)"/>
</typedef>
<!-- Memory Pool Header -->
<typedef name="mem_head_t" info="Memory Pool Header Structure" size="8">
<member name="size" type="uint32_t" offset="0" info="Memory pool size"/>
<member name="used" type="uint32_t" offset="4" info="Size of used memory"/>
<var name="max_used" type="uint32_t" info="Maximum size of used memory" />
</typedef>
<!-- Memory Block Header + Object Header -->
<typedef name="mem_block_t" info="Memory Block Header Structure" size="9">
<member name="next" type="*mem_block_t" offset="0" info="Next memory block"/>
<member name="len" type="uint32_t" offset="4" info="Memory block size"/>
<member name="id" type="uint8_t" offset="8" info="Object Identifier"/>
</typedef>
<!-- Helper typedefs -->
<typedef name="rtx_sections_t" info="RTX Control Block Sections Info Structure" size="56">
<member name="thread_cb_start" type="uint32_t" offset="0" info="Thread control block section start"/>
<member name="thread_cb_end" type="uint32_t" offset="4" info="Thread control block section end"/>
<member name="timer_cb_start" type="uint32_t" offset="8" info="Timer control block section start"/>
<member name="timer_cb_end" type="uint32_t" offset="12" info="Timer control block section end"/>
<member name="evflags_cb_start" type="uint32_t" offset="16" info="Event flags control block section start"/>
<member name="evflags_cb_end" type="uint32_t" offset="20" info="Event flags control block section end"/>
<member name="mutex_cb_start" type="uint32_t" offset="24" info="Mutex control block section start"/>
<member name="mutex_cb_end" type="uint32_t" offset="28" info="Mutex control block section end"/>
<member name="semaphore_cb_start" type="uint32_t" offset="32" info="Semaphore control block section start"/>
<member name="semaphore_cb_end" type="uint32_t" offset="36" info="Semaphore control block section end"/>
<member name="mempool_cb_start" type="uint32_t" offset="40" info="Memory pool control block section start"/>
<member name="mempool_cb_end" type="uint32_t" offset="44" info="Memory pool control block section end"/>
<member name="msgqueue_cb_start" type="uint32_t" offset="48" info="Message queue control block section start"/>
<member name="msgqueue_cb_end" type="uint32_t" offset="52" info="Message queue control block section end"/>
</typedef>
<typedef name="rtx_t" info="Various RTX Definitions" size="8">
<member name="status" type="int32_t" offset="0" info="RTX5 operations status">
<enum name="osOK" value="0" info="Operation completed successfully"/>
<enum name="osError" value="-1" info="Unspecified RTOS error: run-time error but no other error message fits."/>
<enum name="osErrorTimeout" value="-2" info="Operation not completed within the timeout period."/>
<enum name="osErrorResource" value="-3" info="Resource not available"/>
<enum name="osErrorParameter" value="-4" info="Parameter error"/>
<enum name="osErrorNoMemory" value="-5" info="System is out of memory: it was impossible to allocate or reserve memory for the operation"/>
<enum name="osErrorISR" value="-6" info="Not allowed in ISR context: the function cannot be called from interrupt service routines"/>
<enum name="osErrorSafetyClass" value="-7" info="Operation denied because of safety class violation"/>
<enum name="osRtxErrorKernelNotReady" value="-8" info="RTOS Kernel scheduler is not ready"/>
<enum name="osRtxErrorKernelNotRunning" value="-9" info="RTOS Kernel scheduler is not running"/>
<enum name="osRtxErrorInvalidControlBlock" value="-10" info="Object control block is not properly aligned or has an invalid size"/>
<enum name="osRtxErrorInvalidDataMemory" value="-11" info="Data memory is not is not properly aligned or has an invalid size"/>
<enum name="osRtxErrorInvalidThreadStack" value="-12" info="Thread stack is invalid"/>
<enum name="osRtxErrorInvalidPriority" value="-13" info="Thread priority is invalid"/>
<enum name="osRtxErrorInvalidPrivilegedMode" value="-14" info="Privileged thread cannot be created, kernel protect is active"/>
<enum name="osRtxErrorThreadNotJoinable" value="-15" info="Thread is not joinable"/>
<enum name="osRtxErrorMutexNotOwned" value="-16" info="Mutex is not owned by the current running thread"/>
<enum name="osRtxErrorMutexNotLocked" value="-17" info="Mutex is not locked"/>
<enum name="osRtxErrorMutexLockLimit" value="-18" info="Maximum number of recursive mutex locks reached"/>
<enum name="osRtxErrorSemaphoreCountLimit" value="-19" info="Semaphore count limit reached"/>
<enum name="osRtxErrorTZ_InitContext_S" value="-20" info=""/>
<enum name="osRtxErrorTZ_AllocContext_S" value="-21" info=""/>
<enum name="osRtxErrorTZ_FreeContext_S" value="-22" info=""/>
<enum name="osRtxErrorTZ_LoadContext_S" value="-23" info=""/>
<enum name="osRtxErrorTZ_SaveContext_S" value="-24" info=""/>
</member>
</typedef>
<typedef name="rtx_th_state" info="RTX5 thread state" size="4">
<member name="id" type="int32_t" offset="0" info="RTX5 thread state ID">
<enum name="os_ThreadInactive" value="0x00" info=""/>
<enum name="os_ThreadReady" value="0x01" info=""/>
<enum name="os_ThreadRunning" value="0x02" info=""/>
<enum name="os_ThreadBlocked" value="0x03" info=""/>
<enum name="os_ThreadTerminated" value="0x04" info=""/>
<enum name="os_ThreadWaitingDelay" value="0x13" info=""/>
<enum name="os_ThreadWaitingJoin" value="0x23" info=""/>
<enum name="os_ThreadWaitingThreadFlags" value="0x33" info=""/>
<enum name="os_ThreadWaitingEventFlags" value="0x43" info=""/>
<enum name="os_ThreadWaitingMutex" value="0x53" info=""/>
<enum name="os_ThreadWaitingSemaphore" value="0x63" info=""/>
<enum name="os_ThreadWaitingMemoryPool" value="0x73" info=""/>
<enum name="os_ThreadWaitingMessageGet" value="0x83" info=""/>
<enum name="os_ThreadWaitingMessagePut" value="0x93" info=""/>
</member>
</typedef>
<typedef name="rtx_th_priority" info="RTX5 thread priority" size="4">
<member name="id" type="int32_t" offset="0" info="RTX5 thread priority ID">
<enum name="osPriorityNone" value="0" info=""/>
<enum name="osPriorityIdle" value="1" info=""/>
<enum name="osPriorityLow" value="8" info=""/>
<enum name="osPriorityLow1" value="9" info=""/>
<enum name="osPriorityLow2" value="10" info=""/>
<enum name="osPriorityLow3" value="11" info=""/>
<enum name="osPriorityLow4" value="12" info=""/>
<enum name="osPriorityLow5" value="13" info=""/>
<enum name="osPriorityLow6" value="14" info=""/>
<enum name="osPriorityLow7" value="15" info=""/>
<enum name="osPriorityBelowNormal" value="16" info=""/>
<enum name="osPriorityBelowNormal1" value="17" info=""/>
<enum name="osPriorityBelowNormal2" value="18" info=""/>
<enum name="osPriorityBelowNormal3" value="19" info=""/>
<enum name="osPriorityBelowNormal4" value="20" info=""/>
<enum name="osPriorityBelowNormal5" value="21" info=""/>
<enum name="osPriorityBelowNormal6" value="22" info=""/>
<enum name="osPriorityBelowNormal7" value="23" info=""/>
<enum name="osPriorityNormal" value="24" info=""/>
<enum name="osPriorityNormal1" value="25" info=""/>
<enum name="osPriorityNormal2" value="26" info=""/>
<enum name="osPriorityNormal3" value="27" info=""/>
<enum name="osPriorityNormal4" value="28" info=""/>
<enum name="osPriorityNormal5" value="29" info=""/>
<enum name="osPriorityNormal6" value="30" info=""/>
<enum name="osPriorityNormal7" value="31" info=""/>
<enum name="osPriorityAboveNormal" value="32" info=""/>
<enum name="osPriorityAboveNormal1" value="33" info=""/>
<enum name="osPriorityAboveNormal2" value="34" info=""/>
<enum name="osPriorityAboveNormal3" value="35" info=""/>
<enum name="osPriorityAboveNormal4" value="36" info=""/>
<enum name="osPriorityAboveNormal5" value="37" info=""/>
<enum name="osPriorityAboveNormal6" value="38" info=""/>
<enum name="osPriorityAboveNormal7" value="39" info=""/>
<enum name="osPriorityHigh" value="40" info=""/>
<enum name="osPriorityHigh1" value="41" info=""/>
<enum name="osPriorityHigh2" value="42" info=""/>
<enum name="osPriorityHigh3" value="43" info=""/>
<enum name="osPriorityHigh4" value="44" info=""/>
<enum name="osPriorityHigh5" value="45" info=""/>
<enum name="osPriorityHigh6" value="46" info=""/>
<enum name="osPriorityHigh7" value="47" info=""/>
<enum name="osPriorityRealtime" value="48" info=""/>
<enum name="osPriorityRealtime1" value="49" info=""/>
<enum name="osPriorityRealtime2" value="50" info=""/>
<enum name="osPriorityRealtime3" value="51" info=""/>
<enum name="osPriorityRealtime4" value="52" info=""/>
<enum name="osPriorityRealtime5" value="53" info=""/>
<enum name="osPriorityRealtime6" value="54" info=""/>
<enum name="osPriorityRealtime7" value="55" info=""/>
<enum name="osPriorityISR" value="56" info=""/>
<enum name="osPriorityError" value="-1" info=""/>
</member>
</typedef>
<typedef name="rtx_kernel_state" info="RTX5 kernel state" size="1">
<member name="id" type="uint8_t" offset="0" info="Kernel state">
<enum name="osKernelInactive" value="0" info="Inactive"/>
<enum name="osKernelReady" value="1" info="Ready"/>
<enum name="osKernelRunning" value="2" info="Running"/>
<enum name="osKernelLocked" value="3" info="Locked"/>
<enum name="osKernelSuspended" value="4" info="Suspended"/>
<enum name="osKernelError" value="5" info="Error"/>
</member>
</typedef>
<typedef name="rtx_timer_type" info="RTX5 timer type" size="1">
<member name="id" type="uint8_t" offset="0" info="Timer Type">
<enum name="osTimerOnce" value="0" info="One-shot timer"/>
<enum name="osTimerPeriodic" value="1" info="Periodic timer"/>
</member>
</typedef>
<typedef name="rtx_error" info="OS Error Code" size="4">
<member name="id" type="uint32_t" offset="0" info="Error Code">
<enum name="osRtxErrorStackOverflow" value="1" info="Stack overflow"/>
<enum name="osRtxErrorISRQueueOverflow" value="2" info="ISR Queue overflow"/>
<enum name="osRtxErrorTimerQueueOverflow" value="3" info="User Timer Callback Queue overflow"/>
<enum name="osRtxErrorClibSpace" value="4" info="Standard C/C++ library libspace not available"/>
<enum name="osRtxErrorClibMutex" value="5" info="Standard C/C++ library mutex initialization failed"/>
<enum name="osRtxErrorSVC" value="6" info="Invalid SVC function called"/>
</member>
</typedef>
</typedefs>
<objects>
<object name="RTX RTOS Object">
<var name="i" type="uint32_t" value="0" />
<var name="j" type="uint32_t" value="0" />
<var name="k" type="uint32_t" value="0" />
<var name="n" type="uint32_t" value="0" />
<var name="sp" type="uint32_t" value="0" />
<var name="addr" type="uint32_t" value="0" />
<var name="ipsr" type="uint32_t" value="0" />
<var name="psp" type="uint32_t" value="0" />
<var name="v8m_ns" type="uint32_t" value="0" />
<var name="TCB_Rd" type="uint32_t" value="0" />
<var name="CCB_Rd" type="uint32_t" value="0" />
<var name="SCB_Rd" type="uint32_t" value="0" />
<var name="MCB_Rd" type="uint32_t" value="0" />
<var name="ECB_Rd" type="uint32_t" value="0" />
<var name="PCB_Rd" type="uint32_t" value="0" />
<var name="QCB_Rd" type="uint32_t" value="0" />
<var name="RTX_En" type="uint8_t" value="0" />
<var name="TCB_En" type="uint8_t" value="0" />
<var name="CCB_En" type="uint8_t" value="0" />
<var name="SCB_En" type="uint8_t" value="0" />
<var name="MCB_En" type="uint8_t" value="0" />
<var name="ECB_En" type="uint8_t" value="0" />
<var name="PCB_En" type="uint8_t" value="0" />
<var name="QCB_En" type="uint8_t" value="0" />
<var name="MUC_En" type="uint8_t" value="0" />
<var name="StaticMp_En" type="uint8_t" value="0" />
<var name="MUC_Thread_En" type="uint8_t" value="0" />
<var name="MUC_Timer_En" type="uint8_t" value="0" />
<var name="MUC_EventFlags_En" type="uint8_t" value="0" />
<var name="MUC_Mutex_En" type="uint8_t" value="0" />
<var name="MUC_Semaphore_En" type="uint8_t" value="0" />
<var name="MUC_MemPool_En" type="uint8_t" value="0" />
<var name="MUC_MsgQueue_En" type="uint8_t" value="0" />
<var name="V_Major" type="uint32_t" value="0"/>
<var name="V_Minor" type="uint32_t" value="0"/>
<var name="V_Patch" type="uint32_t" value="0"/>
<!-- Check TrustZone symbol existence -->
<calc>
v8m_ns = __Symbol_exists("TZ_InitContextSystem_S");
</calc>
<!-- Read main OS information and configuration structures -->
<read name="os_Info" type="osRtxInfo_t" symbol="osRtxInfo"/>
<read name="os_Config" type="osRtxConfig_t" symbol="osRtxConfig" const="1"/>
<calc>
os_Config.stack_check = (os_Config.flags >> 1) & 1;
os_Config.stack_wmark = (os_Config.flags >> 2) & 1;
os_Config.safety_feat = (os_Config.flags >> 3) & 1;
os_Config.safety_class = (os_Config.flags >> 4) & 1;
os_Config.exec_zone = (os_Config.flags >> 5) & 1;
os_Config.watchdog = (os_Config.flags >> 6) & 1;
os_Config.obj_check = (os_Config.flags >> 7) & 1;
os_Config.svc_check = (os_Config.flags >> 8) & 1;
</calc>
<calc cond="((os_Info.version / 10000000) == 5) && (os_Info.kernel_state > 0) && (os_Info.kernel_state < 5)">
RTX_En = 1;
</calc>
<calc cond="RTX_En">
V_Major = os_Info.version / 10000000;
V_Minor = (os_Info.version / 10000) % 1000;
V_Patch = os_Info.version % 10000;
</calc>
<calc cond="RTX_En && (os_Config.mpi_thread || os_Config.mpi_timer || os_Config.mpi_event_flags || os_Config.mpi_mutex || os_Config.mpi_semaphore || os_Config.mpi_memory_pool || os_Config.mpi_message_queue)">
StaticMp_En = 1;
</calc>
<!-- Read ISR FIFO queue -->
<read name="ISR_FIFO" cond="RTX_En" type="uint32_t" offset="os_Config.isr_queue_data" size="os_Config.isr_queue_max"/>
<!-- Read control block sections info structure -->
<read name="cb_Sections" cond="__Symbol_exists ("os_cb_sections")" type="rtx_sections_t" symbol="os_cb_sections" const="1"/>/>
<!-- Determine section sizes -->
<calc cond="RTX_En && __Symbol_exists ("os_cb_sections")">
TCB_Rd = cb_Sections.thread_cb_end - cb_Sections.thread_cb_start;
CCB_Rd = cb_Sections.timer_cb_end - cb_Sections.timer_cb_start;
ECB_Rd = cb_Sections.evflags_cb_end - cb_Sections.evflags_cb_start;
MCB_Rd = cb_Sections.mutex_cb_end - cb_Sections.mutex_cb_start;
SCB_Rd = cb_Sections.semaphore_cb_end - cb_Sections.semaphore_cb_start;
PCB_Rd = cb_Sections.mempool_cb_end - cb_Sections.mempool_cb_start;
QCB_Rd = cb_Sections.msgqueue_cb_end - cb_Sections.msgqueue_cb_start;
</calc>
<!-- Determine number of control blocks to read -->
<calc cond="TCB_Rd"> TCB_Rd /= 80; </calc>
<calc cond="CCB_Rd"> CCB_Rd /= 32; </calc>
<calc cond="ECB_Rd"> ECB_Rd /= 16; </calc>
<calc cond="MCB_Rd"> MCB_Rd /= 28; </calc>
<calc cond="SCB_Rd"> SCB_Rd /= 16; </calc>
<calc cond="PCB_Rd"> PCB_Rd /= 36; </calc>
<calc cond="QCB_Rd"> QCB_Rd /= 52; </calc>
<!-- Read object control blocks using sections info -->
<readlist name="TCB" cond="TCB_Rd" type="osRtxThread_t" offset="cb_Sections.thread_cb_start" count="TCB_Rd"/>
<readlist name="CCB" cond="CCB_Rd" type="osRtxTimer_t" offset="cb_Sections.timer_cb_start" count="CCB_Rd"/>
<readlist name="ECB" cond="ECB_Rd" type="osRtxEventFlags_t" offset="cb_Sections.evflags_cb_start" count="ECB_Rd"/>
<readlist name="MCB" cond="MCB_Rd" type="osRtxMutex_t" offset="cb_Sections.mutex_cb_start" count="MCB_Rd"/>
<readlist name="PCB" cond="PCB_Rd" type="osRtxMemoryPool_t" offset="cb_Sections.mempool_cb_start" count="PCB_Rd"/>
<readlist name="SCB" cond="SCB_Rd" type="osRtxSemaphore_t" offset="cb_Sections.semaphore_cb_start" count="SCB_Rd"/>
<readlist name="QCB" cond="QCB_Rd" type="osRtxMessageQueue_t" offset="cb_Sections.msgqueue_cb_start" count="QCB_Rd"/>
<!-- Read statically allocated control blocks -->
<readlist name="cfg_mp_stack" cond="os_Config.mpi_stack" type="osRtxMpInfo_t" offset="os_Config.mpi_stack" const="1" count="1" init="1"/>
<readlist name="cfg_mp_thread" cond="os_Config.mpi_thread" type="osRtxMpInfo_t" offset="os_Config.mpi_thread" const="1" count="1" init="1"/>
<readlist name="cfg_mp_timer" cond="os_Config.mpi_timer" type="osRtxMpInfo_t" offset="os_Config.mpi_timer" const="1" count="1" init="1"/>
<readlist name="cfg_mp_events" cond="os_Config.mpi_event_flags" type="osRtxMpInfo_t" offset="os_Config.mpi_event_flags" const="1" count="1" init="1"/>
<readlist name="cfg_mp_mutex" cond="os_Config.mpi_mutex" type="osRtxMpInfo_t" offset="os_Config.mpi_mutex" const="1" count="1" init="1"/>
<readlist name="cfg_mp_semaphore" cond="os_Config.mpi_semaphore" type="osRtxMpInfo_t" offset="os_Config.mpi_semaphore" const="1" count="1" init="1"/>
<readlist name="cfg_mp_mpool" cond="os_Config.mpi_memory_pool" type="osRtxMpInfo_t" offset="os_Config.mpi_memory_pool" const="1" count="1" init="1"/>
<readlist name="cfg_mp_mqueue" cond="os_Config.mpi_message_queue" type="osRtxMpInfo_t" offset="os_Config.mpi_message_queue" const="1" count="1" init="1"/>
<!-- Read idle and timer thread control blocks -->
<readlist name="TCB" cond="RTX_En && (TCB_Rd == 0) && os_Info.thread_idle" type="osRtxThread_t" offset="os_Info.thread_idle" count="1" />
<readlist name="TCB" cond="RTX_En && (TCB_Rd == 0) && os_Info.timer_thread" type="osRtxThread_t" offset="os_Info.timer_thread" count="1" />
<!-- Read thread control blocks (MPI) -->
<readlist name="mp_thread" cond="RTX_En && (TCB_Rd == 0) && os_Info.mpi_thread" type="osRtxMpInfo_t" offset="os_Info.mpi_thread" count="1" init="1"/>
<readlist name="TCB" cond="RTX_En && (TCB_Rd == 0) && os_Info.mpi_thread" type="osRtxThread_t" offset="mp_thread.block_base" count="mp_thread.max_blocks" />
<!-- Read timer control blocks (MPI) -->
<readlist name="mp_timer" cond="RTX_En && (CCB_Rd == 0) && os_Info.mpi_timer" type="osRtxMpInfo_t" offset="os_Info.mpi_timer" count="1" init="1"/>
<readlist name="CCB" cond="RTX_En && (CCB_Rd == 0) && os_Info.mpi_timer" type="osRtxTimer_t" offset="mp_timer.block_base" count="mp_timer.max_blocks" />
<!-- Read event flags control blocks (MPI) -->
<readlist name="mp_events" cond="RTX_En && (ECB_Rd == 0) && os_Info.mpi_event_flags" type="osRtxMpInfo_t" offset="os_Info.mpi_event_flags" count="1" init="1"/>
<readlist name="ECB" cond="RTX_En && (ECB_Rd == 0) && os_Info.mpi_event_flags" type="osRtxEventFlags_t" offset="mp_events.block_base" count="mp_events.max_blocks" />
<!-- Read mutex control blocks (MPI) -->
<readlist name="mp_mutex" cond="RTX_En && (MCB_Rd == 0) && os_Info.mpi_mutex" type="osRtxMpInfo_t" offset="os_Info.mpi_mutex" count="1" init="1"/>
<readlist name="MCB" cond="RTX_En && (MCB_Rd == 0) && os_Info.mpi_mutex" type="osRtxMutex_t" offset="mp_mutex.block_base" count="mp_mutex.max_blocks" />
<!-- Read semaphore control blocks (MPI) -->
<readlist name="mp_semaphore" cond="RTX_En && (SCB_Rd == 0) && os_Info.mpi_semaphore" type="osRtxMpInfo_t" offset="os_Info.mpi_semaphore" count="1" init="1"/>
<readlist name="SCB" cond="RTX_En && (SCB_Rd == 0) && os_Info.mpi_semaphore" type="osRtxSemaphore_t" offset="mp_semaphore.block_base" count="mp_semaphore.max_blocks" />
<!-- Read memory pool control blocks (MPI) -->
<readlist name="mp_mpool" cond="RTX_En && (PCB_Rd == 0) && os_Info.mpi_memory_pool" type="osRtxMpInfo_t" offset="os_Info.mpi_memory_pool" count="1" init="1"/>
<readlist name="PCB" cond="RTX_En && (PCB_Rd == 0) && os_Info.mpi_memory_pool" type="osRtxMemoryPool_t" offset="mp_mpool.block_base" count="mp_mpool.max_blocks" />
<!-- Read message queue control blocks (MPI) -->
<readlist name="mp_mqueue" cond="RTX_En && (QCB_Rd == 0) && os_Info.mpi_message_queue" type="osRtxMpInfo_t" offset="os_Info.mpi_message_queue" count="1" init="1"/>
<readlist name="QCB" cond="RTX_En && (QCB_Rd == 0) && os_Info.mpi_message_queue" type="osRtxMessageQueue_t" offset="mp_mqueue.block_base" count="mp_mqueue.max_blocks" />
<!-- Read stack memory header and block list (MEM) -->
<readlist name="mem_head_stack" cond="RTX_En && os_Config.mem_stack_addr" type="mem_head_t" offset="os_Config.mem_stack_addr" count="1"/>
<readlist name="mem_list_stack" cond="RTX_En && os_Config.mem_stack_addr" type="mem_block_t" offset="os_Config.mem_stack_addr + 8" next="next"/>
<calc cond="RTX_En && os_Config.mem_stack_addr"> mem_head_stack.max_used = mem_list_stack[mem_list_stack._count-1].len; </calc>
<!-- Read memory pool data memory header and block list (MEM) -->
<readlist name="mem_head_mp_data" cond="RTX_En && os_Config.mem_mp_data_addr" type="mem_head_t" offset="os_Config.mem_mp_data_addr" count="1"/>
<readlist name="mem_list_mp_data" cond="RTX_En && os_Config.mem_mp_data_addr" type="mem_block_t" offset="os_Config.mem_mp_data_addr + 8" next="next"/>
<calc cond="RTX_En && os_Config.mem_mp_data_addr"> mem_head_mp_data.max_used = mem_list_mp_data[mem_list_mp_data._count-1].len; </calc>
<!-- Read message queue data memory header and block list (MEM) -->
<readlist name="mem_head_mq_data" cond="RTX_En && os_Config.mem_mq_data_addr" type="mem_head_t" offset="os_Config.mem_mq_data_addr" count="1"/>
<readlist name="mem_list_mq_data" cond="RTX_En && os_Config.mem_mq_data_addr" type="mem_block_t" offset="os_Config.mem_mq_data_addr + 8" next="next"/>
<calc cond="RTX_En && os_Config.mem_mq_data_addr"> mem_head_mq_data.max_used = mem_list_mq_data[mem_list_mq_data._count-1].len; </calc>
<!-- Read common memory header and block list (MEM) -->
<readlist name="mem_head_com" cond="RTX_En && os_Config.mem_common_addr" type="mem_head_t" offset="os_Config.mem_common_addr" count="1"/>
<readlist name="mem_list_com" cond="RTX_En && os_Config.mem_common_addr" type="mem_block_t" offset="os_Config.mem_common_addr + 8" next="next"/>
<calc cond="RTX_En && os_Config.mem_common_addr"> mem_head_com.max_used = mem_list_com[mem_list_com._count-1].len; </calc>
<!-- Extract control blocks located in the common memory -->
<list cond="mem_list_com._count > 1" name="i" start="0" limit="mem_list_com._count-1">
<calc>
addr = mem_list_com[i]._addr;
addr += 8;
</calc>
<!-- Read Thread Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF1)" name="TCB" type="osRtxThread_t" offset="addr" count="1" />
<!-- Read Timer Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF2)" name="CCB" type="osRtxTimer_t" offset="addr" count="1" />
<!-- Read EventFlags Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF3)" name="ECB" type="osRtxEventFlags_t" offset="addr" count="1" />
<!-- Read Mutex Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF5)" name="MCB" type="osRtxMutex_t" offset="addr" count="1" />
<!-- Read Semaphore Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF6)" name="SCB" type="osRtxSemaphore_t" offset="addr" count="1" />
<!-- Read MemoryPool Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xF7)" name="PCB" type="osRtxMemoryPool_t" offset="addr" count="1" />
<!-- Read MessageQueue Control Block -->
<readlist cond="(mem_list_com[i].len & 1) && (mem_list_com[i].id == 0xFA)" name="QCB" type="osRtxMessageQueue_t" offset="addr" count="1" />
</list>
<!-- Read thread watchdog list -->
<readlist name="WDL" cond="RTX_En && os_Config.watchdog && os_Info.thread_wdog_list" type="osRtxThread_t" offset="os_Info.thread_wdog_list" next="wdog_next" init="1"/>
<!-- Validate and process Thread control blocks -->
<list name="i" start="0" limit="TCB._count">
<calc>
TCB[i].cb_valid = (TCB[i].id == 0xF1) && (TCB[i].state != 0) && (TCB[i].sp != 0);
TCB[i].sp_valid = 1;
</calc>
<!-- Set Round Robin time tick from the running thread tick value -->
<calc cond="(TCB[i].state == 2) && os_Config.robin_timeout">
os_Info.robin_tick = TCB[i].delay;
</calc>
<!-- Stack pointer for running thread -->
<calc cond="(TCB[i].state == 2) && (__Running == 0)">
ipsr = __GetRegVal("XPSR") & 0x01FF;
psp = (v8m_ns == 0) ? (__GetRegVal("PSP")) : (__GetRegVal("PSP_NS"));
psp = (psp == 0) ? (TCB[i].sp) : (psp);
sp = ((ipsr != 0) && (ipsr < 16)) ? (TCB[i].sp) : (psp);
TCB[i].sp_valid = ((ipsr != 0) && (ipsr < 16)) ? (0) : (1);
</calc>
<calc cond="(TCB[i].state == 2) && (__Running == 1)">
TCB[i].sp_valid = 0;
sp = TCB[i].sp;
</calc>
<!-- Stack pointer for waiting thread -->
<calc cond="TCB[i].state != 2">
sp = TCB[i].sp;
</calc>
<!-- Save current stack pointer -->
<calc>
TCB[i].stack_cur = sp;
</calc>
<!-- Determine current stack usage -->
<calc cond="TCB[i].sp != 0">
TCB[i].stack_curb = TCB[i].stack_mem + TCB[i].stack_size;
TCB[i].stack_curb -= sp;
TCB[i].stack_curp = TCB[i].stack_curb;
TCB[i].stack_curp *= 100;
TCB[i].stack_curp /= TCB[i].stack_size;
</calc>
<!-- Check for current sp overflow -->
<calc cond="TCB[i].sp != 0">
TCB[i].stack_over = (sp <= TCB[i].stack_mem) ? 1 : 0;
</calc>
<!-- Check also control values to determine maximum stack usage -->
<calc cond="(os_Config.stack_wmark != 0) && (TCB[i].sp != 0) && (TCB[i].stack_over == 0) && (TCB[i].stack_size < 65536)">
TCB[i].stack_val = __CalcMemUsed (TCB[i].stack_mem, sp - TCB[i].stack_mem, 0xCCCCCCCC, 0xE25A2EA5);
TCB[i].stack_over = TCB[i].stack_val >> 31;
TCB[i].stack_maxb = (TCB[i].stack_mem + TCB[i].stack_size) - sp;
TCB[i].stack_maxb += TCB[i].stack_val & 0xFFFFF;
TCB[i].stack_maxp = (TCB[i].stack_maxb * 100)/ TCB[i].stack_size;
</calc>
<!-- Set max usage in case of stack overflow -->
<calc cond="(TCB[i].sp != 0) && (TCB[i].stack_over != 0)">
TCB[i].stack_maxb = TCB[i].stack_size;
TCB[i].stack_maxp = 100;
</calc>
<!-- Adjust maximum usage in case if current sp below max -->
<calc cond="(TCB[i].sp != 0) && (TCB[i].stack_curb >= TCB[i].stack_maxb)">
TCB[i].stack_maxb = TCB[i].stack_curb;
TCB[i].stack_maxp = TCB[i].stack_curp;
</calc>
<calc>
TCB[i].ex_delay = TCB[i].delay;
</calc>
<!-- Create Thread Delay List (TDL) -->
<readlist cond="TCB[i].delay != -1" name="TDL" type="osRtxThread_t" offset="TCB[i].delay_prev" next="delay_prev" init="1"/>
<list cond="TCB[i].delay != -1" name="j" start="0" limit="TDL._count">
<calc>
TCB[i].ex_delay += TDL[j].delay;
</calc>
</list>
<!-- Determine thread absolute watchdog tick value -->
<calc cond="os_Config.watchdog">
k = 0;
</calc>
<list cond="os_Config.watchdog" name="j" start="0" limit="WDL._count">
<calc cond="k == 0">
TCB[i].wd_tick += WDL[j].wdog_tick;
</calc>
<calc cond="TCB[i]._addr == WDL[j]._addr">
k = 1;
</calc>
</list>
<!-- Watchdog is running for a thread that was found in the watchdog list -->
<calc cond="os_Config.safety_feat">
TCB[i].wd_state = k;
</calc>
</list>
<!-- Validate and process Timer control blocks -->
<list name="i" start="0" limit="CCB._count">
<calc>
CCB[i].cb_valid = (CCB[i].id == 0xF2) && (CCB[i].state != 0);
CCB[i].ex_tick = CCB[i].tick;
</calc>
<!-- Create Timer Execution List (TEL) -->
<readlist name="TEL" type="osRtxTimer_t" offset="CCB[i].prev" next="prev" init="1"/>
<list name="j" start="0" limit="TEL._count">
<calc>
CCB[i].ex_tick += TEL[j].tick;
</calc>
</list>
</list>
<!-- Validate and process EventFlags control blocks -->
<calc> k = 0; </calc>
<list name="i" start="0" limit="ECB._count">
<calc>
ECB[i].cb_valid = (ECB[i].id == 0xF3);
ECB[i].wl_idx = k;
ECB[i].wl_cnt = 0;
</calc>
<!-- Create a list of threads waiting for event flags -->
<readlist name="EWL" type="osRtxThread_t" offset="ECB[i].thread_list" next="thread_next" cond="ECB[i].thread_list"/>
<calc cond="ECB[i].thread_list">
ECB[i].wl_cnt = (EWL._count - k);
k = EWL._count;
</calc>
</list>
<!-- Validate and process Mutex control blocks -->
<calc> k = 0; </calc>
<list cond="MCB._count" name="i" start="0" limit="MCB._count">