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

📄 os_cpu_c.lst

📁 lpc2478开发板基于IAR编译器移植ucos实验例程
💻 LST
📖 第 1 页 / 共 4 页
字号:
    310              *(--stk)  = (INT32U)0x09090909L;                                    /* R9                                                       */
   \   00000048   040050E2           SUBS     R0,R0,#+4
   \   0000004C   A4509FE5           LDR      R5,??OSTaskStkInit_0+0x10  ;; 0x9090909
   \   00000050   005080E5           STR      R5,[R0, #+0]
    311              *(--stk)  = (INT32U)0x08080808L;                                    /* R8                                                       */
   \   00000054   040050E2           SUBS     R0,R0,#+4
   \   00000058   9C509FE5           LDR      R5,??OSTaskStkInit_0+0x14  ;; 0x8080808
   \   0000005C   005080E5           STR      R5,[R0, #+0]
    312              *(--stk)  = (INT32U)0x07070707L;                                    /* R7                                                       */
   \   00000060   040050E2           SUBS     R0,R0,#+4
   \   00000064   94509FE5           LDR      R5,??OSTaskStkInit_0+0x18  ;; 0x7070707
   \   00000068   005080E5           STR      R5,[R0, #+0]
    313              *(--stk)  = (INT32U)0x06060606L;                                    /* R6                                                       */
   \   0000006C   040050E2           SUBS     R0,R0,#+4
   \   00000070   8C509FE5           LDR      R5,??OSTaskStkInit_0+0x1C  ;; 0x6060606
   \   00000074   005080E5           STR      R5,[R0, #+0]
    314              *(--stk)  = (INT32U)0x05050505L;                                    /* R5                                                       */
   \   00000078   040050E2           SUBS     R0,R0,#+4
   \   0000007C   84509FE5           LDR      R5,??OSTaskStkInit_0+0x20  ;; 0x5050505
   \   00000080   005080E5           STR      R5,[R0, #+0]
    315              *(--stk)  = (INT32U)0x04040404L;                                    /* R4                                                       */
   \   00000084   040050E2           SUBS     R0,R0,#+4
   \   00000088   7C509FE5           LDR      R5,??OSTaskStkInit_0+0x24  ;; 0x4040404
   \   0000008C   005080E5           STR      R5,[R0, #+0]
    316              *(--stk)  = (INT32U)0x03030303L;                                    /* R3                                                       */
   \   00000090   040050E2           SUBS     R0,R0,#+4
   \   00000094   74509FE5           LDR      R5,??OSTaskStkInit_0+0x28  ;; 0x3030303
   \   00000098   005080E5           STR      R5,[R0, #+0]
    317              *(--stk)  = (INT32U)0x02020202L;                                    /* R2                                                       */
   \   0000009C   040050E2           SUBS     R0,R0,#+4
   \   000000A0   6C509FE5           LDR      R5,??OSTaskStkInit_0+0x2C  ;; 0x2020202
   \   000000A4   005080E5           STR      R5,[R0, #+0]
    318              *(--stk)  = (INT32U)0x01010101L;                                    /* R1                                                       */
   \   000000A8   040050E2           SUBS     R0,R0,#+4
   \   000000AC   64509FE5           LDR      R5,??OSTaskStkInit_0+0x30  ;; 0x1010101
   \   000000B0   005080E5           STR      R5,[R0, #+0]
    319              *(--stk)  = (INT32U)p_arg;                                          /* R0 : argument                                            */
   \   000000B4   040050E2           SUBS     R0,R0,#+4
   \   000000B8   001080E5           STR      R1,[R0, #+0]
    320              if ((INT32U)task & 0x01) {                                          /* See if task runs in Thumb or ARM mode                    */
   \   000000BC   01001CE3           TST      R12,#0x1
   \   000000C0   0300000A           BEQ      ??OSTaskStkInit_1
    321                  *(--stk) = (INT32U)ARM_SVC_MODE_THUMB;                          /* CPSR  (Enable both IRQ and FIQ interrupts, THUMB-mode)   */
   \   000000C4   040050E2           SUBS     R0,R0,#+4
   \   000000C8   3350A0E3           MOV      R5,#+51
   \   000000CC   005080E5           STR      R5,[R0, #+0]
   \   000000D0   020000EA           B        ??OSTaskStkInit_2
    322              } else {
    323                  *(--stk) = (INT32U)ARM_SVC_MODE_ARM;                            /* CPSR  (Enable both IRQ and FIQ interrupts, ARM-mode)     */
   \                     ??OSTaskStkInit_1:
   \   000000D4   040050E2           SUBS     R0,R0,#+4
   \   000000D8   1350A0E3           MOV      R5,#+19
   \   000000DC   005080E5           STR      R5,[R0, #+0]
    324              }
    325          
    326              return (stk);
   \                     ??OSTaskStkInit_2:
   \   000000E0   3000BDE8           POP      {R4,R5}
   \   000000E4   0EF0A0E1           MOV      PC,LR            ;; return
   \                     ??OSTaskStkInit_0:
   \   000000E8   14141414           DC32     0x14141414
   \   000000EC   12121212           DC32     0x12121212
   \   000000F0   11111111           DC32     0x11111111
   \   000000F4   10101010           DC32     0x10101010
   \   000000F8   09090909           DC32     0x9090909
   \   000000FC   08080808           DC32     0x8080808
   \   00000100   07070707           DC32     0x7070707
   \   00000104   06060606           DC32     0x6060606
   \   00000108   05050505           DC32     0x5050505
   \   0000010C   04040404           DC32     0x4040404
   \   00000110   03030303           DC32     0x3030303
   \   00000114   02020202           DC32     0x2020202
   \   00000118   01010101           DC32     0x1010101
    327          }
    328          
    329          /*
    330          *********************************************************************************************************
    331          *                                           TASK SWITCH HOOK
    332          *
    333          * Description: This function is called when a task switch is performed.  This allows you to perform other
    334          *              operations during a context switch.
    335          *
    336          * Arguments  : none
    337          *
    338          * Note(s)    : 1) Interrupts are disabled during this call.
    339          *              2) It is assumed that the global pointer 'OSTCBHighRdy' points to the TCB of the task that
    340          *                 will be 'switched in' (i.e. the highest priority task) and, 'OSTCBCur' points to the
    341          *                 task being switched out (i.e. the preempted task).
    342          *********************************************************************************************************
    343          */
    344          #if (OS_CPU_HOOKS_EN > 0) && (OS_TASK_SW_HOOK_EN > 0)

   \                                 In segment CODE, align 4, keep-with-next
    345          void  OSTaskSwHook (void)
    346          {
   \                     OSTaskSwHook:
   \   00000000   00402DE9           PUSH     {LR}
    347          #if OS_CPU_FPU_EN > 0
    348              void  *pblk;
    349          #endif
    350          
    351          #if OS_CPU_FPU_EN > 0                                      /* Save VFP context of preempted task       */
    352              if (OSRunning == OS_TRUE) {                            /* Don't save on OSStart()!                 */
    353                  if (OSTCBCur->OSTCBOpt & OS_TASK_OPT_SAVE_FP) {    /* See if task used FP                      */
    354                      pblk = OSTCBCur->OSTCBExtPtr;                  /* Yes, Get pointer to FP storage area      */
    355                      if (pblk != (void *)0) {                       /*      Make sure we have storage           */
    356                          OS_CPU_FP_Save(pblk);                      /*      Save the VFP registers in block     */
    357                      }
    358                  }
    359              }
    360                                                                     /* Restore VFP context of new task          */
    361              if (OSTCBHighRdy->OSTCBOpt & OS_TASK_OPT_SAVE_FP) {    /* See if new task uses FP                  */
    362                  pblk = OSTCBHighRdy->OSTCBExtPtr;                  /* Yes, Get pointer to FP storage area      */
    363                  if (pblk != (void *)0) {                           /*      Make sure we have storage           */
    364                      OS_CPU_FP_Restore(pblk);                       /*      Get contents of VFP registers       */
    365                  }
    366              }
    367          #endif
    368          
    369          #if OS_VIEW_MODULE > 0
    370              OSView_TaskSwHook();
   \   00000004   ........           _BLF     OSView_TaskSwHook,??OSView_TaskSwHook??rA
    371          #endif
    372          }
   \   00000008   0080BDE8           POP      {PC}             ;; return
    373          #endif
    374          
    375          /*
    376          *********************************************************************************************************
    377          *                                           OS_TCBInit() HOOK
    378          *
    379          * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
    380          *
    381          * Arguments  : ptcb    is a pointer to the TCB of the task being created.
    382          *
    383          * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
    384          *********************************************************************************************************
    385          */
    386          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203

   \                                 In segment CODE, align 4, keep-with-next
    387          void  OSTCBInitHook (OS_TCB *ptcb)
    388          {
    389              (void)ptcb;                                                         /* Prevent Compiler warning                                 */
    390          }
   \                     OSTCBInitHook:
   \   00000000   0EF0A0E1           MOV      PC,LR            ;; return
    391          #endif
    392          
    393          
    394          /*
    395          *********************************************************************************************************
    396          *                                               TICK HOOK
    397          *
    398          * Description: This function is called every tick.
    399          *
    400          * Arguments  : none
    401          *
    402          * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
    403          *********************************************************************************************************
    404          */
    405          #if (OS_CPU_HOOKS_EN > 0) && (OS_TIME_TICK_HOOK_EN > 0)

   \                                 In segment CODE, align 4, keep-with-next
    406          void  OSTimeTickHook (void)
    407          {
   \                     OSTimeTickHook:
   \   00000000   00402DE9           PUSH     {LR}
    408          #if OS_VIEW_MODULE > 0
    409              OSView_TickHook();
   \   00000004   ........           _BLF     OSView_TickHook,??OSView_TickHook??rA
    410          #endif
    411          
    412          #if OS_TMR_EN > 0
    413              OSTmrCtr++;
   \   00000008   ........           LDR      R0,??DataTable4  ;; OSTmrCtr
   \   0000000C   ........           LDR      R1,??DataTable4  ;; OSTmrCtr
   \   00000010   B010D1E1           LDRH     R1,[R1, #+0]
   \   00000014   011091E2           ADDS     R1,R1,#+1
   \   00000018   B010C0E1           STRH     R1,[R0, #+0]
    414              if (OSTmrCtr >= (OS_TICKS_PER_SEC / OS_TMR_CFG_TICKS_PER_SEC)) {
   \   0000001C   ........           LDR      R0,??DataTable4  ;; OSTmrCtr
   \   00000020   B000D0E1           LDRH     R0,[R0, #+0]
   \   00000024   640050E3           CMP      R0,#+100
   \   00000028   0300003A           BCC      ??OSTimeTickHook_0
    415                  OSTmrCtr = 0;
   \   0000002C   ........           LDR      R0,??DataTable4  ;; OSTmrCtr
   \   00000030   0010A0E3           MOV      R1,#+0
   \   00000034   B010C0E1           STRH     R1,[R0, #+0]
    416                  OSTmrSignal();
   \   00000038   ........           _BLF     OSTmrSignal,??OSTmrSignal??rA
    417              }
    418          #endif
    419          
    420          #if OS_CPU_ARM_DCC_EN > 0
    421              OSDCC_Handler();
   \                     ??OSTimeTickHook_0:
   \   0000003C   ........           _BLF     OSDCC_Handler,??OSDCC_Handler??rA
    422          #endif
    423          }

⌨️ 快捷键说明

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