app.lst

来自「stm32+ucos-ii」· LST 代码 · 共 335 行 · 第 1/2 页

LST
335
字号
     99              OSTaskNameSet(APP_TASK_START_PRIO, "Start Task", &err);
   \   0000002C   05AA               ADD      R2,SP,#+20
   \   0000002E   ........           ADR.W    R1,`?<Constant "Start Task">`
   \   00000032   0420               MOVS     R0,#+4
   \   00000034   ........           BL       OSTaskNameSet
    100          #endif
    101          
    102              OSStart();                                                  /* Start multitasking (i.e. give control to uC/OS-II)       */
   \   00000038   ........           BL       OSStart
    103          }
   \   0000003C   0020               MOVS     R0,#+0
   \   0000003E   07B0               ADD      SP,SP,#+28
   \   00000040   00BD               POP      {PC}             ;; return
    104          
    105          
    106          /*
    107          *********************************************************************************************************
    108          *                                          STARTUP TASK
    109          *
    110          * Description : This is an example of a startup task.  As mentioned in the book's text, you MUST
    111          *               initialize the ticker only once multitasking has started.
    112          *
    113          * Arguments   : p_arg   is the argument passed to 'AppTaskStart()' by 'OSTaskCreate()'.
    114          *
    115          * Returns     : none
    116          *
    117          * Notes       : 1) The first line of code is used to prevent a compiler warning because 'p_arg' is not
    118          *                  used.  The compiler should not generate any code for this statement.
    119          *********************************************************************************************************
    120          */
    121          

   \                                 In section .text, align 2, keep-with-next
    122          static  void  AppTaskStart (void *p_arg)
    123          {
   \                     AppTaskStart:
   \   00000000   70B5               PUSH     {R4-R6,LR}
   \   00000002   0400               MOVS     R4,R0
    124              CPU_INT32U  hclk_freq;
    125              CPU_INT32U  cnts;
    126              
    127          
    128             (void)p_arg;
    129          
    130              BSP_Init();                                                 /* Init BSP fncts.                                          */
   \   00000004   ........           BL       BSP_Init
    131          
    132              CPU_Init();                                                 /* Init CPU name & int. dis. time measuring fncts.          */
   \   00000008   ........           BL       CPU_Init
    133              
    134          #if (BSP_SER_COMM_EN == DEF_ENABLED)                            /* Init serial port 0 to 115,2000 baud for use  with  ...   */
    135              BSP_Ser_Init(115200);                                       /* ... tracing. See app_cfg.h.                              */
    136          #endif
    137          
    138              hclk_freq = BSP_CPU_ClkFreq();                              /* Determine SysTick reference freq.                        */
   \   0000000C   ........           BL       BSP_CPU_ClkFreq
   \   00000010   0500               MOVS     R5,R0
    139              cnts  = hclk_freq / (CPU_INT32U)OS_TICKS_PER_SEC;           /* Determine nbr SysTick increments in OS_TICKS_PER_SEC.    */
   \   00000012   4FF47A70           MOV      R0,#+1000
   \   00000016   B5FBF0F0           UDIV     R0,R5,R0
   \   0000001A   0600               MOVS     R6,R0
    140              OS_CPU_SysTickInit(cnts);                                   /* Init uC/OS periodic time src (SysTick).                  */
   \   0000001C   3000               MOVS     R0,R6
   \   0000001E   ........           BL       OS_CPU_SysTickInit
    141          
    142              Mem_Init();                                                 /* Init mem mgmt module.                                    */
   \   00000022   ........           BL       Mem_Init
    143          
    144          #if (OS_TASK_STAT_EN > 0)
    145              OSStatInit();                                               /* Determine CPU capacity                                   */
   \   00000026   ........           BL       OSStatInit
    146          #endif
    147          
    148              AppTaskCreate();                                            /* Create application tasks                                 */
   \   0000002A   ........           BL       AppTaskCreate
    149          
    150              BSP_LED_Off(0);
   \   0000002E   0020               MOVS     R0,#+0
   \   00000030   ........           BL       BSP_LED_Off
    151          
    152              while (DEF_TRUE) {                                          /* Task body, always written as an infinite loop.           */
    153                  BSP_LED_Toggle(0);
   \                     ??AppTaskStart_0:
   \   00000034   0020               MOVS     R0,#+0
   \   00000036   ........           BL       BSP_LED_Toggle
    154                  OSTimeDlyHMSM(0, 0, 0, 500);
   \   0000003A   4FF4FA73           MOV      R3,#+500
   \   0000003E   0022               MOVS     R2,#+0
   \   00000040   0021               MOVS     R1,#+0
   \   00000042   0020               MOVS     R0,#+0
   \   00000044   ........           BL       OSTimeDlyHMSM
   \   00000048   F4E7               B.N      ??AppTaskStart_0
    155              }
    156          }
    157          
    158          
    159          /*
    160          *********************************************************************************************************
    161          *                                      CREATE APPLICATION TASKS
    162          *
    163          * Description:  This function creates the application tasks.
    164          *
    165          * Arguments  :  none
    166          *
    167          * Returns    :  none
    168          *********************************************************************************************************
    169          */
    170          

   \                                 In section .text, align 2, keep-with-next
    171          static  void  AppTaskCreate (void)
    172          {
    173          }
   \                     AppTaskCreate:
   \   00000000   7047               BX       LR               ;; return

   \                                 In section .text, align 4, keep-with-next
   \                     ??DataTable1:
   \   00000000   ........           DC32     AppTaskStartStk

   \                                 In section .text, align 4, keep-with-next
   \                     ??DataTable1_1:
   \   00000000   ........           DC32     AppTaskStartStk+0x1FC

   \                                 In section .text, align 4, keep-with-next
   \                     ??DataTable1_2:
   \   00000000   ........           DC32     AppTaskStart

   \                                 In section .text, align 4, keep-with-next
   \                     `?<Constant "Start Task">`:
   \   00000000                      ; Initializer data, 12 bytes
   \   00000000   537461727420       DC8 83, 116, 97, 114, 116, 32, 84, 97, 115, 107
   \              5461736B    
   \   0000000A   0000               DC8 0, 0

   Maximum stack usage in bytes:

     Function      .cstack
     --------      -------
     AppTaskCreate      0
     AppTaskStart      16
     main              32


   Section sizes:

     Function/Label           Bytes
     --------------           -----
     AppTaskStartStk           512
     main                       66
     AppTaskStart               74
     AppTaskCreate               2
     ??DataTable1                4
     ??DataTable1_1              4
     ??DataTable1_2              4
     ?<Constant "Start Task">   12

 
 512 bytes in section .bss
 166 bytes in section .text
 
 166 bytes of CODE memory
 512 bytes of DATA memory

Errors: none
Warnings: none

⌨️ 快捷键说明

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