📄 os_cpu_c.lst
字号:
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:
134 .global OSTaskStkInit
136 OSTaskStkInit:
1:os/modify/os_cpu_c.c **** /*
2:os/modify/os_cpu_c.c **** ***************************************************************************************************
3:os/modify/os_cpu_c.c **** * uC/OS-II
4:os/modify/os_cpu_c.c **** * The Real-Time Kernel
5:os/modify/os_cpu_c.c **** *
6:os/modify/os_cpu_c.c **** * AVR Specific code
7:os/modify/os_cpu_c.c **** *
8:os/modify/os_cpu_c.c **** * File : OS_CPU_C.C
9:os/modify/os_cpu_c.c **** * By : Ole Saether
10:os/modify/os_cpu_c.c **** * Port Version : V1.01
11:os/modify/os_cpu_c.c **** *
12:os/modify/os_cpu_c.c **** * AVR-GCC port version : 1.0 2001-04-02 modified/ported to avr-gcc by Jesper Hansen (jesperh@telia
13:os/modify/os_cpu_c.c **** *
14:os/modify/os_cpu_c.c **** * Some modifications by Julius Luukko (Julius.Luukko@lut.fi) to get this compiled with uc/OS-II 2.5
15:os/modify/os_cpu_c.c **** *
16:os/modify/os_cpu_c.c **** * Modifications by Julius Luukko 2003-03-06 (Julius.Luukko@lut.fi):
17:os/modify/os_cpu_c.c **** *
18:os/modify/os_cpu_c.c **** * - RAMPZ is also saved to the stack
19:os/modify/os_cpu_c.c **** *
20:os/modify/os_cpu_c.c **** * Modifications by Julius Luukko 2003-06-24 (Julius.Luukko@lut.fi):
21:os/modify/os_cpu_c.c **** *
22:os/modify/os_cpu_c.c **** * - RAMPZ is only saved to the stack if it is defined, i.e. with chips that have it
23:os/modify/os_cpu_c.c **** *
24:os/modify/os_cpu_c.c **** * Modifications by Julius Luukko 2003-07-21 (Julius.Luukko@lut.fi) to support uC/OS-II v2.70
25:os/modify/os_cpu_c.c **** *
26:os/modify/os_cpu_c.c **** * - OS_TASK_SW_HOOK_EN is tested and if not enabled, no code is generated for OSTaskSwHook()
27:os/modify/os_cpu_c.c **** *
28:os/modify/os_cpu_c.c **** * Modifications by Julius Luukko 2003-10-14 (Julius.Luukko@lut.fi)
29:os/modify/os_cpu_c.c **** *
30:os/modify/os_cpu_c.c **** * - bug correction #1: now compiles if OS_TASK_SW_HOOK_EN is not defined (when using OS_VERSION < 2
31:os/modify/os_cpu_c.c **** * - bug correction #2: added conditional compilation around OSTaskStatHook (OS_CPU_HOOKS_EN > 0)
32:os/modify/os_cpu_c.c **** *
33:os/modify/os_cpu_c.c **** ***************************************************************************************************
34:os/modify/os_cpu_c.c **** */
35:os/modify/os_cpu_c.c ****
36:os/modify/os_cpu_c.c **** #define OS_CPU_GLOBALS
37:os/modify/os_cpu_c.c **** #include <include.h>
38:os/modify/os_cpu_c.c ****
39:os/modify/os_cpu_c.c ****
40:os/modify/os_cpu_c.c **** /*
41:os/modify/os_cpu_c.c **** ***************************************************************************************************
42:os/modify/os_cpu_c.c **** * INITIALIZE A TASK'S STACK
43:os/modify/os_cpu_c.c **** *
44:os/modify/os_cpu_c.c **** * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize
45:os/modify/os_cpu_c.c **** * stack frame of the task being created. This function is highly processor specific.
46:os/modify/os_cpu_c.c **** *
47:os/modify/os_cpu_c.c **** * Arguments : task is a pointer to the task code
48:os/modify/os_cpu_c.c **** *
49:os/modify/os_cpu_c.c **** * pdata is a pointer to a user supplied data area that will be passed to the t
50:os/modify/os_cpu_c.c **** * when the task first executes.
51:os/modify/os_cpu_c.c **** *
52:os/modify/os_cpu_c.c **** * ptos is a pointer to the top of stack. It is assumed that 'ptos' points to
53:os/modify/os_cpu_c.c **** * highest valid address on the stack.
54:os/modify/os_cpu_c.c **** *
55:os/modify/os_cpu_c.c **** * opt specifies options that can be used to alter the behavior of OSTaskStkI
56:os/modify/os_cpu_c.c **** * (see uCOS_II.H for OS_TASK_OPT_???).
57:os/modify/os_cpu_c.c **** *
58:os/modify/os_cpu_c.c **** * Returns : Always returns the location of the new top-of-stack' once the processor registers ha
59:os/modify/os_cpu_c.c **** * been placed on the stack in the proper order.
60:os/modify/os_cpu_c.c **** *
61:os/modify/os_cpu_c.c **** * Note(s) : Interrupts are enabled when your task starts executing. You can change this by setti
62:os/modify/os_cpu_c.c **** * SREG to 0x00 instead. In this case, interrupts would be disabled upon task startup.
63:os/modify/os_cpu_c.c **** * application code would be responsible for enabling interrupts at the beginning of th
64:os/modify/os_cpu_c.c **** * code. You will need to modify OSTaskIdle() and OSTaskStat() so that they enable
65:os/modify/os_cpu_c.c **** * interrupts. Failure to do this will make your system crash!
66:os/modify/os_cpu_c.c **** *
67:os/modify/os_cpu_c.c **** ***************************************************************************************************
68:os/modify/os_cpu_c.c **** */
69:os/modify/os_cpu_c.c ****
70:os/modify/os_cpu_c.c **** OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
71:os/modify/os_cpu_c.c **** {
138 .LM1:
139 /* prologue: frame size=0 */
140 /* prologue end (size=0) */
141 0000 FA01 movw r30,r20
72:os/modify/os_cpu_c.c **** INT8U *stk;
73:os/modify/os_cpu_c.c **** INT16U tmp;
74:os/modify/os_cpu_c.c ****
75:os/modify/os_cpu_c.c **** opt = opt; /* 'opt' is not used, prevent warning
76:os/modify/os_cpu_c.c **** stk = (INT8U *)ptos; /* AVR return stack ("hardware stack") */
77:os/modify/os_cpu_c.c **** tmp = (INT16U)task;
78:os/modify/os_cpu_c.c ****
79:os/modify/os_cpu_c.c **** /* "push" initial register values onto the stack */
80:os/modify/os_cpu_c.c ****
81:os/modify/os_cpu_c.c **** *stk-- = (INT8U)tmp; /* Put task start address on top of stack
143 .LM2:
144 0002 8083 st Z,r24
145 0004 3197 sbiw r30,1
82:os/modify/os_cpu_c.c **** *stk-- = (INT8U)(tmp >> 8);
147 .LM3:
148 0006 892F mov r24,r25
149 0008 9927 clr r25
150 000a 8083 st Z,r24
83:os/modify/os_cpu_c.c ****
84:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R0 = 0x00
152 .LM4:
153 000c 1292 st -Z,__zero_reg__
85:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R1 = 0x00
155 .LM5:
156 000e 1292 st -Z,__zero_reg__
86:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R2 = 0x00
158 .LM6:
159 0010 1292 st -Z,__zero_reg__
87:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R3 = 0x00
161 .LM7:
162 0012 1292 st -Z,__zero_reg__
88:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R4 = 0x00
164 .LM8:
165 0014 1292 st -Z,__zero_reg__
89:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R5 = 0x00
167 .LM9:
168 0016 1292 st -Z,__zero_reg__
90:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R6 = 0x00
170 .LM10:
171 0018 1292 st -Z,__zero_reg__
91:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R7 = 0x00
173 .LM11:
174 001a 1292 st -Z,__zero_reg__
92:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R8 = 0x00
176 .LM12:
177 001c 1292 st -Z,__zero_reg__
93:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R9 = 0x00
179 .LM13:
180 001e 1292 st -Z,__zero_reg__
94:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R10 = 0x00
182 .LM14:
183 0020 1292 st -Z,__zero_reg__
95:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R11 = 0x00
185 .LM15:
186 0022 1292 st -Z,__zero_reg__
96:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R12 = 0x00
188 .LM16:
189 0024 1292 st -Z,__zero_reg__
97:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R13 = 0x00
191 .LM17:
192 0026 1292 st -Z,__zero_reg__
98:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R14 = 0x00
194 .LM18:
195 0028 1292 st -Z,__zero_reg__
99:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R15 = 0x00
197 .LM19:
198 002a 1292 st -Z,__zero_reg__
100:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R16 = 0x00
200 .LM20:
201 002c 1292 st -Z,__zero_reg__
101:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R17 = 0x00
203 .LM21:
204 002e 1292 st -Z,__zero_reg__
102:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R18 = 0x00
206 .LM22:
207 0030 1292 st -Z,__zero_reg__
103:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R19 = 0x00
209 .LM23:
210 0032 1292 st -Z,__zero_reg__
104:os/modify/os_cpu_c.c **** *stk-- = (INT8U)0x00; /* R20 = 0x00
212 .LM24:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -