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

📄 rtx_config.lst

📁 Keil UV3中自带操作系统ARTX的应用例程
💻 LST
📖 第 1 页 / 共 2 页
字号:
ARM COMPILER V2.51a,  RTX_Config                                                           06/05/06  10:40:45  PAGE 1   


ARM COMPILER V2.51a, COMPILATION OF MODULE RTX_Config
OBJECT MODULE PLACED IN RTX_Config.OBJ
COMPILER INVOKED BY: D:\Keil\ARM\BIN\CA.exe RTX_Config.c THUMB BROWSE DEBUG TABS(4) 

stmt  level    source

    1          /*----------------------------------------------------------------------------
    2           *      R T L  -  K e r n e l
    3           *----------------------------------------------------------------------------
    4           *      Name:    RTX_CONFIG.C
    5           *      Purpose: Configuration of RTX Kernel for Philips LPC21xx
    6           *      Rev.:    V3.00 / 17-mar-2006
    7           *----------------------------------------------------------------------------
    8           *      This code is part of the RealView Run-Time Library.
    9           *      Copyright (c) 2004-2006 KEIL - An ARM Company. All rights reserved. 
   10           *---------------------------------------------------------------------------*/
   11          
   12          #include <RTX_Config.h>                  /* RTX user configuration header    */
*** ERROR C318 IN LINE 12 OF RTX_Config.c: can't open file 'RTX_Config.h'
   13          #pragma O0
*** WARNING C2 IN LINE 13 OF RTX_CONFIG.C: 'O0': unknown #pragma/control, line ignored
   14          
   15          /*----------------------------------------------------------------------------
   16           *      RTX User configuration part BEGIN
   17           *---------------------------------------------------------------------------*/
   18          
   19          //-------- <<< Use Configuration Wizard in Context Menu >>> -----------------
   20          // <e>Task Mode Select
   21          //   <o>Task Mode Select <0-1>
   22          //   <i> Define max. number of tasks that will run at the same time.
   23          //   <i> Default: 0
   24          #ifndef OS_MODESEL
   25           #define OS_MODESEL     1//OS选择非典的中断向量编号模式
   26          #endif
   27          
   28          #if (OS_MODESEL == 0) //OS中断向量地址/编号模式选择
                 #include <LPC213x.H>                     /* LPC21xx definitions              */
               #else
   31            #include <LPC213xDEF.H>   //ARM菜鸟HotPower创建定义文件(愚人节预演版)
   32          #endif
   33          // </e>
   34          //
   35          // <h>Task Definitions
   36          // ===================
   37          //
   38          //   <o>Number of concurrent running tasks <0-250>
   39          //   <i> Define max. number of tasks that will run at the same time.
   40          //   <i> Default: 6
   41          #ifndef OS_TASKCNT//指定同时运行的任务数
   42           #define OS_TASKCNT     7
   43          #endif
   44          
   45          //   <o>Number of tasks with user-provided stack <0-250>
   46          //   <i> Define the number of tasks that will use a bigger stack.
   47          //   <i> The memory space for the stack is provided by the user.
   48          //   <i> Default: 0
   49          #ifndef OS_PRIVCNT//指定用户提供堆栈的任务数量
   50           #define OS_PRIVCNT     0
   51          #endif
   52          
   53          //   <o>Task stack size [bytes] <20-4096:8><#/4>
   54          //   <i> Set the stack size for tasks which is assigned by the system.
   55          //   <i> Default: 200
   56          #ifndef OS_STKSIZE//指定每一个任务的栈尺寸(32位字,此数乘4为栈字节数)
   57           #define OS_STKSIZE     250
ARM COMPILER V2.51a,  RTX_Config                                                           06/05/06  10:40:45  PAGE 2   

   58          #endif
   59          
   60          // <q>Check for the stack overflow
   61          // ===============================
   62          // <i> Include the stack checking code for a stack overflow.
   63          // <i> Note that additional code reduces the Kernel performance.
   64          #ifndef OS_STKCHECK//使能(1) 或禁止(0) 堆栈检查
   65           #define OS_STKCHECK    1
   66          #endif
   67          
   68          //   <o>Number of user timers <0-250>
   69          //   <i> Define max. number of user timers that will run at the same time.
   70          //   <i> Default: 0  (User timers disabled)
   71          #ifndef OS_TIMERCNT//指定用户定时器的数量(在回调函数os_tmr_call()里编写程序)
   72           #define OS_TIMERCNT    1
   73          #endif
   74          
   75          // </h>
   76          // <h>System Timer Configuration
   77          // =============================
   78          //   <o>ARTX Kernel timer number <0=> Timer 0 <1=> Timer 1
   79          //   <i> Define the ARM timer used as a system tick timer.
   80          //   <i> Default: Timer 0
   81          #ifndef OS_TIMER//指定一个片上定时器, 用作实时系统的时基, 可以是0 或1
   82           #define OS_TIMER       1
   83          #endif
   84          
   85          //   <o>Timer clock value [Hz] <1-1000000000>
   86          //   <i> Set the timer clock value for selected timer.
   87          //   <i> Default: 15000000  (15MHz at 60MHz CCLK and VPBDIV = 4)
   88          #ifndef OS_CLOCK//指定所选择定时器的输入信号频率
   89           #define OS_CLOCK       15000000
   90          #endif
   91          
   92          //   <o>Timer tick value [us] <1-1000000>
   93          //   <i> Set the timer tick value for selected timer.
   94          //   <i> Default: 10000  (10ms)
   95          #ifndef OS_TICK//指定系统定时的时间间隔, 单位为uS
   96           #define OS_TICK        10000
   97          #endif
   98          
   99          // </h>
  100          // <e>Round-Robin Task switching
  101          // =============================
  102          // <i> Enable Round-Robin Task switching.
  103          #ifndef OS_ROBIN//使能(1) 或禁止(0) 时间片轮转任务调度
  104           #define OS_ROBIN       1
  105          #endif
  106          
  107          //   <o>Round-Robin Timeout [ticks] <1-1000>
  108          //   <i> Define how long a task will execute before a task switch.
  109          //   <i> Default: 5
  110          #ifndef OS_ROBINTOUT//时间片的大小, 以系统定时间隔为单位(节拍)
  111           #define OS_ROBINTOUT   5
  112          #endif
  113          
  114          // </e>
  115          
  116          //------------- <<< end of configuration section >>> -----------------------
  117          
  118          /*----------------------------------------------------------------------------
  119           *      ARTX User configuration part END
  120           *---------------------------------------------------------------------------*/
  121          
  122          #if   (OS_TIMER == 0)                                   /* Timer 0          */
                 #define OS_TID_       4                               /*  Timer ID        */
ARM COMPILER V2.51a,  RTX_Config                                                           06/05/06  10:40:45  PAGE 3   

                 #define OS_TIM_       (1 << OS_TID_)                  /*  Interrupt Mask  */
               //OS_TRV指定定时器的重载值
                 #define OS_TRV        ((U32)(((double)OS_CLOCK*(double)OS_TICK)/1E6)-1)
               //OS_TVAL用于读取定时器的当前值
                 #if (OS_MODESEL == 0)
                   #define OS_TVAL       T0TC                            /*  Timer Value     */
                 #else
                   #define OS_TVAL       T0->TIMER_TC                            /*  Timer Value     */
                 #endif
               //OS_TOVF指定定时器溢出标志
                 #if (OS_MODESEL == 0)
                   #define OS_TOVF       (T0IR & 1)                      /*  Overflow Flag   */
                 #else
                   #define OS_TOVF       (T0->TIMER_IR & 1)                      /*  Overflow Flag   */
                 #endif
               //OS_TREL()定义定时器重载的指令序列
                 #define OS_TREL()     ;                               /*  Timer Reload    */
               //OS_TFIRQ()定义强制定时器中断的指令序列
                 #if (OS_MODESEL == 0)
                   #define OS_TFIRQ()    VICSoftInt   |= OS_TIM_;        /*  Force Interrupt */
                 #else
                   #define OS_TFIRQ()    VIC->SoftInt   |= OS_TIM_;        /*  Force Interrupt */
                 #endif
               //OS_TIACK()用于清除定时器中断的逻辑
                 #if (OS_MODESEL == 0)
                 #define OS_TIACK()    T0IR = 1;                       /*  Interrupt Ack   */ \
                                       VICSoftIntClr = OS_TIM_;                               \
                                       VICVectAddr   = 0;
                 #else
                 #define OS_TIACK()    T0->TIMER_IR = 1;                       /*  Interrupt Ack   */ \
                                       VIC->SoftIntClr = OS_TIM_;                               \
                                       VIC->VectAddr   = 0;
                 #endif
               //OS_TINIT()用于定义定时器的初始化代码
                 #if (OS_MODESEL == 0)
                 #define OS_TINIT()    T0MR0 = OS_TRV;                 /*  Initialization  */ \
                                       T0MCR = 3;                                             \
                                       T0TCR = 1;                                             \
                                       VICDefVectAddr = (U32)os_def_interrupt;                 \

⌨️ 快捷键说明

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