📄 os_cpu_c.lst
字号:
189
190 opt = opt; /* 'opt' is not used, prevent warning */
191 stk = ptos; /* Load stack pointer */
192 *(stk) = (OS_STK)task; /* Entry Point */
\ OSTaskStkInit:
\ 00000000 1060 STR R0,[R2, #+0]
193 *(--stk) = (INT32U)0x14141414L; /* R14 (LR) */
\ 00000002 121F SUBS R2,R2,#+4
\ 00000004 1648 LDR R0,??OSTaskStkInit_0 ;; 0x14141414
\ 00000006 1060 STR R0,[R2, #+0]
194 *(--stk) = (INT32U)0x12121212L; /* R12 */
\ 00000008 121F SUBS R2,R2,#+4
\ 0000000A 1648 LDR R0,??OSTaskStkInit_0+0x4 ;; 0x12121212
\ 0000000C 1060 STR R0,[R2, #+0]
195 *(--stk) = (INT32U)0x11111111L; /* R11 */
\ 0000000E 121F SUBS R2,R2,#+4
\ 00000010 1548 LDR R0,??OSTaskStkInit_0+0x8 ;; 0x11111111
\ 00000012 1060 STR R0,[R2, #+0]
196 *(--stk) = (INT32U)0x10101010L; /* R10 */
\ 00000014 121F SUBS R2,R2,#+4
\ 00000016 1548 LDR R0,??OSTaskStkInit_0+0xC ;; 0x10101010
\ 00000018 1060 STR R0,[R2, #+0]
197 *(--stk) = (INT32U)0x09090909L; /* R9 */
\ 0000001A 121F SUBS R2,R2,#+4
\ 0000001C 1448 LDR R0,??OSTaskStkInit_0+0x10 ;; 0x9090909
\ 0000001E 1060 STR R0,[R2, #+0]
198 *(--stk) = (INT32U)0x08080808L; /* R8 */
\ 00000020 121F SUBS R2,R2,#+4
\ 00000022 1448 LDR R0,??OSTaskStkInit_0+0x14 ;; 0x8080808
\ 00000024 1060 STR R0,[R2, #+0]
199 *(--stk) = (INT32U)0x07070707L; /* R7 */
\ 00000026 121F SUBS R2,R2,#+4
\ 00000028 1348 LDR R0,??OSTaskStkInit_0+0x18 ;; 0x7070707
\ 0000002A 1060 STR R0,[R2, #+0]
200 *(--stk) = (INT32U)0x06060606L; /* R6 */
\ 0000002C 121F SUBS R2,R2,#+4
\ 0000002E 1348 LDR R0,??OSTaskStkInit_0+0x1C ;; 0x6060606
\ 00000030 1060 STR R0,[R2, #+0]
201 *(--stk) = (INT32U)0x05050505L; /* R5 */
\ 00000032 121F SUBS R2,R2,#+4
\ 00000034 1248 LDR R0,??OSTaskStkInit_0+0x20 ;; 0x5050505
\ 00000036 1060 STR R0,[R2, #+0]
202 *(--stk) = (INT32U)0x04040404L; /* R4 */
\ 00000038 121F SUBS R2,R2,#+4
\ 0000003A 1248 LDR R0,??OSTaskStkInit_0+0x24 ;; 0x4040404
\ 0000003C 1060 STR R0,[R2, #+0]
203 *(--stk) = (INT32U)0x03030303L; /* R3 */
\ 0000003E 121F SUBS R2,R2,#+4
\ 00000040 1148 LDR R0,??OSTaskStkInit_0+0x28 ;; 0x3030303
\ 00000042 1060 STR R0,[R2, #+0]
204 *(--stk) = (INT32U)0x02020202L; /* R2 */
\ 00000044 121F SUBS R2,R2,#+4
\ 00000046 1148 LDR R0,??OSTaskStkInit_0+0x2C ;; 0x2020202
\ 00000048 1060 STR R0,[R2, #+0]
205 *(--stk) = (INT32U)0x01010101L; /* R1 */
\ 0000004A 121F SUBS R2,R2,#+4
\ 0000004C 4008 LSRS R0,R0,#+1
\ 0000004E 1060 STR R0,[R2, #+0]
206 *(--stk) = (INT32U)p_arg; /* R0 : argument */
\ 00000050 121F SUBS R2,R2,#+4
\ 00000052 1160 STR R1,[R2, #+0]
207 *(--stk) = (INT32U)ARM_SVC_MODE; /* CPSR (Enable both IRQ and FIQ interrupts) */
\ 00000054 121F SUBS R2,R2,#+4
\ 00000056 3320 MOVS R0,#+51
\ 00000058 1060 STR R0,[R2, #+0]
208
209 return (stk);
\ 0000005A 1000 MOVS R0,R2
\ 0000005C 7047 BX LR ;; return
\ 0000005E C046 Nop
\ ??OSTaskStkInit_0:
\ 00000060 14141414 DC32 0x14141414
\ 00000064 12121212 DC32 0x12121212
\ 00000068 11111111 DC32 0x11111111
\ 0000006C 10101010 DC32 0x10101010
\ 00000070 09090909 DC32 0x9090909
\ 00000074 08080808 DC32 0x8080808
\ 00000078 07070707 DC32 0x7070707
\ 0000007C 06060606 DC32 0x6060606
\ 00000080 05050505 DC32 0x5050505
\ 00000084 04040404 DC32 0x4040404
\ 00000088 03030303 DC32 0x3030303
\ 0000008C 02020202 DC32 0x2020202
210 }
211
212 /*
213 *********************************************************************************************************
214 * TASK SWITCH HOOK
215 *
216 * Description: This function is called when a task switch is performed. This allows you to perform other
217 * operations during a context switch.
218 *
219 * Arguments : none
220 *
221 * Note(s) : 1) Interrupts are disabled during this call.
222 * 2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
223 * will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the
224 * task being switched out (i.e. the preempted task).
225 *********************************************************************************************************
226 */
227 #if (OS_CPU_HOOKS_EN > 0) && (OS_TASK_SW_HOOK_EN > 0)
\ In segment CODE, align 4, keep-with-next
228 void OSTaskSwHook (void)
229 {
230 #if OS_VIEW_MODULE > 0
231 OSView_TaskSwHook();
232 #endif
233 }
\ OSTaskSwHook:
\ 00000000 7047 BX LR ;; return
234 #endif
235
236 /*
237 *********************************************************************************************************
238 * OS_TCBInit() HOOK
239 *
240 * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
241 *
242 * Arguments : ptcb is a pointer to the TCB of the task being created.
243 *
244 * Note(s) : 1) Interrupts may or may not be ENABLED during this call.
245 *********************************************************************************************************
246 */
247 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
\ In segment CODE, align 4, keep-with-next
248 void OSTCBInitHook (OS_TCB *ptcb)
249 {
250 (void)ptcb; /* Prevent Compiler warning */
251 }
\ OSTCBInitHook:
\ 00000000 7047 BX LR ;; return
252 #endif
253
254
255 /*
256 *********************************************************************************************************
257 * TICK HOOK
258 *
259 * Description: This function is called every tick.
260 *
261 * Arguments : none
262 *
263 * Note(s) : 1) Interrupts may or may not be ENABLED during this call.
264 *********************************************************************************************************
265 */
266 #if (OS_CPU_HOOKS_EN > 0) && (OS_TIME_TICK_HOOK_EN > 0)
\ In segment CODE, align 4, keep-with-next
267 void OSTimeTickHook (void)
268 {
269 #if OS_VIEW_MODULE > 0
270 OSView_TickHook();
271 #endif
272 }
\ OSTimeTickHook:
\ 00000000 7047 BX LR ;; return
273 #endif
274
275
276 /*
277 *********************************************************************************************************
278 * INTERRUPT DISABLE TIME MEASUREMENT, START
279 *********************************************************************************************************
280 */
281
282 #if OS_CPU_INT_DIS_MEAS_EN > 0
283 void OS_CPU_IntDisMeasInit (void)
284 {
285 OS_CPU_IntDisMeasNestingCtr = 0;
286 OS_CPU_IntDisMeasCntsEnter = 0;
287 OS_CPU_IntDisMeasCntsExit = 0;
288 OS_CPU_IntDisMeasCntsMax = 0;
289 OS_CPU_IntDisMeasCntsDelta = 0;
290 OS_CPU_IntDisMeasCntsOvrhd = 0;
291 OS_CPU_IntDisMeasStart(); /* Measure the overhead of the functions */
292 OS_CPU_IntDisMeasStop();
293 OS_CPU_IntDisMeasCntsOvrhd = OS_CPU_IntDisMeasCntsDelta;
294 }
295
296
297 void OS_CPU_IntDisMeasStart (void)
298 {
299 OS_CPU_IntDisMeasNestingCtr++;
300 if (OS_CPU_IntDisMeasNestingCtr == 1) { /* Only measure at the first nested level */
301 OS_CPU_IntDisMeasCntsEnter = OS_CPU_IntDisMeasTmrRd();
302 }
303 }
304
305
306 void OS_CPU_IntDisMeasStop (void)
307 {
308 OS_CPU_IntDisMeasNestingCtr--; /* Decrement nesting ctr */
309 if (OS_CPU_IntDisMeasNestingCtr == 0) {
310 OS_CPU_IntDisMeasCntsExit = OS_CPU_IntDisMeasTmrRd();
311 OS_CPU_IntDisMeasCntsDelta = OS_CPU_IntDisMeasCntsExit - OS_CPU_IntDisMeasCntsEnter;
312 if (OS_CPU_IntDisMeasCntsDelta > OS_CPU_IntDisMeasCntsOvrhd) { /* Ensure overhead < delta */
313 OS_CPU_IntDisMeasCntsDelta -= OS_CPU_IntDisMeasCntsOvrhd;
314 } else {
315 OS_CPU_IntDisMeasCntsDelta = OS_CPU_IntDisMeasCntsOvrhd;
316 }
317 if (OS_CPU_IntDisMeasCntsDelta > OS_CPU_IntDisMeasCntsMax) { /* Track MAXIMUM */
318 OS_CPU_IntDisMeasCntsMax = OS_CPU_IntDisMeasCntsDelta;
319 }
320 }
321 }
322 #endif
Maximum stack usage in bytes:
Function CSTACK
-------- ------
OSInitHookBegin 0
OSInitHookEnd 0
OSTCBInitHook 0
OSTaskCreateHook 0
OSTaskDelHook 0
OSTaskIdleHook 0
OSTaskStatHook 0
OSTaskStkInit 0
OSTaskSwHook 0
OSTimeTickHook 0
Segment part sizes:
Function/Label Bytes
-------------- -----
OSInitHookBegin 2
OSInitHookEnd 2
OSTaskCreateHook 2
OSTaskDelHook 2
OSTaskIdleHook 2
OSTaskStatHook 2
OSTaskStkInit 144
OSTaskSwHook 2
OSTCBInitHook 2
OSTimeTickHook 2
Others 80
242 bytes in segment CODE
162 bytes of CODE memory (+ 80 bytes shared)
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -