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

📄 os_core.txt

📁 ucos2.86版本结合STM板极支持包
💻 TXT
📖 第 1 页 / 共 5 页
字号:
; generated by ARM/Thumb C/C++ Compiler with , RVCT3.1 [Build 914] for uVision
; commandline ArmCC [--debug -c --asm --interleave -o.\rvmdk\os_core.o --depend=.\rvmdk\os_core.d --device=DARMSTM -O1 -Otime -I. -I..\BSP -I..\..\..\..\..\uCOS-II\Ports\arm-cortex-m3\Generic\RealView -I..\..\..\..\..\uCOS-II\Source -I..\..\..\..\..\CPU\ST\STM32\inc -I..\..\..\..\..\uC-CPU -I..\..\..\..\..\uC-CPU\Arm-Cortex-M3\RealView -I..\..\..\..\..\uC-LIB -I..\..\..\..\..\uC-Probe\Target\Plugins\uCOS-II -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\Source -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Ports\ST\STM32 -I..\..\..\..\..\uC-Probe\Target\Communication\Generic\RS-232\Source -ID:\Keil\ARM\INC\ST\STM32F10x ..\..\..\..\..\uCOS-II\Source\os_core.c]
                          THUMB

                          AREA ||.text||, CODE, READONLY, ALIGN=2

                  OS_StrCopy PROC
