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

📄 os_cpu_c.lst

📁 编译环境是 iar EWARM ,STM32 下的UCOSII
💻 LST
📖 第 1 页 / 共 3 页
字号:
   \   00000006   00BD               POP      {PC}             ;; return
    258          #endif
    259          
    260          /*
    261          *********************************************************************************************************
    262          *                                           OS_TCBInit() HOOK
    263          *
    264          * Description: This function is called by OS_TCBInit() after setting up most of the TCB.
    265          *
    266          * Arguments  : ptcb    is a pointer to the TCB of the task being created.
    267          *
    268          * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
    269          *********************************************************************************************************
    270          */
    271          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203

   \                                 In segment CODE, align 4, keep-with-next
    272          void  OSTCBInitHook (OS_TCB *ptcb)
    273          {
   \                     OSTCBInitHook:
   \   00000000   00B5               PUSH     {LR}
    274          #if OS_APP_HOOKS_EN > 0
    275              App_TCBInitHook(ptcb);
   \   00000002   ........           _BLF     App_TCBInitHook,??App_TCBInitHook??rT
    276          #else
    277              (void)ptcb;                                  /* Prevent compiler warning                           */
    278          #endif
    279          }
   \   00000006   00BD               POP      {PC}             ;; return
    280          #endif
    281          
    282          
    283          /*
    284          *********************************************************************************************************
    285          *                                               TICK HOOK
    286          *
    287          * Description: This function is called every tick.
    288          *
    289          * Arguments  : none
    290          *
    291          * Note(s)    : 1) Interrupts may or may not be ENABLED during this call.
    292          *********************************************************************************************************
    293          */
    294          #if (OS_CPU_HOOKS_EN > 0) && (OS_TIME_TICK_HOOK_EN > 0)

   \                                 In segment CODE, align 4, keep-with-next
    295          void  OSTimeTickHook (void)
    296          {
   \                     OSTimeTickHook:
   \   00000000   00B5               PUSH     {LR}
    297          #if OS_APP_HOOKS_EN > 0
    298              App_TimeTickHook();
   \   00000002   ........           _BLF     App_TimeTickHook,??App_TimeTickHook??rT
    299          #endif
    300          
    301          #if OS_TMR_EN > 0
    302              OSTmrCtr++;
    303              if (OSTmrCtr >= (OS_TICKS_PER_SEC / OS_TMR_CFG_TICKS_PER_SEC)) {
    304                  OSTmrCtr = 0;
    305                  OSTmrSignal();
    306              }
    307          #endif
    308          }
   \   00000006   00BD               POP      {PC}             ;; return
    309          #endif
    310          
    311          
    312          
    313          /*
    314          *********************************************************************************************************
    315          *                                         OS_CPU_SysTickHandler()
    316          *
    317          * Description: Handle the system tick (SysTick) interrupt, which is used to generate the uC/OS-II tick
    318          *              interrupt.
    319          *
    320          * Arguments  : none.
    321          *
    322          * Note(s)    : 1) This function MUST be placed on entry 15 of the Cortex-M3 vector table.
    323          *********************************************************************************************************
    324          */
    325          

   \                                 In segment CODE, align 4, keep-with-next
    326          void  OS_CPU_SysTickHandler (void)
    327          {
   \                     OS_CPU_SysTickHandler:
   \   00000000   00B5               PUSH     {LR}
    328              OS_CPU_SR  cpu_sr;
    329          
    330          
    331              OS_ENTER_CRITICAL();                         /* Tell uC/OS-II that we are starting an ISR          */
   \   00000002   ........           _BLF     OS_CPU_SR_Save,??OS_CPU_SR_Save??rT
    332              OSIntNesting++;
   \   00000006   0549               LDR.N    R1,??OS_CPU_SysTickHandler_0  ;; OSIntNesting
   \   00000008   0A78               LDRB     R2,[R1, #+0]
   \   0000000A   521C               ADDS     R2,R2,#+1
   \   0000000C   0A70               STRB     R2,[R1, #+0]
    333              OS_EXIT_CRITICAL();
   \   0000000E   ........           _BLF     OS_CPU_SR_Restore,??OS_CPU_SR_Restore??rT
    334          
    335              OSTimeTick();                                /* Call uC/OS-II's OSTimeTick()                       */
   \   00000012   ........           _BLF     OSTimeTick,??OSTimeTick??rT
    336          
    337              OSIntExit();                                 /* Tell uC/OS-II that we are leaving the ISR          */
   \   00000016   ........           _BLF     OSIntExit,??OSIntExit??rT
    338          }
   \   0000001A   00BD               POP      {PC}             ;; return
   \                     ??OS_CPU_SysTickHandler_0:
   \   0000001C   ........           DC32     OSIntNesting
    339          
    340          
    341          /*
    342          *********************************************************************************************************
    343          *                                          OS_CPU_SysTickInit()
    344          *
    345          * Description: Initialize the SysTick.
    346          *
    347          * Arguments  : none.
    348          *
    349          * Note(s)    : 1) This function MUST be called after OSStart() & after processor initialization.
    350          *********************************************************************************************************
    351          */
    352          

   \                                 In segment CODE, align 4, keep-with-next
    353          void  OS_CPU_SysTickInit (void)
    354          {
   \                     OS_CPU_SysTickInit:
   \   00000000   00B5               PUSH     {LR}
    355              INT32U  cnts;
    356          
    357          
    358              cnts = OS_CPU_SysTickClkFreq() / OS_TICKS_PER_SEC;
   \   00000002   ........           _BLF     OS_CPU_SysTickClkFreq,??OS_CPU_SysTickClkFreq??rT
   \   00000006   5FF47A71           MOVS     R1,#+1000
   \   0000000A   B0FBF1F0           UDIV     R0,R0,R1
    359          
    360              OS_CPU_CM3_NVIC_ST_RELOAD = (cnts - 1);
   \   0000000E   0649               LDR.N    R1,??OS_CPU_SysTickInit_0  ;; 0xffffffffe000e014
   \   00000010   401E               SUBS     R0,R0,#+1
   \   00000012   0860               STR      R0,[R1, #+0]
    361                                                           /* Enable timer.                                      */
    362              OS_CPU_CM3_NVIC_ST_CTRL  |= OS_CPU_CM3_NVIC_ST_CTRL_CLK_SRC | OS_CPU_CM3_NVIC_ST_CTRL_ENABLE;
   \   00000014   0548               LDR.N    R0,??OS_CPU_SysTickInit_0+0x4  ;; 0xffffffffe000e010
   \   00000016   0168               LDR      R1,[R0, #+0]
   \   00000018   51F00501           ORRS     R1,R1,#0x5
   \   0000001C   0160               STR      R1,[R0, #+0]
    363                                                           /* Enable timer interrupt.                            */
    364              OS_CPU_CM3_NVIC_ST_CTRL  |= OS_CPU_CM3_NVIC_ST_CTRL_INTEN;
   \   0000001E   0168               LDR      R1,[R0, #+0]
   \   00000020   51F00201           ORRS     R1,R1,#0x2
   \   00000024   0160               STR      R1,[R0, #+0]
    365          }
   \   00000026   00BD               POP      {PC}             ;; return
   \                     ??OS_CPU_SysTickInit_0:
   \   00000028   14E000E0           DC32     0xffffffffe000e014
   \   0000002C   10E000E0           DC32     0xffffffffe000e010

   Maximum stack usage in bytes:

     Function              CSTACK
     --------              ------
     OSInitHookBegin           0
     OSInitHookEnd             0
     OSTCBInitHook             4
     OSTaskCreateHook          4
     OSTaskDelHook             4
     OSTaskIdleHook            4
     OSTaskStatHook            4
     OSTaskStkInit             0
     OSTaskSwHook              4
     OSTimeTickHook            4
     OS_CPU_SysTickHandler     4
     OS_CPU_SysTickInit        4


   Segment part sizes:

     Function/Label        Bytes
     --------------        -----
     OSInitHookBegin          2
     OSInitHookEnd            2
     OSTaskCreateHook         8
     OSTaskDelHook            8
     OSTaskIdleHook           8
     OSTaskStatHook           8
     OSTaskStkInit          120
     OSTaskSwHook             8
     OSTCBInitHook            8
     OSTimeTickHook           8
     OS_CPU_SysTickHandler   32
     OS_CPU_SysTickInit      48
      Others                 96

 
 356 bytes in segment CODE
 
 260 bytes of CODE memory (+ 96 bytes shared)

Errors: none
Warnings: none

⌨️ 快捷键说明

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