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

📄 os_cpu_c.lst

📁 ARM仿真案例
💻 LST
📖 第 1 页 / 共 2 页
字号:
##############################################################################
#                                                                            #
# IAR ARM ANSI C/C++ Compiler V4.40A/W32 EVALUATION    21/Jul/2006  16:23:23 #
# Copyright 1999-2005 IAR Systems. All rights reserved.                      #
# Time limited license: 22 days left                                         #
#                                                                            #
#    Cpu mode        =  interwork                                            #
#    Endian          =  little                                               #
#    Stack alignment =  4                                                    #
#    Source file     =  E:\Project\ucos-ii\leddisp\ARM\os_cpu_c.c            #
#    Command line    =  E:\Project\ucos-ii\leddisp\ARM\os_cpu_c.c -lCN       #
#                       E:\Project\ucos-ii\leddisp\Debug\List\ -lA           #
#                       E:\Project\ucos-ii\leddisp\Debug\List\ -o            #
#                       E:\Project\ucos-ii\leddisp\Debug\Obj\ -s9 --no_cse   #
#                       --no_unroll --no_inline --no_code_motion --no_tbaa   #
#                       --no_clustering --no_scheduling --debug --cpu_mode   #
#                       thumb --endian little --cpu ARM7TDMI-S               #
#                       --stack_align 4 --interwork -e --fpu None            #
#                       --dlib_config "e:\Program Files\IAR                  #
#                       Systems\Embedded Workbench 4.0                       #
#                       Evaluation\ARM\LIB\dl4tptinl8n.h" -I                 #
#                       E:\Project\ucos-ii\leddisp\ -I                       #
#                       E:\Project\ucos-ii\leddisp\App\ -I                   #
#                       E:\Project\ucos-ii\leddisp\ARM\ -I                   #
#                       E:\Project\ucos-ii\leddisp\BSP\ -I                   #
#                       E:\Project\ucos-ii\leddisp\uCOS-II\ -I "e:\Program   #
#                       Files\IAR Systems\Embedded Workbench 4.0             #
#                       Evaluation\ARM\INC\"                                 #
#    List file       =  E:\Project\ucos-ii\leddisp\Debug\List\os_cpu_c.lst   #
#    Object file     =  E:\Project\ucos-ii\leddisp\Debug\Obj\os_cpu_c.r79    #
#                                                                            #
#                                                                            #
##############################################################################

E:\Project\ucos-ii\leddisp\ARM\os_cpu_c.c
      1          /*
      2          *********************************************************************************************************
      3          *                                               uC/OS-II
      4          *                                         The Real-Time Kernel
      5          *
      6          *
      7          *                             (c) Copyright 1992-2004, Micrium, Weston, FL
      8          *                                          All Rights Reserved
      9          *
     10          *                                           Generic ARM Port
     11          *
     12          * File      : OS_CPU_C.C
     13          * Version   : V1.60
     14          * By        : Jean J. Labrosse
     15          *
     16          * For       : ARM7 or ARM9
     17          * Mode      : ARM or Thumb
     18          * Toolchain : IAR's EWARM V4.11a and higher
     19          *********************************************************************************************************
     20          */
     21          
     22          #define  OS_CPU_GLOBALS
     23          #include <ucos_ii.h>
     24          
     25          #if      OS_VIEW_MODULE > 0
     26          #include <OS_VIEWc.H>
     27          #include <OS_VIEW.H>
     28          #endif
     29          
     30          #define  ARM_MODE_ARM     0x00000000
     31          #define  ARM_MODE_THUMB   0x00000020
     32          
     33                                                            /* __CPU_MODE__ is an IAR built-in constant indicating whether ... */
     34                                                            /* ... code of this file was compiled using ARM or Thumb mode      */
     35          #if __CPU_MODE__ == 1
     36          #define  ARM_SVC_MODE    (0x00000013L + ARM_MODE_THUMB)
     37          #else
     38          #define  ARM_SVC_MODE    (0x00000013L + ARM_MODE_ARM)
     39          #endif
     40          
     41          /*
     42          *********************************************************************************************************
     43          *                                       OS INITIALIZATION HOOK
     44          *                                            (BEGINNING)
     45          *
     46          * Description: This function is called by OSInit() at the beginning of OSInit().
     47          *
     48          * Arguments  : none
     49          *
     50          * Note(s)    : 1) Interrupts should be disabled during this call.
     51          *********************************************************************************************************
     52          */
     53          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203

   \                                 In segment CODE, align 4, keep-with-next
     54          void  OSInitHookBegin (void)
     55          {
     56          }
   \                     OSInitHookBegin:
   \   00000000   7047               BX       LR               ;; return
     57          #endif
     58          
     59          /*
     60          *********************************************************************************************************
     61          *                                       OS INITIALIZATION HOOK
     62          *                                               (END)
     63          *
     64          * Description: This function is called by OSInit() at the end of OSInit().
     65          *
     66          * Arguments  : none
     67          *
     68          * Note(s)    : 1) Interrupts should be disabled during this call.
     69          *********************************************************************************************************
     70          */
     71          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203

   \                                 In segment CODE, align 4, keep-with-next
     72          void  OSInitHookEnd (void)
     73          {
     74          #if OS_CPU_INT_DIS_MEAS_EN > 0
     75              OS_CPU_IntDisMeasInit();
     76          #endif
     77          }
   \                     OSInitHookEnd:
   \   00000000   7047               BX       LR               ;; return
     78          #endif
     79          
     80          /*
     81          *********************************************************************************************************
     82          *                                          TASK CREATION HOOK
     83          *
     84          * Description: This function is called when a task is created.
     85          *
     86          * Arguments  : ptcb   is a pointer to the task control block of the task being created.
     87          *
     88          * Note(s)    : 1) Interrupts are disabled during this call.
     89          *********************************************************************************************************
     90          */
     91          #if OS_CPU_HOOKS_EN > 0 

   \                                 In segment CODE, align 4, keep-with-next
     92          void  OSTaskCreateHook (OS_TCB *ptcb)
     93          {
     94          #if OS_VIEW_MODULE > 0
     95              OSView_TaskCreateHook(ptcb);
     96          #else
     97              (void)ptcb;                        /* Prevent compiler warning                                     */
     98          #endif
     99          }
   \                     OSTaskCreateHook:
   \   00000000   7047               BX       LR               ;; return
    100          #endif
    101          
    102          
    103          /*
    104          *********************************************************************************************************
    105          *                                           TASK DELETION HOOK
    106          *
    107          * Description: This function is called when a task is deleted.
    108          *
    109          * Arguments  : ptcb   is a pointer to the task control block of the task being deleted.
    110          *
    111          * Note(s)    : 1) Interrupts are disabled during this call.
    112          *********************************************************************************************************
    113          */
    114          #if OS_CPU_HOOKS_EN > 0 

   \                                 In segment CODE, align 4, keep-with-next
    115          void  OSTaskDelHook (OS_TCB *ptcb)
    116          {
    117              (void)ptcb;                        /* Prevent compiler warning                                     */
    118          }
   \                     OSTaskDelHook:
   \   00000000   7047               BX       LR               ;; return
    119          #endif
    120          
    121          /*
    122          *********************************************************************************************************
    123          *                                             IDLE TASK HOOK
    124          *
    125          * Description: This function is called by the idle task.  This hook has been added to allow you to do  
    126          *              such things as STOP the CPU to conserve power.
    127          *
    128          * Arguments  : none
    129          *
    130          * Note(s)    : 1) Interrupts are enabled during this call.
    131          *********************************************************************************************************
    132          */
    133          #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251

   \                                 In segment CODE, align 4, keep-with-next
    134          void  OSTaskIdleHook (void)
    135          {
    136          }
   \                     OSTaskIdleHook:
   \   00000000   7047               BX       LR               ;; return
    137          #endif
    138          
    139          /*
    140          *********************************************************************************************************
    141          *                                           STATISTIC TASK HOOK
    142          *
    143          * Description: This function is called every second by uC/OS-II's statistics task.  This allows your 
    144          *              application to add functionality to the statistics task.
    145          *
    146          * Arguments  : none
    147          *********************************************************************************************************
    148          */
    149          
    150          #if OS_CPU_HOOKS_EN > 0 

   \                                 In segment CODE, align 4, keep-with-next
    151          void  OSTaskStatHook (void)
    152          {
    153          }
   \                     OSTaskStatHook:
   \   00000000   7047               BX       LR               ;; return
    154          #endif
    155          
    156          /*
    157          *********************************************************************************************************
    158          *                                        INITIALIZE A TASK'S STACK
    159          *
    160          * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
    161          *              stack frame of the task being created.  This function is highly processor specific.
    162          *
    163          * Arguments  : task          is a pointer to the task code
    164          *
    165          *              p_arg         is a pointer to a user supplied data area that will be passed to the task
    166          *                            when the task first executes.
    167          *
    168          *              ptos          is a pointer to the top of stack.  It is assumed that 'ptos' points to
    169          *                            a 'free' entry on the task stack.  If OS_STK_GROWTH is set to 1 then 
    170          *                            'ptos' will contain the HIGHEST valid address of the stack.  Similarly, if
    171          *                            OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
    172          *                            of the stack.
    173          *
    174          *              opt           specifies options that can be used to alter the behavior of OSTaskStkInit().
    175          *                            (see uCOS_II.H for OS_TASK_OPT_???).
    176          *
    177          * Returns    : Always returns the location of the new top-of-stack' once the processor registers have
    178          *              been placed on the stack in the proper order.
    179          *
    180          * Note(s)    : 1) Interrupts are enabled when your task starts executing. 
    181          *              2) All tasks run in SYS mode.
    182          *********************************************************************************************************
    183          */
    184          

   \                                 In segment CODE, align 4, keep-with-next
    185          OS_STK *OSTaskStkInit (void (*task)(void *pd), void *p_arg, OS_STK *ptos, INT16U opt)
    186          {
    187              OS_STK *stk;
    188          

⌨️ 快捷键说明

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