;;;1305   
;;;1306       len = 0;
000000  2200              MOVS     r2,#0
;;;1307       while (*psrc != OS_ASCII_NUL) {
000002  780b              LDRB     r3,[r1,#0]
000004  b143              CBZ      r3,|L1.24|
                  |L1.6|
000006  780b              LDRB     r3,[r1,#0]
000008  f800f800          STRB     r3,[r0],#1
00000c  1c52              ADDS     r2,r2,#1
;;;1308           *pdest++ = *psrc++;
;;;1309           len++;
00000e  b2d2              UXTB     r2,r2
000010  f811f811          LDRB     r3,[r1,#1]!
000014  2b00              CMP      r3,#0
000016  d1f6              BNE      |L1.6|
                  |L1.24|
;;;1310       }
;;;1311       *pdest = OS_ASCII_NUL;
000018  2100              MOVS     r1,#0
00001a  7001              STRB     r1,[r0,#0]
;;;1312       return (len);
00001c  4610              MOV      r0,r2
;;;1313   }
00001e  4770              BX       lr
;;;1314   #endif
                          ENDP

                  OSEventNameGet PROC
;;;108    INT8U  OSEventNameGet (OS_EVENT *pevent, INT8U *pname, INT8U *perr)
;;;109    {
000020  e92de92d          PUSH     {r4-r8,lr}
000024  4605              MOV      r5,r0
000026  460e              MOV      r6,r1
000028  4614              MOV      r4,r2
;;;110        INT8U      len;
;;;111    #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
;;;112        OS_CPU_SR  cpu_sr = 0;
;;;113    #endif
;;;114    
;;;115    
;;;116    
;;;117    #if OS_ARG_CHK_EN > 0
;;;118        if (perr == (INT8U *)0) {                    /* Validate 'perr'                                    */
00002a  b914              CBNZ     r4,|L1.50|
;;;119            return (0);
00002c  2000              MOVS     r0,#0
00002e  e8bde8bd          POP      {r4-r8,pc}
                  |L1.50|
;;;120        }
;;;121        if (pevent == (OS_EVENT *)0) {               /* Is 'pevent' a NULL pointer?                        */
000032  b925              CBNZ     r5,|L1.62|
;;;122            *perr = OS_ERR_PEVENT_NULL;
000034  2004              MOVS     r0,#4
000036  7020              STRB     r0,[r4,#0]
;;;123            return (0);
000038  2000              MOVS     r0,#0
00003a  e8bde8bd          POP      {r4-r8,pc}
                  |L1.62|
;;;124        }
;;;125        if (pname == (INT8U *)0) {                   /* Is 'pname' a NULL pointer?                         */
00003e  b926              CBNZ     r6,|L1.74|
;;;126            *perr = OS_ERR_PNAME_NULL;
000040  200c              MOVS     r0,#0xc
000042  7020              STRB     r0,[r4,#0]
;;;127            return (0);
000044  2000              MOVS     r0,#0
000046  e8bde8bd          POP      {r4-r8,pc}
                  |L1.74|
;;;128        }
;;;129    #endif
;;;130        if (OSIntNesting > 0) {                      /* See if trying to call from an ISR                  */
00004a  48ff              LDR      r0,|L1.1096|
00004c  7880              LDRB     r0,[r0,#2]  ; OSIntNesting
00004e  b120              CBZ      r0,|L1.90|
;;;131            *perr  = OS_ERR_NAME_GET_ISR;
000050  2011              MOVS     r0,#0x11
000052  7020              STRB     r0,[r4,#0]
;;;132            return (0);
000054  2000              MOVS     r0,#0
000056  e8bde8bd          POP      {r4-r8,pc}
                  |L1.90|
;;;133        }
;;;134        switch (pevent->OSEventType) {
00005a  7828              LDRB     r0,[r5,#0]
00005c  2801              CMP      r0,#1
00005e  d005              BEQ      |L1.108|
000060  2802              CMP      r0,#2
000062  d003              BEQ      |L1.108|
000064  2803              CMP      r0,#3
000066  d001              BEQ      |L1.108|
000068  2804              CMP      r0,#4
00006a  d110              BNE      |L1.142|
                  |L1.108|
;;;135            case OS_EVENT_TYPE_SEM:
;;;136            case OS_EVENT_TYPE_MUTEX:
;;;137            case OS_EVENT_TYPE_MBOX:
;;;138            case OS_EVENT_TYPE_Q:
;;;139                 break;
;;;140    
;;;141            default:
;;;142                 *perr = OS_ERR_EVENT_TYPE;
;;;143                 return (0);
;;;144        }
;;;145        OS_ENTER_CRITICAL();
00006c  f7fff7ff          BL       OS_CPU_SR_Save
000070  4607              MOV      r7,r0
;;;146        len   = OS_StrCopy(pname, pevent->OSEventName);   /* Copy name from OS_EVENT                       */
000072  f105f105          ADD      r1,r5,#0xf
000076  4630              MOV      r0,r6
000078  f7fff7ff          BL       OS_StrCopy
00007c  4605              MOV      r5,r0
;;;147        OS_EXIT_CRITICAL();
00007e  4638              MOV      r0,r7
000080  f7fff7ff          BL       OS_CPU_SR_Restore
;;;148        *perr = OS_ERR_NONE;
000084  2000              MOVS     r0,#0
000086  7020              STRB     r0,[r4,#0]
;;;149        return (len);
000088  4628              MOV      r0,r5
00008a  e8bde8bd          POP      {r4-r8,pc}
                  |L1.142|
00008e  2001              MOVS     r0,#1
000090  7020              STRB     r0,[r4,#0]
000092  2000              MOVS     r0,#0
;;;150    }
000094  e8bde8bd          POP      {r4-r8,pc}
;;;151    #endif
                          ENDP

                  OS_StrLen PROC
;;;1337   
;;;1338       len = 0;
000098  2100              MOVS     r1,#0
;;;1339       while (*psrc != OS_ASCII_NUL) {
00009a  7802              LDRB     r2,[r0,#0]
00009c  b12a              CBZ      r2,|L1.170|
                  |L1.158|
00009e  1c49              ADDS     r1,r1,#1
;;;1340           psrc++;
;;;1341           len++;
0000a0  b2c9              UXTB     r1,r1
0000a2  f810f810          LDRB     r2,[r0,#1]!
0000a6  2a00              CMP      r2,#0
0000a8  d1f9              BNE      |L1.158|
                  |L1.170|
;;;1342       }
;;;1343       return (len);
0000aa  4608              MOV      r0,r1
;;;1344   }
0000ac  4770              BX       lr
;;;1345   #endif
                          ENDP

                  OSEventNameSet PROC
;;;182    void  OSEventNameSet (OS_EVENT *pevent, INT8U *pname, INT8U *perr)
;;;183    {
0000ae  e92de92d          PUSH     {r4-r8,lr}
0000b2  4605              MOV      r5,r0
0000b4  460e              MOV      r6,r1
0000b6  4614              MOV      r4,r2
;;;184        INT8U      len;
;;;185    #if OS_CRITICAL_METHOD == 3                      /* Allocate storage for CPU status register           */
;;;186        OS_CPU_SR  cpu_sr = 0;
;;;187    #endif
;;;188    
;;;189    
;;;190    
;;;191    #if OS_ARG_CHK_EN > 0
;;;192        if (perr == (INT8U *)0) {                    /* Validate 'perr'                                    */
0000b8  2c00              CMP      r4,#0
0000ba  d002              BEQ      |L1.194|
;;;193            return;
;;;194        }
;;;195        if (pevent == (OS_EVENT *)0) {               /* Is 'pevent' a NULL pointer?                        */
0000bc  b91d              CBNZ     r5,|L1.198|
;;;196            *perr = OS_ERR_PEVENT_NULL;
0000be  2004              MOVS     r0,#4
0000c0  7020              STRB     r0,[r4,#0]
                  |L1.194|
0000c2  e8bde8bd          POP      {r4-r8,pc}
                  |L1.198|
;;;197            return;
;;;198        }
;;;199        if (pname == (INT8U *)0) {                   /* Is 'pname' a NULL pointer?                         */
0000c6  b91e              CBNZ     r6,|L1.208|
;;;200            *perr = OS_ERR_PNAME_NULL;
0000c8  200c              MOVS     r0,#0xc
0000ca  7020              STRB     r0,[r4,#0]
0000cc  e8bde8bd          POP      {r4-r8,pc}
                  |L1.208|
;;;201            return;
;;;202        }
;;;203    #endif
;;;204        if (OSIntNesting > 0) {                      /* See if trying to call from an ISR                  */
0000d0  48dd              LDR      r0,|L1.1096|
0000d2  7880              LDRB     r0,[r0,#2]  ; OSIntNesting
0000d4  b118              CBZ      r0,|L1.222|
;;;205            *perr = OS_ERR_NAME_SET_ISR;
0000d6  2012              MOVS     r0,#0x12
0000d8  7020              STRB     r0,[r4,#0]
0000da  e8bde8bd          POP      {r4-r8,pc}
                  |L1.222|
;;;206            return;
;;;207        }
;;;208        switch (pevent->OSEventType) {
0000de  7828              LDRB     r0,[r5,#0]
0000e0  2801              CMP      r0,#1
0000e2  d005              BEQ      |L1.240|
0000e4  2802              CMP      r0,#2
0000e6  d003              BEQ      |L1.240|
0000e8  2803              CMP      r0,#3
0000ea  d001              BEQ      |L1.240|
0000ec  2804              CMP      r0,#4
0000ee  d10e              BNE      |L1.270|
                  |L1.240|
0000f0  f7fff7ff          BL       OS_CPU_SR_Save
;;;209            case OS_EVENT_TYPE_SEM:
;;;210            case OS_EVENT_TYPE_MUTEX:
;;;211            case OS_EVENT_TYPE_MBOX:
;;;212            case OS_EVENT_TYPE_Q:
;;;213                 break;
;;;214    
;;;215            default:
;;;216                 *perr = OS_ERR_EVENT_TYPE;
;;;217                 return;
;;;218        }
;;;219        OS_ENTER_CRITICAL();
0000f4  4607              MOV      r7,r0
0000f6  4630              MOV      r0,r6
0000f8  f7fff7ff          BL       OS_StrLen
0000fc  280f              CMP      r0,#0xf
;;;220        len = OS_StrLen(pname);                           /* Can we fit the string in the storage area?    */
;;;221        if (len > (OS_EVENT_NAME_SIZE - 1)) {             /* No                                            */
0000fe  d90a              BLS      |L1.278|
000100  4638              MOV      r0,r7
000102  f7fff7ff          BL       OS_CPU_SR_Restore
000106  200b              MOVS     r0,#0xb
;;;222            OS_EXIT_CRITICAL();
;;;223            *perr = OS_ERR_EVENT_NAME_TOO_LONG;
000108  7020              STRB     r0,[r4,#0]
00010a  e8bde8bd          POP      {r4-r8,pc}
                  |L1.270|
00010e  2001              MOVS     r0,#1
000110  7020              STRB     r0,[r4,#0]
000112  e8bde8bd          POP      {r4-r8,pc}
                  |L1.278|
;;;224            return;
;;;225        }
;;;226        (void)OS_StrCopy(pevent->OSEventName, pname);     /* Yes, copy name to the event control block     */
000116  4631              MOV      r1,r6
000118  f105f105          ADD      r0,r5,#0xf
00011c  f7fff7ff          BL       OS_StrCopy
;;;227        OS_EXIT_CRITICAL();
000120  4638              MOV      r0,r7
000122  f7fff7ff          BL       OS_CPU_SR_Restore
;;;228        *perr = OS_ERR_NONE;
000126  2000              MOVS     r0,#0
000128  7020              STRB     r0,[r4,#0]
;;;229    }
00012a  e8bde8bd          POP      {r4-r8,pc}
;;;230    #endif
                          ENDP

                  OS_TaskStatStkChk PROC
;;;1465   void  OS_TaskStatStkChk (void)
;;;1466   {
00012e  b530              PUSH     {r4,r5,lr}
000130  b083              SUB      sp,sp,#0xc

⌨️ 快捷键说明

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