📄 os_cpu_c.lst
字号:
##############################################################################
# #
# IAR MSP430 C-Compiler V1.26A/WIN #
# #
# Time limited license: 29 days left #
# #
# Compile time = 30/Sep/2002 18:04:08 #
# Target option = SP430x31x #
# Memory model = small #
# Source file = j:\software\ucos-ii\ti-msp430\iar\source\os_cpu_c.c #
# List file = j:\software\ucos-ii\ti-msp430\iar\source\debug\list\os_cpu_c.lst#
# Object file = j:\software\ucos-ii\ti-msp430\iar\source\debug\obj\os_cpu_c.r43#
# ASM file = j:\software\ucos-ii\ti-msp430\iar\source\debug\list\os_cpu_c.s43#
# Command line = -OJ:\SOFTWARE\UCOS-II\TI-MSP430\IAR\SOURCE\Debug\Obj\ #
# -e -K -gA -s6 -RCODE -r0 #
# -LJ:\SOFTWARE\UCOS-II\TI-MSP430\IAR\SOURCE\Debug\List\ #
# -q -t8 -x #
# -AJ:\SOFTWARE\UCOS-II\TI-MSP430\IAR\SOURCE\Debug\List\ #
# -X -IC:\PROGRA~1\IARSYS~1\ew23\430\inc\ #
# -I\software\ucos-ii\ti-msp430\iar\source\ #
# -I\software\ucos-ii\source\ #
# J:\SOFTWARE\UCOS-II\TI-MSP430\IAR\SOURCE\Os_cpu_c.c #
# #
# Copyright 1996-2002 IAR Systems. All rights reserved. #
##############################################################################
extern INT8U const OSMapTbl[]; /* Priority->Bit Mask lookup table */
-----------------------------------^
"\software\ucos-ii\source\ucos_ii.h",481 Warning[27]: Size of "extern" object 'OSMapTbl' is unknown
extern INT8U const OSUnMapTbl[]; /* Priority->Index lookup table */
-------------------------------------^
"\software\ucos-ii\source\ucos_ii.h",482 Warning[27]: Size of "extern" object 'OSUnMapTbl' is unknown
\ 0000 NAME os_cpu_c(16)
\ 0000 RSEG CODE(1)
\ 0000 RSEG UDATA0(1)
\ 0000 PUBLIC OSISRStkPtr
\ 0000 PUBLIC OSInitHookBegin
\ 0000 PUBLIC OSInitHookEnd
\ 0000 PUBLIC OSTCBInitHook
\ 0000 PUBLIC OSTaskCreateHook
\ 0000 PUBLIC OSTaskDelHook
\ 0000 PUBLIC OSTaskIdleHook
\ 0000 PUBLIC OSTaskStatHook
\ 0000 PUBLIC OSTaskStkInit
\ 0000 PUBLIC OSTaskSwHook
\ 0000 PUBLIC OSTimeTickHook
\ 0000 EXTERN ?CL430_1_26_L08
\ 0000 RSEG CODE
\ 0000 OSInitHookBegin:
1 /*
2 *********************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 *
6 * (c) Copyright 2002, Micrium, Inc., Weston, FL
7 * All Rights Reserved
8 *
9 * TI MSP430
10 *
11 *
12 * File : OS_CPU_C.C
13 * By : Jian Chen (yenger@hotmail.com)
14 * Jean J. Labrosse
15 * Compiler : IAR System Embedded Workbench for TI MSP430 V1.26A
16 *********************************************************************************************************
17 */
18
19 #define OS_CPU_GLOBALS
20 #include "includes.h"
21
22 /*
23 *********************************************************************************************************
24 * OS INITIALIZATION HOOK
25 * (BEGINNING)
26 *
27 * Description: This function is called by OSInit() at the beginning of OSInit().
28 *
29 * Arguments : none
30 *
31 * Note(s) : 1) Interrupts should be disabled during this call.
32 *********************************************************************************************************
33 */
34 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
35 void OSInitHookBegin (void)
36 {
37 }
\ 0000 3041 RET
\ 0002 OSInitHookEnd:
38 #endif
39
40 /*
41 *********************************************************************************************************
42 * OS INITIALIZATION HOOK
43 * (END)
44 *
45 * Description: This function is called by OSInit() at the end of OSInit().
46 *
47 * Arguments : none
48 *
49 * Note(s) : 1) Interrupts should be disabled during this call.
50 *********************************************************************************************************
51 */
52 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION > 203
53 void OSInitHookEnd (void)
54 {
55 }
\ 0002 3041 RET
\ 0004 OSTaskCreateHook:
56 #endif
57
58 /*$PAGE*/
59 /*
60 *********************************************************************************************************
61 * TASK CREATION HOOK
62 *
63 * Description: This function is called when a task is created.
64 *
65 * Arguments : ptcb is a pointer to the task control block of the task being created.
66 *
67 * Note(s) : 1) Interrupts are disabled during this call.
68 *********************************************************************************************************
69 */
70 #if OS_CPU_HOOKS_EN > 0
71 void OSTaskCreateHook (OS_TCB *ptcb)
72 {
73 ptcb = ptcb; /* Prevent compiler warning */
74 }
\ 0004 3041 RET
\ 0006 OSTaskDelHook:
75 #endif
76
77
78 /*
79 *********************************************************************************************************
80 * TASK DELETION HOOK
81 *
82 * Description: This function is called when a task is deleted.
83 *
84 * Arguments : ptcb is a pointer to the task control block of the task being deleted.
85 *
86 * Note(s) : 1) Interrupts are disabled during this call.
87 *********************************************************************************************************
88 */
89 #if OS_CPU_HOOKS_EN > 0
90 void OSTaskDelHook (OS_TCB *ptcb)
91 {
92 ptcb = ptcb; /* Prevent compiler warning */
93 }
\ 0006 3041 RET
\ 0008 OSTaskIdleHook:
94 #endif
95
96 /*
97 *********************************************************************************************************
98 * IDLE TASK HOOK
99 *
100 * Description: This function is called by the idle task. This hook has been added to allow you to do
101 * such things as STOP the CPU to conserve power.
102 *
103 * Arguments : none
104 *
105 * Note(s) : 1) Interrupts are enabled during this call.
106 *********************************************************************************************************
107 */
108 #if OS_CPU_HOOKS_EN > 0 && OS_VERSION >= 251
109 void OSTaskIdleHook (void)
110 {
111 LPM0; /* Enter low power mode */
\ 0008 32D01000 BIS #16,SR
112 }
\ 000C 3041 RET
\ 000E OSTaskStatHook:
113 #endif
114
115 /*
116 *********************************************************************************************************
117 * STATISTIC TASK HOOK
118 *
119 * Description: This function is called every second by uC/OS-II's statistics task. This allows your
120 * application to add functionality to the statistics task.
121 *
122 * Arguments : none
123 *********************************************************************************************************
124 */
125
126 #if OS_CPU_HOOKS_EN > 0
127 void OSTaskStatHook (void)
128 {
129 }
\ 000E 3041 RET
\ 0010 OSTaskStkInit:
130 #endif
131
132 /*$PAGE*/
133 /*
134 *********************************************************************************************************
135 * INITIALIZE A TASK'S STACK
136 *
137 * Description: This function is called by either OSTaskCreate() or OSTaskCreateExt() to initialize the
138 * stack frame of the task being created. This function is highly processor specific.
139 *
140 * Arguments : task is a pointer to the task code
141 *
142 * pdata is a pointer to a user supplied data area that will be passed to the task
143 * when the task first executes.
144 *
145 * ptos is a pointer to the top of stack. It is assumed that 'ptos' points to
146 * a 'free' entry on the task stack. If OS_STK_GROWTH is set to 1 then
147 * 'ptos' will contain the HIGHEST valid address of the stack. Similarly, if
148 * OS_STK_GROWTH is set to 0, the 'ptos' will contains the LOWEST valid address
149 * of the stack.
150 *
151 * opt specifies options that can be used to alter the behavior of OSTaskStkInit().
152 * (see uCOS_II.H for OS_TASK_OPT_???).
153 *
154 * Returns : Always returns the location of the new top-of-stack' once the processor registers have
155 * been placed on the stack in the proper order.
156 *
157 * Note(s) : The register passing convention for the IAR compiler is that the LEFTMOST two parameters
158 * are passed in registers:
159 * 1st parameter: R12 for a 16-bit value or, R13:R12 for a 32-bit value
160 * 2nd parameter: R14 for a 16-bit value or, R15:R14 for a 32-bit value
161 *********************************************************************************************************
162 */
163
164 OS_STK *OSTaskStkInit (void (*task)(void *pd), void *pdata, OS_STK *ptos, INT16U opt)
165 {
166 INT16U *top;
167
168
169 opt = opt;
170 top = (INT16U *)ptos;
\ 0010 1D410200 MOV 2(SP),R13
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -