⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ucos.s

📁 uCOS源码
💻 S
📖 第 1 页 / 共 5 页
字号:
 100026c:	e91ba800 	ldmdb	r11, {r11, sp, pc}01000270 <init_console>: 1000270:	e1a0c00d 	mov	r12, sp 1000274:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000278:	e24cb004 	sub	r11, r12, #4	; 0x4 100027c:	e91ba800 	ldmdb	r11, {r11, sp, pc}01000280 <do_IRQ>: 1000280:	e1a0c00d 	mov	r12, sp 1000284:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000288:	e24cb004 	sub	r11, r12, #4	; 0x4}void init_console(void){ int i; i=0;}void do_IRQ(void){   atmel_timer_interrupt(); 100028c:	ebffffc7 	bl	10001b0 <atmel_timer_interrupt> 1000290:	e91ba800 	ldmdb	r11, {r11, sp, pc}01000294 <init_kernel>: 1000294:	e1a0c00d 	mov	r12, sp 1000298:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 100029c:	e24cb004 	sub	r11, r12, #4	; 0x4 10002a0:	e91ba800 	ldmdb	r11, {r11, sp, pc}010002a4 <at91_init_kernel>: 10002a4:	e1a0c00d 	mov	r12, sp 10002a8:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 10002ac:	e24cb004 	sub	r11, r12, #4	; 0x4}void init_kernel(void){   //init_IRQ();   //init_console();   //init_timer();}void at91_init_kernel(void){   init_IRQ(); 10002b0:	ebffffe8 	bl	1000258 <init_IRQ>   init_console(); 10002b4:	ebffffed 	bl	1000270 <init_console>   init_timer(); 10002b8:	ebffff9a 	bl	1000128 <init_timer> 10002bc:	e91ba800 	ldmdb	r11, {r11, sp, pc}010002c0 <OSStartHighRdy>: 10002c0:	eb000065 	bl	100045c <OSTaskSwHook> 10002c4:	e59f40f0 	ldr	r4, [pc, #f0]	; 10003bc <ARMEnableInt+0xc> 10002c8:	e3a05001 	mov	r5, #1	; 0x1 10002cc:	e5c45000 	strb	r5, [r4] 10002d0:	e59f40e8 	ldr	r4, [pc, #e8]	; 10003c0 <ARMEnableInt+0x10> 10002d4:	e5944000 	ldr	r4, [r4] 10002d8:	e594d000 	ldr	sp, [r4] 10002dc:	e8bd0010 	ldmia	sp!, {r4} 10002e0:	e169f004 	msr	SPSR_all, r4 10002e4:	e8bd0010 	ldmia	sp!, {r4} 10002e8:	e129f004 	msr	CPSR_all, r4 10002ec:	e8bddfff 	ldmia	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr, pc}010002f0 <OSCtxSw>: 10002f0:	e92d4000 	stmdb	sp!, {lr} 10002f4:	e92d5fff 	stmdb	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr} 10002f8:	e10f4000 	mrs	r4, CPSR 10002fc:	e92d0010 	stmdb	sp!, {r4} 1000300:	e14f4000 	mrs	r4, SPSR 1000304:	e92d0010 	stmdb	sp!, {r4} 1000308:	e59f40b4 	ldr	r4, [pc, #b4]	; 10003c4 <ARMEnableInt+0x14> 100030c:	e59f50b4 	ldr	r5, [pc, #b4]	; 10003c8 <ARMEnableInt+0x18> 1000310:	e5d56000 	ldrb	r6, [r5] 1000314:	e5c46000 	strb	r6, [r4] 1000318:	e59f40ac 	ldr	r4, [pc, #ac]	; 10003cc <ARMEnableInt+0x1c> 100031c:	e5945000 	ldr	r5, [r4] 1000320:	e585d000 	str	sp, [r5] 1000324:	eb00004c 	bl	100045c <OSTaskSwHook> 1000328:	e59f60a0 	ldr	r6, [pc, #a0]	; 10003d0 <ARMEnableInt+0x20> 100032c:	e5966000 	ldr	r6, [r6] 1000330:	e596d000 	ldr	sp, [r6] 1000334:	e5846000 	str	r6, [r4] 1000338:	e8bd0010 	ldmia	sp!, {r4} 100033c:	e169f004 	msr	SPSR_all, r4 1000340:	e8bd0010 	ldmia	sp!, {r4} 1000344:	e129f004 	msr	CPSR_all, r4 1000348:	e8bddfff 	ldmia	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, lr, pc}0100034c <OSIntCtxSw>: 100034c:	e59f0080 	ldr	r0, [pc, #80]	; 10003d4 <ARMEnableInt+0x24> 1000350:	e3a01001 	mov	r1, #1	; 0x1 1000354:	e5801000 	str	r1, [r0] 1000358:	e1a0f00e 	mov	pc, lr0100035c <OSTickISR>: 100035c:	e92d4fff 	stmdb	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr} 1000360:	eb00022f 	bl	1000c24 <OSTimeTick> 1000364:	ebffffc5 	bl	1000280 <do_IRQ> 1000368:	e59f0068 	ldr	r0, [pc, #68]	; 10003d8 <ARMEnableInt+0x28> 100036c:	e5901000 	ldr	r1, [r0] 1000370:	e3510001 	cmp	r1, #1	; 0x1 1000374:	0a000001 	beq	1000380 <_IntCtxSw> 1000378:	e8bd4fff 	ldmia	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr} 100037c:	e25ef004 	subs	pc, lr, #4	; 0x401000380 <_IntCtxSw>: 1000380:	e14fe000 	mrs	lr, SPSR 1000384:	e3cee01f 	bic	lr, lr, #31	; 0x1f 1000388:	e38ee013 	orr	lr, lr, #19	; 0x13 100038c:	e129f00e 	msr	CPSR_all, lr 1000390:	e8bd4fff 	ldmia	sp!, {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, lr} 1000394:	e24ee004 	sub	lr, lr, #4	; 0x4 1000398:	eaffffd4 	b	10002f0 <OSCtxSw>0100039c <ARMDisableInt>: 100039c:	e10f0000 	mrs	r0, CPSR 10003a0:	e92d0001 	stmdb	sp!, {r0} 10003a4:	e3800080 	orr	r0, r0, #128	; 0x80 10003a8:	e129f000 	msr	CPSR_all, r0 10003ac:	e1a0f00e 	mov	pc, lr010003b0 <ARMEnableInt>: 10003b0:	e8bd0001 	ldmia	sp!, {r0} 10003b4:	e129f000 	msr	CPSR_all, r0 10003b8:	e1a0f00e 	mov	pc, lr 10003bc:	010070b0 	streqh	r7, [r0, -r0] 10003c0:	010070c0 	tsteq	r0, r0, asr #1 10003c4:	010070a0 	tsteq	r0, r0, lsr #1 10003c8:	010070a4 	tsteq	r0, r4, lsr #1 10003cc:	010070b8 	streqh	r7, [r0, -r8] 10003d0:	010070c0 	tsteq	r0, r0, asr #1 10003d4:	01006058 	tsteq	r0, r8, asr r0 10003d8:	01006058 	tsteq	r0, r8, asr r0010003dc <OSTaskStkInit>: 10003dc:	e1a0c00d 	mov	r12, sp 10003e0:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc}    opt    = opt;                           /* 'opt' is not used, prevent warning                      */
    stk    = (unsigned int *)ptos;          /* Load stack pointer                                      */

    /* build a context for the new task */
    *--stk = (unsigned int) task;       /* pc */
 10003e4:	e5220004 	str	r0, [r2, -#4]!    *--stk = (unsigned int) task;       /* lr */
 10003e8:	e5220004 	str	r0, [r2, -#4]!
    *--stk = 0;                         /* r12 */
 10003ec:	e3a03000 	mov	r3, #0	; 0x0 10003f0:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r11 */
 10003f4:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r10 */
 10003f8:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r9 */
 10003fc:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r8 */
 1000400:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r7 */
 1000404:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r6 */
 1000408:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r5 */
 100040c:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r4 */
 1000410:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r3 */
 1000414:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r2 */
 1000418:	e5223004 	str	r3, [r2, -#4]!    *--stk = 0;                         /* r1 */
 100041c:	e5223004 	str	r3, [r2, -#4]!    *--stk = (unsigned int) pdata;      /* r0 */
 1000420:	e5221004 	str	r1, [r2, -#4]!    *--stk = (SVC32MODE|0x0);			/* cpsr  IRQ, FIQ disable*/
 1000424:	e2833013 	add	r3, r3, #19	; 0x13 1000428:	e5223004 	str	r3, [r2, -#4]!    *--stk = (SVC32MODE|0x0);			/* spsr  IRQ, FIQ disable */
 100042c:	e5223004 	str	r3, [r2, -#4]! 1000430:	e24cb004 	sub	r11, r12, #4	; 0x4

    return ((void *)stk);
 1000434:	e1a00002 	mov	r0, r2}
 1000438:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100043c <OSTaskCreateHook>: 100043c:	e1a0c00d 	mov	r12, sp 1000440:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000444:	e24cb004 	sub	r11, r12, #4	; 0x4 1000448:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100044c <OSTaskDelHook>: 100044c:	e1a0c00d 	mov	r12, sp 1000450:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000454:	e24cb004 	sub	r11, r12, #4	; 0x4 1000458:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100045c <OSTaskSwHook>: 100045c:	e1a0c00d 	mov	r12, sp 1000460:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000464:	e24cb004 	sub	r11, r12, #4	; 0x4 1000468:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100046c <OSTaskStatHook>: 100046c:	e1a0c00d 	mov	r12, sp 1000470:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000474:	e24cb004 	sub	r11, r12, #4	; 0x4 1000478:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100047c <OSTimeTickHook>: 100047c:	e1a0c00d 	mov	r12, sp 1000480:	e92dd800 	stmdb	sp!, {r11, r12, lr, pc} 1000484:	e24cb004 	sub	r11, r12, #4	; 0x4 1000488:	e91ba800 	ldmdb	r11, {r11, sp, pc}0100048c <OSEventTaskRdy>: 100048c:	e1a0c00d 	mov	r12, sp 1000490:	e92dd870 	stmdb	sp!, {r4, r5, r6, r11, r12, lr, pc} 1000494:	e24cb004 	sub	r11, r12, #4	; 0x4    INT8U   bity;    INT8U   prio;    y    = OSUnMapTbl[pevent->OSEventGrp];            /* Find highest prio. task waiting for message   */ 1000498:	e59fc090 	ldr	r12, [pc, #90]	; 1000530 <OSEventTaskRdy+0xa4>    bity = OSMapTbl[y]; 100049c:	e59fe090 	ldr	lr, [pc, #90]	; 1000534 <OSEventTaskRdy+0xa8> 10004a0:	e1a04000 	mov	r4, r0 10004a4:	e5d4300d 	ldrb	r3, [r4, #13] 10004a8:	e7dc5003 	ldrb	r5, [r12, r3]    x    = OSUnMapTbl[pevent->OSEventTbl[y]]; 10004ac:	e2840004 	add	r0, r4, #4	; 0x4 10004b0:	e7d03005 	ldrb	r3, [r0, r5] 10004b4:	e7dc1003 	ldrb	r1, [r12, r3] 10004b8:	e7dec005 	ldrb	r12, [lr, r5]    bitx = OSMapTbl[x]; 10004bc:	e7de6001 	ldrb	r6, [lr, r1]    prio = (INT8U)((y << 3) + x);                     /* Find priority of task getting the msg         */ 10004c0:	e0811185 	add	r1, r1, r5, lsl #3 10004c4:	e20110ff 	and	r1, r1, #255	; 0xff    if ((pevent->OSEventTbl[y] &= ~bitx) == 0) {      /* Remove this task from the waiting list        */ 10004c8:	e1c33006 	bic	r3, r3, r6 10004cc:	e3530000 	cmp	r3, #0	; 0x0 10004d0:	e7c03005 	strb	r3, [r0, r5] 10004d4:	e20200ff 	and	r0, r2, #255	; 0xff        pevent->OSEventGrp &= ~bity; 10004d8:	05d4300d 	ldreqb	r3, [r4, #13] 10004dc:	01c3300c 	biceq	r3, r3, r12 10004e0:	05c4300d 	streqb	r3, [r4, #13]    }    ptcb                 =  OSTCBPrioTbl[prio];       /* Point to this task's OS_TCB                   */ 10004e4:	e59f304c 	ldr	r3, [pc, #4c]	; 1000538 <OSEventTaskRdy+0xac> 10004e8:	e7932101 	ldr	r2, [r3, r1, lsl #2]    ptcb->OSTCBDly       =  0;                        /* Prevent OSTimeTick() from readying task       */ 10004ec:	e3a01000 	mov	r1, #0	; 0x0 10004f0:	e5821010 	str	r1, [r2, #16]    ptcb->OSTCBEventPtr  = (OS_EVENT *)0;             /* Unlink ECB from this task                     */#if (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN    ptcb->OSTCBMsg       = msg;                       /* Send message directly to waiting task         */#else    msg                  = msg;                       /* Prevent compiler warning if not used          */    #endif        ptcb->OSTCBStat     &= ~msk;                      /* Clear bit associated with event type          */ 10004f4:	e5d23014 	ldrb	r3, [r2, #20] 10004f8:	e582100c 	str	r1, [r2, #12] 10004fc:	e1c33000 	bic	r3, r3, r0    if (ptcb->OSTCBStat == OS_STAT_RDY) {             /* See if task is ready (could be susp'd)        */ 1000500:	e1530001 	cmp	r3, r1 1000504:	e5c23014 	strb	r3, [r2, #20] 1000508:	191ba870 	ldmnedb	r11, {r4, r5, r6, r11, sp, pc}        OSRdyGrp        |=  bity;                     /* Put task in the ready to run list             */ 100050c:	e59f1028 	ldr	r1, [pc, #28]	; 100053c <OSEventTaskRdy+0xb0>        OSRdyTbl[y]     |=  bitx; 1000510:	e59f0028 	ldr	r0, [pc, #28]	; 1000540 <OSEventTaskRdy+0xb4> 1000514:	e5d13000 	ldrb	r3, [r1] 1000518:	e7d02005 	ldrb	r2, [r0, r5] 100051c:	e18c3003 	orr	r3, r12, r3 1000520:	e5c13000 	strb	r3, [r1] 1000524:	e1862002 	orr	r2, r6, r2 1000528:	e7c02005 	strb	r2, [r0, r5]    }} 100052c:	e91ba870 	ldmdb	r11, {r4, r5, r6, r11, sp, pc} 1000530:	0100145c 	tsteq	r0, r12, asr r4 1000534:	01001454 	tsteq	r0, r4, asr r4 1000538:	010070c8 	tsteq	r0, r8, asr #1 100053c:	010070a8 	tsteq	r0, r8, lsr #1 1000540:	010070ac 	tsteq	r0, r12, lsr #101000544 <OSEventTaskWait>: 1000544:	e1a0c00d 	mov	r12, sp 1000548:	e92dd810 	stmdb	sp!, {r4, r11, r12, lr, pc}#endif/*$PAGE*//***********************************************************************************************************                                   MAKE TASK WAIT FOR EVENT TO OCCUR** Description: This function is called by other uC/OS-II services to suspend a task because an event has*              not occurred.** Arguments  : pevent   is a pointer to the event control block for which the task will be waiting for.** Returns    : none** Note       : This function is INTERNAL to uC/OS-II and your application should not call it.**********************************************************************************************************/#if  (OS_Q_EN && (OS_MAX_QS >= 2)) || OS_MBOX_EN || OS_SEM_ENvoid  OSEventTaskWait (OS_EVENT *pevent){    OSTCBCur->OSTCBEventPtr = pevent;            /* Store pointer to event control block in TCB        */ 100054c:	e59f4074 	ldr	r4, [pc, #74]	; 10005c8 <OSEventTaskWait+0x84>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -