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

📄 app.lst

📁 针对STM32F103的UCOS移植
💻 LST
📖 第 1 页 / 共 5 页
字号:
    117          static  CPU_INT32U      Probe_RS232TxLast;
    118          static  CPU_INT32U      Probe_ComRxPktLast;
    119          static  CPU_INT32U      Probe_ComTxPktLast;
    120          static  CPU_INT32U      Probe_ComTxSymLast;
    121          static  CPU_INT32U      Probe_ComTxSymByteLast;
    122          
    123          static  CPU_INT32U      Probe_ComCtrLast;
    124          #endif
    125          
    126          
    127          /*
    128          *********************************************************************************************************
    129          *                                      LOCAL FUNCTION PROTOTYPES
    130          *********************************************************************************************************
    131          */
    132          
    133          static  void            AppTaskCreate               (void);
    134          static  void            AppTaskStart                (void *p_arg);
    135          
    136          static  void            AppTaskUserIF               (void *p_arg);
    137          static  void            AppTaskKbd                  (void *p_arg);
    138          
    139          static  void            AppDispScr_SignOn           (void);
    140          static  void            AppDispScr_TaskNames        (void);
    141          
    142          #if (uC_PROBE_OS_PLUGIN > 0)
    143          static  void            AppProbeCallback            (void);
    144          #endif
    145          
    146          #if (uC_PROBE_COM_MODULE   > 0) && \
    147              (PROBE_COM_SUPPORT_STR > 0)
    148          static  void            AppTaskProbeStr             (void *p_arg);
    149          #endif
    150          
    151          static  void            AppFormatDec                (CPU_INT08U *s, CPU_INT32U value, CPU_INT08U digits);
    152          
    153          /*
    154          *********************************************************************************************************
    155          *                                                main()
    156          *
    157          * Description : This is the standard entry point for C code.  It is assumed that your code will call
    158          *               main() once you have performed all necessary initialization.
    159          *
    160          * Arguments   : none
    161          *
    162          * Returns     : none
    163          *********************************************************************************************************
    164          */
    165          

   \                                 In segment CODE, align 4, keep-with-next
    166          int  main (void)
    167          {
   \                     main:
   \   00000000   01B5               PUSH     {R0,LR}
    168              CPU_INT08U  err;
    169          
    170          
    171              BSP_IntDisAll();                                            /* Disable all interrupts until we are ready to accept them */
   \   00000002   ........           _BLF     BSP_IntDisAll,??BSP_IntDisAll??rT
    172          
    173              OSInit();                                                   /* Initialize "uC/OS-II, The Real-Time Kernel"              */
   \   00000006   ........           _BLF     OSInit,??OSInit??rT
    174          
    175              OSTaskCreateExt(AppTaskStart,                               /* Create the start task                                    */
    176                              (void *)0,
    177                              (OS_STK *)&AppTaskStartStk[APP_TASK_START_STK_SIZE - 1],
    178                              APP_TASK_START_PRIO,
    179                              APP_TASK_START_PRIO,
    180                              (OS_STK *)&AppTaskStartStk[0],
    181                              APP_TASK_START_STK_SIZE,
    182                              (void *)0,
    183                              OS_TASK_OPT_STK_CHK | OS_TASK_OPT_STK_CLR);
   \   0000000A   0C48               LDR.N    R0,??main_0      ;; AppTaskStartStk
   \   0000000C   0323               MOVS     R3,#+3
   \   0000000E   0022               MOVS     R2,#+0
   \   00000010   5FF48071           MOVS     R1,#+256
   \   00000014   0FB4               PUSH     {R0-R3}
   \   00000016   1946               MOV      R1,R3
   \   00000018   02B4               PUSH     {R1}
   \   0000001A   00F2FC32           ADDW     R2,R0,#+1020
   \   0000001E   0021               MOVS     R1,#+0
   \   00000020   0748               LDR.N    R0,??main_0+0x4  ;; AppTaskStart
   \   00000022   ........           _BLF     OSTaskCreateExt,??OSTaskCreateExt??rT
    184          
    185          #if (OS_TASK_NAME_SIZE > 13)
    186              OSTaskNameSet(APP_TASK_START_PRIO, "Start Task", &err);
   \   00000026   05AA               ADD      R2,SP,#+20
   \   00000028   0649               LDR.N    R1,??main_0+0x8  ;; `?<Constant "Start Task">`
   \   0000002A   0320               MOVS     R0,#+3
   \   0000002C   ........           _BLF     OSTaskNameSet,??OSTaskNameSet??rT
    187          #endif
    188          
    189              OSStart();                                                  /* Start multitasking (i.e. give control to uC/OS-II)       */
   \   00000030   ........           _BLF     OSStart,??OSStart??rT
    190          }
   \   00000034   0020               MOVS     R0,#+0
   \   00000036   06B0               ADD      SP,SP,#+24
   \   00000038   00BD               POP      {PC}             ;; return
   \   0000003A   00BF               Nop      
   \                     ??main_0:
   \   0000003C   ........           DC32     AppTaskStartStk
   \   00000040   ........           DC32     AppTaskStart
   \   00000044   ........           DC32     `?<Constant "Start Task">`
    191          
    192          
    193          /*
    194          *********************************************************************************************************
    195          *                                          STARTUP TASK
    196          *
    197          * Description : This is an example of a startup task.  As mentioned in the book's text, you MUST
    198          *               initialize the ticker only once multitasking has started.
    199          *
    200          * Arguments   : p_arg   is the argument passed to 'AppTaskStart()' by 'OSTaskCreate()'.
    201          *
    202          * Returns     : none
    203          *
    204          * Notes       : 1) The first line of code is used to prevent a compiler warning because 'p_arg' is not
    205          *                  used.  The compiler should not generate any code for this statement.
    206          *********************************************************************************************************
    207          */
    208          

   \                                 In segment CODE, align 4, keep-with-next
    209          static  void  AppTaskStart (void *p_arg)
    210          {
   \                     AppTaskStart:
   \   00000000   70B5               PUSH     {R4-R6,LR}
    211              CPU_INT32U  i;
    212              CPU_INT32U  j;
    213          
    214          
    215              (void)p_arg;
    216          
    217              BSP_Init();                                                 /* Initialize BSP functions                                 */
   \   00000002   ........           _BLF     BSP_Init,??BSP_Init??rT
    218          
    219          #if (OS_TASK_STAT_EN > 0)
    220              OSStatInit();                                               /* Determine CPU capacity                                   */
   \   00000006   ........           _BLF     OSStatInit,??OSStatInit??rT
    221          #endif
    222          
    223          #if (uC_PROBE_COM_MODULE > 0)
    224              ProbeCom_Init();                                            /* Initialize the uC/Probe communications module            */
   \   0000000A   ........           _BLF     ProbeCom_Init,??ProbeCom_Init??rT
    225              ProbeRS232_Init(115200);
   \   0000000E   5FF4E130           MOVS     R0,#+115200
   \   00000012   ........           _BLF     ProbeRS232_Init,??ProbeRS232_Init??rT
    226              ProbeRS232_RxIntEn();
   \   00000016   ........           _BLF     ProbeRS232_RxIntEn,??ProbeRS232_RxIntEn??rT
    227          #endif
    228          
    229          #if (uC_PROBE_OS_PLUGIN > 0)
    230          #if (uC_PROBE_COM_MODULE   > 0) && \
    231              (PROBE_COM_STAT_EN     > 0)
    232              Probe_RS232RxSpd       = 0;
   \   0000001A   364D               LDR.N    R5,??AppTaskStart_0  ;; Probe_B1
   \   0000001C   0020               MOVS     R0,#+0
   \   0000001E   2861               STR      R0,[R5, #+16]
    233              Probe_RS232TxSpd       = 0;
   \   00000020   6861               STR      R0,[R5, #+20]
    234              Probe_ComRxPktSpd      = 0;
   \   00000022   A861               STR      R0,[R5, #+24]
    235              Probe_ComTxPktSpd      = 0;
   \   00000024   E861               STR      R0,[R5, #+28]
    236              Probe_ComTxSymSpd      = 0;
   \   00000026   2862               STR      R0,[R5, #+32]
    237              Probe_ComTxSymByteSpd  = 0;
   \   00000028   6862               STR      R0,[R5, #+36]
    238          
    239              Probe_RS232RxLast      = 0;
   \   0000002A   0446               MOV      R4,R0
   \   0000002C   AC62               STR      R4,[R5, #+40]
    240              Probe_RS232TxLast      = 0;
   \   0000002E   EC62               STR      R4,[R5, #+44]
    241              Probe_ComRxPktLast     = 0;
   \   00000030   2C63               STR      R4,[R5, #+48]
    242              Probe_ComTxPktLast     = 0;
   \   00000032   6C63               STR      R4,[R5, #+52]
    243              Probe_ComTxSymLast     = 0;
   \   00000034   AC63               STR      R4,[R5, #+56]
    244              Probe_ComTxSymByteLast = 0;
   \   00000036   EC63               STR      R4,[R5, #+60]
    245          
    246              Probe_ComCtrLast       = 0;
   \   00000038   2C64               STR      R4,[R5, #+64]
    247          #endif
    248          
    249              OSProbe_Init();
   \   0000003A   ........           _BLF     OSProbe_Init,??OSProbe_Init??rT
    250              OSProbe_SetCallback(AppProbeCallback);
   \   0000003E   2E48               LDR.N    R0,??AppTaskStart_0+0x4  ;; AppProbeCallback
   \   00000040   ........           _BLF     OSProbe_SetCallback,??OSProbe_SetCallback??rT
    251              OSProbe_SetDelay(50);
   \   00000044   3220               MOVS     R0,#+50
   \   00000046   ........           _BLF     OSProbe_SetDelay,??OSProbe_SetDelay??rT
    252          #endif
    253          
    254              AppUserIFMbox = OSMboxCreate((void *)0);                    /* Create MBOX for communication between Kbd and UserIF     */
   \   0000004A   2046               MOV      R0,R4
   \   0000004C   ........           _BLF     OSMboxCreate,??OSMboxCreate??rT
   \   00000050   A860               STR      R0,[R5, #+8]
    255          
    256              AppTaskCreate();                                            /* Create application tasks                                 */
   \   00000052   ........           BL       AppTaskCreate
    257          
    258              while (DEF_TRUE) {                                          /* Task body, always written as an infinite loop.           */
    259                  for (j = 0; j < 4; j++) {
   \                     ??AppTaskStart_1:
   \   00000056   2500               MOVS     R5,R4
   \   00000058   17E0               B.N      ??AppTaskStart_2
    260                      for (i = 1; i <= 4; i++) {
    261                          LED_On(i);
    262                          OSTimeDlyHMSM(0, 0, 0, 50);
    263                          LED_Off(i);
    264                          OSTimeDlyHMSM(0, 0, 0, 50);
    265                      }
    266          
    267                      for (i = 3; i >= 2; i--) {
    268                          LED_On(i);
   \                     ??AppTaskStart_3:
   \   0000005A   3000               MOVS     R0,R6
   \   0000005C   C0B2               UXTB     R0,R0
   \   0000005E   ........           _BLF     LED_On,??LED_On??rT
    269                          OSTimeDlyHMSM(0, 0, 0, 50);
   \   00000062   3223               MOVS     R3,#+50
   \   00000064   2246               MOV      R2,R4
   \   00000066   1146               MOV      R1,R2
   \   00000068   0846               MOV      R0,R1
   \   0000006A   ........           _BLF     OSTimeDlyHMSM,??OSTimeDlyHMSM??rT
    270                          LED_Off(i);
   \   0000006E   3000               MOVS     R0,R6
   \   00000070   C0B2               UXTB     R0,R0
   \   00000072   ........           _BLF     LED_Off,??LED_Off??rT
    271                          OSTimeDlyHMSM(0, 0, 0, 50);
   \   00000076   3223               MOVS     R3,#+50
   \   00000078   2246               MOV      R2,R4
   \   0000007A   1146               MOV      R1,R2
   \   0000007C   0846               MOV      R0,R1

⌨️ 快捷键说明

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