📄 os_core.lst
字号:
##############################################################################
# #
# IAR MSP430 C-Compiler V1.26A/WIN #
# #
# Time limited license: 29 days left #
# #
# Compile time = 30/Sep/2002 18:04:09 #
# Target option = SP430x31x #
# Memory model = small #
# Source file = c:\software\ucos-ii\source\os_core.c #
# List file = j:\software\ucos-ii\ti-msp430\iar\source\debug\list\os_core.lst#
# Object file = j:\software\ucos-ii\ti-msp430\iar\source\debug\obj\os_core.r43#
# ASM file = j:\software\ucos-ii\ti-msp430\iar\source\debug\list\os_core.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\ #
# C:\SOFTWARE\uCOS-II\SOURCE\OS_CORE.C #
# #
# Copyright 1996-2002 IAR Systems. All rights reserved. #
##############################################################################
extern INT8U const OSMapTbl[]; /* Priority->Bit Mask lookup table */
-----------------------------------^
"c:\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 */
-------------------------------------^
"c:\software\ucos-ii\source\ucos_ii.h",482 Warning[27]: Size of "extern" object 'OSUnMapTbl' is unknown
\ 0000 NAME os_core(16)
\ 0000 RSEG CODE(1)
\ 0000 RSEG CONST(1)
\ 0000 RSEG UDATA0(1)
\ 0000 PUBLIC OSCPUUsage
\ 0000 EXTERN OSCtxSw
\ 0000 PUBLIC OSCtxSwCtr
\ 0000 PUBLIC OSEventFreeList
\ 0000 PUBLIC OSEventTbl
\ 0000 PUBLIC OSFlagFreeList
\ 0000 PUBLIC OSFlagTbl
\ 0000 PUBLIC OSIdleCtr
\ 0000 PUBLIC OSIdleCtrMax
\ 0000 PUBLIC OSIdleCtrRun
\ 0000 PUBLIC OSInit
\ 0000 EXTERN OSInitHookBegin
\ 0000 EXTERN OSInitHookEnd
\ 0000 EXTERN OSIntCtxSw
\ 0000 PUBLIC OSIntEnter
\ 0000 PUBLIC OSIntExit
\ 0000 PUBLIC OSIntExitY
\ 0000 PUBLIC OSIntNesting
\ 0000 PUBLIC OSLockNesting
\ 0000 PUBLIC OSMapTbl
\ 0000 PUBLIC OSMemFreeList
\ 0000 PUBLIC OSMemTbl
\ 0000 PUBLIC OSPrioCur
\ 0000 PUBLIC OSPrioHighRdy
\ 0000 PUBLIC OSQFreeList
\ 0000 PUBLIC OSQTbl
\ 0000 PUBLIC OSRdyGrp
\ 0000 PUBLIC OSRdyTbl
\ 0000 PUBLIC OSRunning
\ 0000 PUBLIC OSSchedLock
\ 0000 PUBLIC OSSchedUnlock
\ 0000 PUBLIC OSStart
\ 0000 EXTERN OSStartHighRdy
\ 0000 PUBLIC OSStatInit
\ 0000 PUBLIC OSStatRdy
\ 0000 PUBLIC OSTCBCur
\ 0000 PUBLIC OSTCBFreeList
\ 0000 PUBLIC OSTCBHighRdy
\ 0000 EXTERN OSTCBInitHook
\ 0000 PUBLIC OSTCBList
\ 0000 PUBLIC OSTCBPrioTbl
\ 0000 PUBLIC OSTCBTbl
\ 0000 EXTERN OSTaskCreateExt
\ 0000 EXTERN OSTaskCreateHook
\ 0000 PUBLIC OSTaskCtr
\ 0000 EXTERN OSTaskIdleHook
\ 0000 PUBLIC OSTaskIdleStk
\ 0000 EXTERN OSTaskStatHook
\ 0000 PUBLIC OSTaskStatStk
\ 0000 PUBLIC OSTime
\ 0000 EXTERN OSTimeDly
\ 0000 PUBLIC OSTimeTick
\ 0000 EXTERN OSTimeTickHook
\ 0000 PUBLIC OSUnMapTbl
\ 0000 PUBLIC OSVersion
\ 0000 PUBLIC OS_Dummy
\ 0000 PUBLIC OS_EventTO
\ 0000 PUBLIC OS_EventTaskRdy
\ 0000 PUBLIC OS_EventTaskWait
\ 0000 PUBLIC OS_EventWaitListInit
\ 0000 EXTERN OS_FlagInit
\ 0000 EXTERN OS_MemInit
\ 0000 EXTERN OS_QInit
\ 0000 PUBLIC OS_Sched
\ 0000 PUBLIC OS_TCBInit
\ 0000 PUBLIC OS_TaskIdle
\ 0000 PUBLIC OS_TaskStat
\ 0000 EXTERN ?CL430_1_26_L08
\ 0000 EXTERN ?UL_DIVMOD_L03
\ 0000 RSEG CODE
\ 0000 OSInit:
1 /*
2 *********************************************************************************************************
3 * uC/OS-II
4 * The Real-Time Kernel
5 * CORE FUNCTIONS
6 *
7 * (c) Copyright 1992-2002, Jean J. Labrosse, Weston, FL
8 * All Rights Reserved
9 *
10 * File : OS_CORE.C
11 * By : Jean J. Labrosse
12 *********************************************************************************************************
13 */
14
15 #ifndef OS_MASTER_FILE
16 #define OS_GLOBALS
17 #include "includes.h"
18 #endif
19
20 /*
21 *********************************************************************************************************
22 * MAPPING TABLE TO MAP BIT POSITION TO BIT MASK
23 *
24 * Note: Index into table is desired bit position, 0..7
25 * Indexed value corresponds to bit mask
26 *********************************************************************************************************
27 */
28
29 INT8U const OSMapTbl[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
30
31 /*
32 *********************************************************************************************************
33 * PRIORITY RESOLUTION TABLE
34 *
35 * Note: Index into table is bit pattern to resolve highest priority
36 * Indexed value corresponds to highest priority bit position (i.e. 0..7)
37 *********************************************************************************************************
38 */
39
40 INT8U const OSUnMapTbl[] = {
41 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x00 to 0x0F */
42 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x10 to 0x1F */
43 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x20 to 0x2F */
44 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x30 to 0x3F */
45 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x40 to 0x4F */
46 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x50 to 0x5F */
47 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x60 to 0x6F */
48 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x70 to 0x7F */
49 7, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x80 to 0x8F */
50 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0x90 to 0x9F */
51 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xA0 to 0xAF */
52 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xB0 to 0xBF */
53 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xC0 to 0xCF */
54 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xD0 to 0xDF */
55 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, /* 0xE0 to 0xEF */
56 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 /* 0xF0 to 0xFF */
57 };
58
59 /*
60 *********************************************************************************************************
61 * FUNCTION PROTOTYPES
62 *********************************************************************************************************
63 */
64 static void OS_InitEventList(void);
65 static void OS_InitMisc(void);
66 static void OS_InitRdyList(void);
67 static void OS_InitTaskIdle(void);
68 static void OS_InitTaskStat(void);
69 static void OS_InitTCBList(void);
70
71 /*$PAGE*/
72 /*
73 *********************************************************************************************************
74 * INITIALIZATION
75 *
76 * Description: This function is used to initialize the internals of uC/OS-II and MUST be called prior to
77 * creating any uC/OS-II object and, prior to calling OSStart().
78 *
79 * Arguments : none
80 *
81 * Returns : none
82 *********************************************************************************************************
83 */
84
85 void OSInit (void)
86 {
87 #if OS_VERSION >= 204
88 OSInitHookBegin(); /* Call port specific initialization code */
\ 0000 B0120000 CALL #OSInitHookBegin
89 #endif
90
91 OS_InitMisc(); /* Initialize miscellaneous variables */
\ 0004 B0121403 CALL #OS_InitMisc
92
93 OS_InitRdyList(); /* Initialize the Ready List */
\ 0008 B0125203 CALL #OS_InitRdyList
94 OS_InitTCBList(); /* Initialize the free list of OS_TCBs */
\ 000C B012D203 CALL #OS_InitTCBList
95 OS_InitEventList(); /* Initialize the free list of OS_EVENTs */
\ 0010 B012EA02 CALL #OS_InitEventList
96
97 #if (OS_VERSION >= 251) && (OS_FLAG_EN > 0) && (OS_MAX_FLAGS > 0)
98 OS_FlagInit(); /* Initialize the event flag structures */
\ 0014 B0120000 CALL #OS_FlagInit
99 #endif
100
101 #if (OS_MEM_EN > 0) && (OS_MAX_MEM_PART > 0)
102 OS_MemInit(); /* Initialize the memory manager */
\ 0018 B0120000 CALL #OS_MemInit
103 #endif
104
105 #if (OS_Q_EN > 0) && (OS_MAX_QS > 0)
106 OS_QInit(); /* Initialize the message queue structures */
\ 001C B0120000 CALL #OS_QInit
107 #endif
108
109 OS_InitTaskIdle(); /* Create the Idle Task */
\ 0020 B0127C03 CALL #OS_InitTaskIdle
110 #if OS_TASK_STAT_EN > 0
111 OS_InitTaskStat(); /* Create the Statistic Task */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -