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

📄 os_cpu_c.lst

📁 称植到lpc2124上的UCOS2.85版 是本人初学移植和ARM的成果 可能已有人上传类似的了
💻 LST
📖 第 1 页 / 共 2 页
字号:
   1               		.file	"OS_CPU_C.c"
   2               		.arch atmega128
   3               	__SREG__ = 0x3f
   4               	__SP_H__ = 0x3e
   5               	__SP_L__ = 0x3d
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               		.global __do_copy_data
   9               		.global __do_clear_bss
  11               		.text
  12               	.Ltext0:
 107               	.global	OSInitHookBegin
 109               	OSInitHookBegin:
   1:../AVR/OS_CPU_C.c **** /*
   2:../AVR/OS_CPU_C.c **** ***************************************************************************************************
   3:../AVR/OS_CPU_C.c **** *                                              uC/OS-II
   4:../AVR/OS_CPU_C.c **** *                                        The Real-Time Kernel
   5:../AVR/OS_CPU_C.c **** * 
   6:../AVR/OS_CPU_C.c **** *                                       ATmega128 Specific code for V2.8x
   7:../AVR/OS_CPU_C.c **** *
   8:../AVR/OS_CPU_C.c **** * File     : OS_CPU_C.C
   9:../AVR/OS_CPU_C.c **** * By       : Xiawei   <xiawei0311@gmail.com>
  10:../AVR/OS_CPU_C.c **** * AVR-GCC  version : 4.1.1 , WinAVR 20070122
  11:../AVR/OS_CPU_C.c **** * Date    : September 9th,2007
  12:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  13:../AVR/OS_CPU_C.c **** */
  14:../AVR/OS_CPU_C.c **** 
  15:../AVR/OS_CPU_C.c **** #define   OS_CPU_GLOBALS
  16:../AVR/OS_CPU_C.c **** #include <avr/io.h>
  17:../AVR/OS_CPU_C.c **** #include "os_cpu.h"
  18:../AVR/OS_CPU_C.c **** #include "os_cfg.h"
  19:../AVR/OS_CPU_C.c **** #include "ucos_ii.h"
  20:../AVR/OS_CPU_C.c **** 
  21:../AVR/OS_CPU_C.c **** /*
  22:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  23:../AVR/OS_CPU_C.c **** *                                        LOCAL GLOBAL VARIABLES
  24:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  25:../AVR/OS_CPU_C.c **** */
  26:../AVR/OS_CPU_C.c **** 
  27:../AVR/OS_CPU_C.c **** #if OS_VERSION >= 281 && OS_TMR_EN > 0
  28:../AVR/OS_CPU_C.c **** static  INT16U  OSTmrCtr;
  29:../AVR/OS_CPU_C.c **** #endif
  30:../AVR/OS_CPU_C.c **** 
  31:../AVR/OS_CPU_C.c **** /*
  32:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  33:../AVR/OS_CPU_C.c **** *                                       OS INITIALIZATION HOOK
  34:../AVR/OS_CPU_C.c **** *                                            (BEGINNING)
  35:../AVR/OS_CPU_C.c **** *
  36:../AVR/OS_CPU_C.c **** * Description: This function is called by OSInit() at the beginning of OSInit().
  37:../AVR/OS_CPU_C.c **** *
  38:../AVR/OS_CPU_C.c **** * Arguments  : none
  39:../AVR/OS_CPU_C.c **** *
  40:../AVR/OS_CPU_C.c **** * Note(s)    : 1) Interrupts should be disabled during this call.
  41:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  42:../AVR/OS_CPU_C.c **** */
  43:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
  44:../AVR/OS_CPU_C.c **** void  OSInitHookBegin (void)
  45:../AVR/OS_CPU_C.c **** {
 111               	.LM1:
 112               	/* prologue: frame size=0 */
 113               	/* prologue end (size=0) */
 114               	/* epilogue: frame size=0 */
 115 0000 0895      		ret
 116               	/* epilogue end (size=1) */
 117               	/* function OSInitHookBegin size 1 (0) */
 119               	.Lscope0:
 121               	.global	OSInitHookEnd
 123               	OSInitHookEnd:
  46:../AVR/OS_CPU_C.c **** #if OS_VERSION >= 281 && OS_TMR_EN > 0
  47:../AVR/OS_CPU_C.c ****     OS_CPU_TmrCtr = 0;
  48:../AVR/OS_CPU_C.c **** #endif
  49:../AVR/OS_CPU_C.c **** }
  50:../AVR/OS_CPU_C.c **** #endif
  51:../AVR/OS_CPU_C.c **** 
  52:../AVR/OS_CPU_C.c **** /*
  53:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  54:../AVR/OS_CPU_C.c **** *                                       OS INITIALIZATION HOOK
  55:../AVR/OS_CPU_C.c **** *                                               (END)
  56:../AVR/OS_CPU_C.c **** *
  57:../AVR/OS_CPU_C.c **** * Description: This function is called by OSInit() at the end of OSInit().
  58:../AVR/OS_CPU_C.c **** *
  59:../AVR/OS_CPU_C.c **** * Arguments  : none
  60:../AVR/OS_CPU_C.c **** *
  61:../AVR/OS_CPU_C.c **** * Note(s)    : 1) Interrupts should be disabled during this call.
  62:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  63:../AVR/OS_CPU_C.c **** */
  64:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
  65:../AVR/OS_CPU_C.c **** void  OSInitHookEnd (void)
  66:../AVR/OS_CPU_C.c **** {
 125               	.LM2:
 126               	/* prologue: frame size=0 */
 127               	/* prologue end (size=0) */
 128               	/* epilogue: frame size=0 */
 129 0002 0895      		ret
 130               	/* epilogue end (size=1) */
 131               	/* function OSInitHookEnd size 1 (0) */
 133               	.Lscope1:
 136               	.global	OSTaskCreateHook
 138               	OSTaskCreateHook:
  67:../AVR/OS_CPU_C.c **** }
  68:../AVR/OS_CPU_C.c **** #endif
  69:../AVR/OS_CPU_C.c **** 
  70:../AVR/OS_CPU_C.c **** /*$PAGE*/
  71:../AVR/OS_CPU_C.c **** /*
  72:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  73:../AVR/OS_CPU_C.c **** *                                          TASK CREATION HOOK
  74:../AVR/OS_CPU_C.c **** *
  75:../AVR/OS_CPU_C.c **** * Description: This function is called when a task is created.
  76:../AVR/OS_CPU_C.c **** *
  77:../AVR/OS_CPU_C.c **** * Arguments  : ptcb   is a pointer to the task control block of the task being created.
  78:../AVR/OS_CPU_C.c **** *
  79:../AVR/OS_CPU_C.c **** * Note(s)    : 1) Interrupts are disabled during this call.
  80:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  81:../AVR/OS_CPU_C.c **** */
  82:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 
  83:../AVR/OS_CPU_C.c **** void  OSTaskCreateHook (OS_TCB *ptcb)
  84:../AVR/OS_CPU_C.c **** {
 140               	.LM3:
 141               	/* prologue: frame size=0 */
 142               	/* prologue end (size=0) */
 143               	/* epilogue: frame size=0 */
 144 0004 0895      		ret
 145               	/* epilogue end (size=1) */
 146               	/* function OSTaskCreateHook size 1 (0) */
 148               	.Lscope2:
 151               	.global	OSTaskDelHook
 153               	OSTaskDelHook:
  85:../AVR/OS_CPU_C.c ****     ptcb = ptcb;                       /* Prevent compiler warning                                 
  86:../AVR/OS_CPU_C.c **** }
  87:../AVR/OS_CPU_C.c **** #endif
  88:../AVR/OS_CPU_C.c **** 
  89:../AVR/OS_CPU_C.c **** 
  90:../AVR/OS_CPU_C.c **** /*
  91:../AVR/OS_CPU_C.c **** ***************************************************************************************************
  92:../AVR/OS_CPU_C.c **** *                                           TASK DELETION HOOK
  93:../AVR/OS_CPU_C.c **** *
  94:../AVR/OS_CPU_C.c **** * Description: This function is called when a task is deleted.
  95:../AVR/OS_CPU_C.c **** *
  96:../AVR/OS_CPU_C.c **** * Arguments  : ptcb   is a pointer to the task control block of the task being deleted.
  97:../AVR/OS_CPU_C.c **** *
  98:../AVR/OS_CPU_C.c **** * Note(s)    : 1) Interrupts are disabled during this call.
  99:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 100:../AVR/OS_CPU_C.c **** */
 101:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 
 102:../AVR/OS_CPU_C.c **** void  OSTaskDelHook (OS_TCB *ptcb)
 103:../AVR/OS_CPU_C.c **** {
 155               	.LM4:
 156               	/* prologue: frame size=0 */
 157               	/* prologue end (size=0) */
 158               	/* epilogue: frame size=0 */
 159 0006 0895      		ret
 160               	/* epilogue end (size=1) */
 161               	/* function OSTaskDelHook size 1 (0) */
 163               	.Lscope3:
 165               	.global	OSTaskIdleHook
 167               	OSTaskIdleHook:
 104:../AVR/OS_CPU_C.c ****     ptcb = ptcb;                       /* Prevent compiler warning                                 
 105:../AVR/OS_CPU_C.c **** }
 106:../AVR/OS_CPU_C.c **** #endif
 107:../AVR/OS_CPU_C.c **** 
 108:../AVR/OS_CPU_C.c **** /*
 109:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 110:../AVR/OS_CPU_C.c **** *                                             IDLE TASK HOOK
 111:../AVR/OS_CPU_C.c **** *
 112:../AVR/OS_CPU_C.c **** * Description: This function is called by the idle task.  This hook has been added to allow you to 
 113:../AVR/OS_CPU_C.c **** *              such things as STOP the CPU to conserve power.
 114:../AVR/OS_CPU_C.c **** *
 115:../AVR/OS_CPU_C.c **** * Arguments  : none
 116:../AVR/OS_CPU_C.c **** *
 117:../AVR/OS_CPU_C.c **** * Note(s)    : 1) Interrupts are enabled during this call.
 118:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 119:../AVR/OS_CPU_C.c **** */
 120:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
 121:../AVR/OS_CPU_C.c **** void  OSTaskIdleHook (void)
 122:../AVR/OS_CPU_C.c **** {
 169               	.LM5:
 170               	/* prologue: frame size=0 */
 171               	/* prologue end (size=0) */
 172               	/* epilogue: frame size=0 */
 173 0008 0895      		ret
 174               	/* epilogue end (size=1) */
 175               	/* function OSTaskIdleHook size 1 (0) */
 177               	.Lscope4:
 179               	.global	OSTaskStatHook
 181               	OSTaskStatHook:
 123:../AVR/OS_CPU_C.c **** }
 124:../AVR/OS_CPU_C.c **** #endif
 125:../AVR/OS_CPU_C.c **** 
 126:../AVR/OS_CPU_C.c **** /*
 127:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 128:../AVR/OS_CPU_C.c **** *                                           STATISTIC TASK HOOK
 129:../AVR/OS_CPU_C.c **** *
 130:../AVR/OS_CPU_C.c **** * Description: This function is called every second by uC/OS-II's statistics task.  This allows you
 131:../AVR/OS_CPU_C.c **** *              application to add functionality to the statistics task.
 132:../AVR/OS_CPU_C.c **** *
 133:../AVR/OS_CPU_C.c **** * Arguments  : none
 134:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 135:../AVR/OS_CPU_C.c **** */
 136:../AVR/OS_CPU_C.c **** 
 137:../AVR/OS_CPU_C.c **** #if OS_CPU_HOOKS_EN > 0 
 138:../AVR/OS_CPU_C.c **** void  OSTaskStatHook (void)
 139:../AVR/OS_CPU_C.c **** {
 183               	.LM6:
 184               	/* prologue: frame size=0 */
 185               	/* prologue end (size=0) */
 186               	/* epilogue: frame size=0 */
 187 000a 0895      		ret
 188               	/* epilogue end (size=1) */
 189               	/* function OSTaskStatHook size 1 (0) */
 191               	.Lscope5:
 197               	.global	OSTaskStkInit
 199               	OSTaskStkInit:
 140:../AVR/OS_CPU_C.c **** }
 141:../AVR/OS_CPU_C.c **** #endif
 142:../AVR/OS_CPU_C.c **** 
 143:../AVR/OS_CPU_C.c **** /*$PAGE*/
 144:../AVR/OS_CPU_C.c **** /*
 145:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 146:../AVR/OS_CPU_C.c **** *                                       INITIALIZE A TASK'S STACK
 147:../AVR/OS_CPU_C.c **** *
 148:../AVR/OS_CPU_C.c **** * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize 
 149:../AVR/OS_CPU_C.c **** *              stack frame of the task being created. This function is highly processor specific.
 150:../AVR/OS_CPU_C.c **** *
 151:../AVR/OS_CPU_C.c **** * Arguments  : task          is a pointer to the task code
 152:../AVR/OS_CPU_C.c **** *
 153:../AVR/OS_CPU_C.c **** *              p_arg         is a pointer to a user supplied data area that will be passed to the t
 154:../AVR/OS_CPU_C.c **** *                            when the task first executes.
 155:../AVR/OS_CPU_C.c **** *
 156:../AVR/OS_CPU_C.c **** *              ptos          is a pointer to the top of stack. It is assumed that 'ptos' points to 
 157:../AVR/OS_CPU_C.c **** *                            highest valid address on the stack.
 158:../AVR/OS_CPU_C.c **** *
 159:../AVR/OS_CPU_C.c **** *              opt           specifies options that can be used to alter the behavior of OSTaskStkI
 160:../AVR/OS_CPU_C.c **** *                            (see uCOS_II.H for OS_TASK_OPT_???).
 161:../AVR/OS_CPU_C.c **** *
 162:../AVR/OS_CPU_C.c **** * Returns    : Always returns the location of the new top-of-stack' once the processor registers ha
 163:../AVR/OS_CPU_C.c **** *              been placed on the stack in the proper order.
 164:../AVR/OS_CPU_C.c **** *
 165:../AVR/OS_CPU_C.c **** * Note(s)    : Interrupts are enabled when your task starts executing. You can change this by setti
 166:../AVR/OS_CPU_C.c **** *              SREG to 0x00 instead. In this case, interrupts would be disabled upon task startup. 
 167:../AVR/OS_CPU_C.c **** *              application code would be responsible for enabling interrupts at the beginning of th
 168:../AVR/OS_CPU_C.c **** *              code. You will need to modify OSTaskIdle() and OSTaskStat() so that they enable inte
 169:../AVR/OS_CPU_C.c **** *              Failure to do this will make your system crash!
 170:../AVR/OS_CPU_C.c **** *
 171:../AVR/OS_CPU_C.c **** *              The AVR return stack is placed OS_TASK_HARD_STK_SIZE bytes before the bottom of the 
 172:../AVR/OS_CPU_C.c **** *              stack.
 173:../AVR/OS_CPU_C.c **** *
 174:../AVR/OS_CPU_C.c **** *              (1) IMPORTANT: The ICC compiler handles function pointers by actually passing the po
 175:../AVR/OS_CPU_C.c **** *                             to a location in Flash that actually contains the pointer to the func
 176:../AVR/OS_CPU_C.c **** *
 177:../AVR/OS_CPU_C.c **** *              (2) IMPORTANT: You MUST set OSTaskStkSize and OSTaskStkSizeHard BEFORE calling OSIni
 178:../AVR/OS_CPU_C.c **** *                             to initialize the Idle and statistic tasks stacks.
 179:../AVR/OS_CPU_C.c **** ***************************************************************************************************
 180:../AVR/OS_CPU_C.c **** */
 181:../AVR/OS_CPU_C.c **** 
 182:../AVR/OS_CPU_C.c **** OS_STK  *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
 183:../AVR/OS_CPU_C.c **** {
 201               	.LM7:
 202               	/* prologue: frame size=0 */
 203               	/* prologue end (size=0) */
 204 000c FA01      		movw r30,r20
 184:../AVR/OS_CPU_C.c ****     OS_STK* stk;
 185:../AVR/OS_CPU_C.c ****     opt=opt;/*废物,防止编译器报警*/
 186:../AVR/OS_CPU_C.c ****     stk=ptos;/*得到栈顶指针*/
 187:../AVR/OS_CPU_C.c ****     

⌨️ 快捷键说明

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