📄 os_probe.txt
字号:
;;;186 #if OS_TASK_NAME_SIZE > 20
;;;187 OSTaskNameSet(OS_PROBE_TASK_PRIO, (INT8U *)"uC/Probe OS Plug-In", &err);
;;;188 #else
;;;189 #if OS_TASK_NAME_SIZE > 12
;;;190 OSTaskNameSet(OS_PROBE_TASK_PRIO, (INT8U *)"uC/Probe OS", &err);
0000fc aa06 ADD r2,sp,#0x18
0000fe a12a ADR r1,|L1.424|
000100 2008 MOVS r0,#8
000102 f7fff7ff BL OSTaskNameSet
;;;191 #endif
;;;192 #endif
;;;193 }
000106 b007 ADD sp,sp,#0x1c
000108 bd00 POP {pc}
;;;194 #endif
ENDP
OSProbe_SetCallback PROC
;;;211 {
;;;212 OSProbe_CallbackFnct = call_back;
00010a 4925 LDR r1,|L1.416|
00010c 6048 STR r0,[r1,#4] ; OSProbe_CallbackFnct
;;;213 }
00010e 4770 BX lr
;;;214 #endif
ENDP
OSProbe_SetDelay PROC
;;;231 {
;;;232 OSProbe_Delay = delay;
000110 4923 LDR r1,|L1.416|
000112 8008 STRH r0,[r1,#0] ; OSProbe_Delay
;;;233 }
000114 4770 BX lr
;;;234 #endif
ENDP
OSProbe_Init PROC
;;;109 void OSProbe_Init (void)
;;;110 {
000116 b510 PUSH {r4,lr}
;;;111 #if OS_PROBE_TASK > 0
;;;112 OSProbe_SetDelay(100);
000118 2064 MOVS r0,#0x64
00011a f7fff7ff BL OSProbe_SetDelay
;;;113 OSProbe_SetCallback((void (*)(void))0); /* Force terminal callback function to 'nothing' */
00011e 2000 MOVS r0,#0
000120 f7fff7ff BL OSProbe_SetCallback
;;;114
;;;115 (void)OSProbe_TaskCPUUsage;
;;;116 (void)OSProbe_TaskStkUsage;
;;;117
;;;118 OSProbe_InitOS();
000124 f7fff7ff BL OSProbe_InitOS
;;;119 #endif
;;;120
;;;121 #if OS_PROBE_HOOKS_EN > 0
;;;122 OSProbe_TmrInit();
000128 f7fff7ff BL OSProbe_TmrInit
;;;123
;;;124 OSProbe_CyclesCtr = 0;
00012c 491c LDR r1,|L1.416|
00012e 2000 MOVS r0,#0
000130 6088 STR r0,[r1,#8] ; OSProbe_CyclesCtr
;;;125 OSProbe_TmrCntsPrev = 0;
000132 8048 STRH r0,[r1,#2] ; OSProbe_TmrCntsPrev
;;;126 #endif
;;;127 }
000134 bd10 POP {r4,pc}
;;;128
ENDP
OSProbe_TimeGetCycles PROC
;;;313 INT32U OSProbe_TimeGetCycles(void)
;;;314 {
000136 b570 PUSH {r4-r6,lr}
;;;315 INT32U cycles;
;;;316 #if OS_PROBE_TMR_32_BITS > 0
;;;317 INT32U cnts32;
;;;318 INT32U cnts32_delta;
;;;319 #else
;;;320 INT16U cnts16;
;;;321 INT16U cnts16_delta;
;;;322 #endif
;;;323 #if OS_CRITICAL_METHOD == 3 /* Allocate storage for CPU status register */
;;;324 OS_CPU_SR cpu_sr = 0;
;;;325 #endif
;;;326
;;;327
;;;328 OS_ENTER_CRITICAL();
000138 f7fff7ff BL OS_CPU_SR_Save
00013c 4605 MOV r5,r0
;;;329 #if OS_PROBE_TMR_32_BITS > 0
;;;330 cnts32 = OSProbe_TmrRd(); /* Read current counts of the free running counter */
;;;331 cnts32_delta = cnts32 - OSProbe_TmrCntsPrev;
;;;332 OSProbe_TmrCntsPrev = cnts32; /* Save current counts for next time */
;;;333 OSProbe_CyclesCtr += cnts32_delta;
;;;334 #else
;;;335 cnts16 = (INT16U)OSProbe_TmrRd(); /* Read current counts of the free running counter */
00013e f7fff7ff BL OSProbe_TmrRd
;;;336 cnts16_delta = cnts16 - OSProbe_TmrCntsPrev;
000142 4917 LDR r1,|L1.416|
000144 884a LDRH r2,[r1,#2] ; OSProbe_TmrCntsPrev
000146 1a82 SUBS r2,r0,r2
000148 b292 UXTH r2,r2
;;;337 OSProbe_TmrCntsPrev = cnts16; /* Save current counts for next time */
00014a 8048 STRH r0,[r1,#2] ; OSProbe_TmrCntsPrev
;;;338 OSProbe_CyclesCtr += (INT32U)cnts16_delta;
00014c 6888 LDR r0,[r1,#8] ; OSProbe_CyclesCtr
00014e 1884 ADDS r4,r0,r2
000150 608c STR r4,[r1,#8] ; OSProbe_CyclesCtr
;;;339 #endif
;;;340 cycles = OSProbe_CyclesCtr;
;;;341 OS_EXIT_CRITICAL();
000152 4628 MOV r0,r5
000154 f7fff7ff BL OS_CPU_SR_Restore
;;;342
;;;343 return (cycles);
000158 4620 MOV r0,r4
;;;344 }
00015a bd70 POP {r4-r6,pc}
;;;345 #endif
ENDP
OSProbe_TaskCreateHook PROC
;;;254 void OSProbe_TaskCreateHook (OS_TCB *ptcb)
;;;255 {
00015c b510 PUSH {r4,lr}
00015e 4604 MOV r4,r0
;;;256 ptcb->OSTCBCyclesStart = OSProbe_TimeGetCycles(); /* Get the current start time for this task. */
000160 f7fff7ff BL OSProbe_TimeGetCycles
000164 63e0 STR r0,[r4,#0x3c]
;;;257 ptcb->OSTCBCyclesTot = 0; /* Update the task's total execution time */
000166 2000 MOVS r0,#0
000168 63a0 STR r0,[r4,#0x38]
;;;258 }
00016a bd10 POP {r4,pc}
;;;259 #endif
ENDP
OSProbe_TaskSwHook PROC
;;;271 void OSProbe_TaskSwHook (void)
;;;272 {
00016c b510 PUSH {r4,lr}
;;;273 INT32U cycles;
;;;274
;;;275
;;;276 cycles = OSProbe_TimeGetCycles(); /* This task is done */
00016e f7fff7ff BL OSProbe_TimeGetCycles
;;;277 OSTCBCur->OSTCBCyclesTot += cycles - OSTCBCur->OSTCBCyclesStart;
000172 4910 LDR r1,|L1.436|
000174 6809 LDR r1,[r1,#0] ; OSTCBCur
000176 6bcb LDR r3,[r1,#0x3c]
000178 6b8a LDR r2,[r1,#0x38]
00017a 1ac3 SUBS r3,r0,r3
00017c 441a ADD r2,r2,r3
00017e 638a STR r2,[r1,#0x38]
;;;278 OSTCBHighRdy->OSTCBCyclesStart = cycles; /* Save absolute #cycles at task activation */
000180 490d LDR r1,|L1.440|
000182 6809 LDR r1,[r1,#0] ; OSTCBHighRdy
000184 63c8 STR r0,[r1,#0x3c]
;;;279 }
000186 bd10 POP {r4,pc}
;;;280 #endif
ENDP
OSProbe_TickHook PROC
;;;295 {
;;;296 (void)OSProbe_TimeGetCycles();
000188 e7fe B OSProbe_TimeGetCycles
;;;297 }
;;;298 #endif
ENDP
00018a 0000 DCW 0x0000
|L1.396|
00018c 00000000 DCD ||cycles_tot_last@OSProbe_Task_1||
|L1.400|
000190 00000040 DCD ||.bss||+0x40
|L1.404|
000194 00000000 DCD ||cycles_dif@OSProbe_Task_0||
|L1.408|
000198 00000000 DCD OSTCBTbl
|L1.412|
00019c 00000000 DCD ||.bss||
|L1.416|
0001a0 00000000 DCD ||.data||
|L1.420|
0001a4 00000000 DCD OSProbe_TaskStk
|L1.424|
0001a8 75432f50 DCB "uC/P"
0001ac 726f6265 DCB "robe"
0001b0 204f5300 DCB " OS\0"
|L1.436|
0001b4 00000000 DCD OSTCBCur
|L1.440|
0001b8 00000000 DCD OSTCBHighRdy
AREA ||.data||, DATA, ALIGN=2
OSProbe_Delay
000000 0000 DCB 0x00,0x00
OSProbe_TmrCntsPrev
000002 0000 DCB 0x00,0x00
OSProbe_CallbackFnct
000004 00000000 DCD 0x00000000
OSProbe_CyclesCtr
000008 00000000 DCD 0x00000000
AREA ||.bss||, DATA, NOINIT, ALIGN=2
OSProbe_TaskCPUUsage
% 64
OSProbe_TaskStkUsage
% 64
||cycles_dif@OSProbe_Task_0||
% 64
||cycles_tot_last@OSProbe_Task_1||
% 64
OSProbe_TaskStk
% 1024
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -