📄 rtx_config.txt
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.0 [Build 951] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\output\rtx_config.o --device=DARMST --apcs=interwork -O0 -Id:\Keil\ARM\INC\ST\71x src\configuration\RTX_Config.c]
ARM
AREA ||.text.7||, CODE, READONLY, ALIGN=2
os_idle_demon PROC
;;;210
;;;211 for (;;) {
000000 e1a00000 MOV r0,r0
|L1.4|
000004 eafffffe B |L1.4|
;;;212 /* HERE: include here optional user code to be executed when no task runs.*/
;;;213 }
;;;214 } /* end of os_idle_demon */
ENDP
os_tmr_call PROC
;;;222 /* HERE: include here optional user code to be executed on timeout. */
;;;223 info = info;
000008 e1a00000 MOV r0,r0
;;;224 } /* end of os_tmr_call */
00000c e12fff1e BX lr
ENDP
os_stk_overflow PROC
;;;228 #if (OS_STKCHECK == 1)
;;;229 static void os_stk_overflow (void) {
000010 e92d4010 PUSH {r4,lr}
;;;230 /* This function is called when a stack overflow is detected. */
;;;231 /* 'os_runtask' points to a TCB of a task which has a stack overflow */
;;;232 /* 'task_id' holds a task id for this task */
;;;233 /* HERE: include here optional code to be executed on stack overflow. */
;;;234 static volatile OS_TID task_id;
;;;235
;;;236 /* Get a task identification for a task with stack problem to 'task_id'.*/
;;;237 task_id = os_get_TID (os_runtask);
000014 e59f0498 LDR r0,|L1.1204|
000018 e5900000 LDR r0,[r0,#0] ; os_runtask
00001c ebfffffe BL os_get_TID
000020 e59f1490 LDR r1,|L1.1208|
000024 e5810000 STR r0,[r1,#0] ; task_id@os_stk_overflow_0
;;;238 /* Use a uVision 'RTX Kernel' debug dialog page 'Active Tasks' to */
;;;239 /* check which task has got a stack overflow and needs a bigger stack. */
;;;240 for (;;);
000028 e1a00000 MOV r0,r0
|L1.44|
00002c eafffffe B |L1.44|
;;;241 }
ENDP
os_clock_interrupt0 PROC
;;;245
;;;246 U32 os_clock_interrupt0 (U32 stack) {
000030 e92d4010 PUSH {r4,lr}
000034 e1a04000 MOV r4,r0
;;;247 /* Do task switch to clock demon: entered upon a clock interrupt. Saving */
;;;248 /* and restoring context is written in assembly (module: Irq_RTX.s) */
;;;249 OS_TIACK();
000038 e59f047c LDR r0,|L1.1212|
00003c e1d001b8 LDRH r0,[r0,#0x18]
000040 e3c00a02 BIC r0,r0,#0x2000
000044 e59f1470 LDR r1,|L1.1212|
000048 e1c101b8 STRH r0,[r1,#0x18]
00004c e3e00b02 MVN r0,#0x800
000050 e1c101bc STRH r0,[r1,#0x1c]
000054 e3a00001 MOV r0,#1
000058 e3a01000 MOV r1,#0
00005c e50107c0 STR r0,[r1,#-0x7c0]
;;;250 OS_LOCK();
000060 e3a00000 MOV r0,#0
000064 e5100800 LDR r0,[r0,#-0x800]
000068 e3c00001 BIC r0,r0,#1
00006c e5010800 STR r0,[r1,#-0x800]
;;;251 os_runtask->tsk_stack = stack;
000070 e59f043c LDR r0,|L1.1204|
000074 e5900000 LDR r0,[r0,#0] ; os_runtask
000078 e5804024 STR r4,[r0,#0x24]
;;;252 os_runtask->full_ctx = __TRUE;
00007c e3a00001 MOV r0,#1
000080 e59f142c LDR r1,|L1.1204|
000084 e5911000 LDR r1,[r1,#0] ; os_runtask
000088 e5c10021 STRB r0,[r1,#0x21]
;;;253 os_runtask->state = READY;
00008c e59f1420 LDR r1,|L1.1204|
000090 e5911000 LDR r1,[r1,#0] ; os_runtask
000094 e5c10001 STRB r0,[r1,#1]
;;;254 os_put_rdy_first (os_runtask);
000098 e59f0414 LDR r0,|L1.1204|
00009c e5900000 LDR r0,[r0,#0] ; os_runtask
0000a0 ebfffffe BL os_put_rdy_first
;;;255 os_runtask = &os_clock_TCB;
0000a4 e59f0414 LDR r0,|L1.1216|
0000a8 e59f1404 LDR r1,|L1.1204|
0000ac e5810000 STR r0,[r1,#0] ; os_runtask
;;;256 os_clock_TCB.state = RUNNING;
0000b0 e3a00002 MOV r0,#2
0000b4 e59f1404 LDR r1,|L1.1216|
0000b8 e5c10001 STRB r0,[r1,#1] ; os_clock_TCB
;;;257 return (os_runtask->tsk_stack);
0000bc e59f03f0 LDR r0,|L1.1204|
0000c0 e5900000 LDR r0,[r0,#0] ; os_runtask
0000c4 e5900024 LDR r0,[r0,#0x24]
0000c8 e8bd4010 POP {r4,lr}
;;;258 } /* end of os_clock_interrupt0 */
0000cc e12fff1e BX lr
ENDP
os_def_interrupt PROC
;;;264 OS_IACK();
;;;265 }
0000d0 e25ef004 SUBS pc,lr,#4
ENDP
os_tmr_init PROC
;;;271 /* called at the system startup. */
;;;272 OS_TINIT();
0000d4 e59f03e8 LDR r0,|L1.1220|
0000d8 e59f13dc LDR r1,|L1.1212|
0000dc e1c100bc STRH r0,[r1,#0xc]
0000e0 e2800fee ADD r0,r0,#0x3b8
0000e4 e1c101b8 STRH r0,[r1,#0x18]
0000e8 e59f03d8 LDR r0,|L1.1224|
0000ec e1c101b4 STRH r0,[r1,#0x14]
0000f0 e59f03d4 LDR r0,|L1.1228|
0000f4 e3a01000 MOV r1,#0
0000f8 e50107e8 STR r0,[r1,#-0x7e8]
0000fc e3a01001 MOV r1,#1
000100 e1810800 ORR r0,r1,r0,LSL #16
000104 e3a01000 MOV r1,#0
000108 e50107a0 STR r0,[r1,#-0x7a0]
00010c e3a00000 MOV r0,#0
000110 e51007e0 LDR r0,[r0,#-0x7e0]
000114 e3800001 ORR r0,r0,#1
000118 e50107e0 STR r0,[r1,#-0x7e0]
;;;273 #if (OS_ROBIN == 1)
;;;274 os_robin_time = OS_ROBINTOUT;
00011c e3a00005 MOV r0,#5
000120 e59f13a8 LDR r1,|L1.1232|
000124 e1c100b0 STRH r0,[r1,#0] ; os_robin_time
;;;275 #endif
;;;276 } /* end of os_tmr_init */
000128 e12fff1e BX lr
ENDP
os_tmr_reload PROC
;;;282 OS_TREL();
;;;283 } /* end of os_tmr_reload */
00012c e12fff1e BX lr
ENDP
os_tmr_force_irq PROC
;;;288 /* Force a timer interrupt. */
;;;289 OS_TFIRQ();
000130 e59f0384 LDR r0,|L1.1212|
000134 e1d001b8 LDRH r0,[r0,#0x18]
000138 e3800a02 ORR r0,r0,#0x2000
00013c e59f1378 LDR r1,|L1.1212|
000140 e1c101b8 STRH r0,[r1,#0x18]
;;;290 } /* end of os_tmr_force_irq */
000144 e12fff1e BX lr
ENDP
os_tmr_inspect_cnt PROC
;;;295 /* Inspect current value of rtx timer. */
;;;296 return (OS_TVAL);
000148 e59f036c LDR r0,|L1.1212|
00014c e1d001b0 LDRH r0,[r0,#0x10]
000150 e2800004 ADD r0,r0,#4
000154 e3c00801 BIC r0,r0,#0x10000
;;;297 } /* end of os_tmr_inspect_cnt */
000158 e12fff1e BX lr
ENDP
os_tmr_inspect_ovf PROC
;;;302 /* Inspect current state of timer overflow flag. */
;;;303 return (OS_TOVF);
00015c e59f0358 LDR r0,|L1.1212|
000160 e1d001bc LDRH r0,[r0,#0x1c]
000164 e2000b02 AND r0,r0,#0x800
;;;304 } /* end of os_tmr_inspect_ovf */
000168 e12fff1e BX lr
ENDP
__SWI_7 PROC
;;;312 /* pheripheral may run with a slower clock than CPU. */
;;;313 OS_LOCK();
00016c e3a00000 MOV r0,#0
000170 e5100800 LDR r0,[r0,#-0x800]
000174 e3c00001 BIC r0,r0,#1
000178 e3a01000 MOV r1,#0
00017c e5010800 STR r0,[r1,#-0x800]
;;;314 /* Wait for 'OS_LOCK' to become active. */
;;;315 __nop();
000180 e1a00000 MOV r0,r0
;;;316 __nop();
000184 e1a00000 MOV r0,r0
;;;317 __nop();
000188 e1a00000 MOV r0,r0
;;;318 }
00018c e12fff1e BX lr
ENDP
tsk_lock PROC
;;;321
;;;322 void tsk_lock (void) {
000190 e92d4010 PUSH {r4,lr}
;;;323 /* Lock out tasks: prevents task switching by locking out scheduler */
;;;324 /* activation on interrupt. . */
;;;325 os_lock ();
000194 ef000007 SVC 0x7 ; formerly SWI
;;;326 } /* end of tsk_lock */
000198 e8bd4010 POP {r4,lr}
00019c e12fff1e BX lr
ENDP
tsk_unlock PROC
;;;331 /* Enable AR System Tick Timer Interrupts. */
;;;332 OS_UNLOCK();
0001a0 e3a00000 MOV r0,#0
0001a4 e5100800 LDR r0,[r0,#-0x800]
0001a8 e3800001 ORR r0,r0,#1
0001ac e3a01000 MOV r1,#0
0001b0 e5010800 STR r0,[r1,#-0x800]
;;;333 } /* end of tsk_unlock */
0001b4 e12fff1e BX lr
ENDP
os_init_mem PROC
;;;336
;;;337 void os_init_mem (void) {
0001b8 e92d4010 PUSH {r4,lr}
;;;338 U32 i;
;;;339
;;;340 for (i = 0; i < OS_TASKCNT; i++) {
0001bc e3a04000 MOV r4,#0
0001c0 ea000003 B |L1.468|
;;;341 os_active_TCB[i] = NULL;
|L1.452|
0001c4 e3a00000 MOV r0,#0
0001c8 e59f1304 LDR r1,|L1.1236|
0001cc e7810104 STR r0,[r1,r4,LSL #2]
0001d0 e2844001 ADD r4,r4,#1 ;340
|L1.468|
0001d4 e3540006 CMP r4,#6 ;340
0001d8 3afffff9 BCC |L1.452| ;340
;;;342 }
;;;343 _init_box (&m_tcb, sizeof(m_tcb), sizeof(struct OS_TCB));
0001dc e3a02030 MOV r2,#0x30
0001e0 e3a01f4b MOV r1,#0x12c
0001e4 e59f02ec LDR r0,|L1.1240|
0001e8 ebfffffe BL _init_box
;;;344 _init_box8 (&m_stk, sizeof(m_stk), OS_STKSIZE*4);
0001ec e59f22e8 LDR r2,|L1.1244|
0001f0 e3a01e65 MOV r1,#0x650
0001f4 e59f02e4 LDR r0,|L1.1248|
0001f8 ebfffffe BL _init_box
;;;345 #if (OS_TIMERCNT != 0)
;;;346 _init_box (&m_tmr, sizeof(m_tmr), sizeof(struct OS_TMR));
;;;347 #endif
;;;348 } /* end of os_init_mem */
0001fc e8bd4010 POP {r4,lr}
000200 e12fff1e BX lr
ENDP
os_alloc_TCB PROC
;;;351
;;;352 P_TCB os_alloc_TCB () {
000204 e92d4010 PUSH {r4,lr}
;;;353 return (_alloc_box (m_tcb));
000208 e59f02c8 LDR r0,|L1.1240|
00020c ef000001 SVC 0x1 ; formerly SWI
000210 e8bd4010 POP {r4,lr}
;;;354 } /* end of os_alloc_TCB */
000214 e12fff1e BX lr
ENDP
os_free_TCB PROC
;;;357
;;;358 void os_free_TCB (P_TCB p_TCB) {
000218 e92d4010 PUSH {r4,lr}
00021c e1a04000 MOV r4,r0
;;;359 /* Free allocated memory resources for the task "p_TCB" */
;;;360 _free_box (m_stk, p_TCB->stack);
000220 e59f02b8 LDR r0,|L1.1248|
000224 e5941028 LDR r1,[r4,#0x28]
000228 ef000002 SVC 0x2 ; formerly SWI
;;;361 _free_box (m_tcb, p_TCB);
00022c e1a01004 MOV r1,r4
000230 e59f02a0 LDR r0,|L1.1240|
000234 ef000002 SVC 0x2 ; formerly SWI
;;;362 #if (OS_STKCHECK == 1)
;;;363 if (os_runtask == p_TCB) {
000238 e59f0274 LDR r0,|L1.1204|
00023c e5900000 LDR r0,[r0,#0] ; os_runtask
000240 e1500004 CMP r0,r4
000244 1a000002 BNE |L1.596|
;;;364 /* os_tsk_delete_self() called. */
;;;365 os_del_flag = __TRUE;
000248 e3a00001 MOV r0,#1
00024c e59f1290 LDR r1,|L1.1252|
000250 e5c10000 STRB r0,[r1,#0] ; os_del_flag
;;;366 }
;;;367 #endif
;;;368 } /* end of os_free_TCB */
|L1.596|
000254 e8bd4010 POP {r4,lr}
000258 e12fff1e BX lr
ENDP
os_alloc_TMR PROC
;;;375 #else
;;;376 return (NULL);
00025c e3a00000 MOV r0,#0
;;;377 #endif
;;;378 } /* end of os_alloc_TMR */
000260 e12fff1e BX lr
ENDP
os_free_TMR PROC
;;;386 #else
;;;387 timer = timer;
000264 e1a00000 MOV r0,r0
;;;388 #endif
;;;389 } /* end of os_free_TMR */
000268 e12fff1e BX lr
ENDP
os_init_context PROC
;;;393 void os_init_context (P_TCB p_TCB, U8 priority,
;;;394 FUNCP task_body, U8 full_context) {
00026c e92d47f0 PUSH {r4-r10,lr}
000270 e1a04000 MOV r4,r0
000274 e1a05001 MOV r5,r1
000278 e1a06002 MOV r6,r2
00027c e1a07003 MOV r7,r3
;;;395 /* Prepare TCB and saved context for a first time start of a task */
;;;396 /* "p_TCB" points to TCB to be initialised. "priority" indicates desired */
;;;397 /* execution priority. "task_body" is the start address of the task. */
;;;398 /* "full_context" identifies context type. */
;;;399 U32 *stk,i;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -