📄 port.lst
字号:
##############################################################################
# #
# IAR MSP430 C/C++ Compiler V3.41A/W32 22/Apr/2006 00:25:15 #
# Copyright 1996-2006 IAR Systems. All rights reserved. #
# #
# __rt_version = 2 #
# __double_size = 32 #
# __reg_r4 = free #
# __reg_r5 = free #
# __pic = no #
# __core = 64kb #
# Source file = C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\portable\M #
# SP430F1611\port.c #
# Command line = C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\portable\M #
# SP430F1611\port.c -D ROWLEY_MSP430 -D IAR_MSP430 -lC #
# C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\ -lA #
# C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\ #
# --remarks -o C:\MSP430F169_Eval_Port\FreeRTOSv401\Debu #
# g\Obj\ -s2 --no_cse --no_unroll --no_inline #
# --no_code_motion --no_tbaa --debug -e #
# --migration_preprocessor_extensions --double=32 -I #
# C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Inclu #
# de\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\Inc #
# lude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\MSP #
# 430_IAR\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Sourc #
# e\portable\msp430f1611\ -I "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0\430\INC\" -I #
# "C:\Program Files\IAR Systems\Embedded Workbench #
# 4.0\430\INC\CLIB\" #
# List file = C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\port.l #
# st #
# Object file = C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\Obj\port.r4 #
# 3 #
# #
# #
##############################################################################
C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\portable\MSP430F1611\port.c
1 /*
2 FreeRTOS V4.0.1 - Copyright (C) 2003 - 2006 Richard Barry.
3
4 This file is part of the FreeRTOS distribution.
5
6 FreeRTOS is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 FreeRTOS is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with FreeRTOS; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
20 A special exception to the GPL can be applied should you wish to distribute
21 a combined work that includes FreeRTOS, without being obliged to provide
22 the source code for any proprietary components. See the licensing section
23 of http://www.FreeRTOS.org for full details of how and when the exception
24 can be applied.
25
26 ***************************************************************************
27 See http://www.FreeRTOS.org for documentation, latest information, license
28 and contact details. Please ensure to read the configuration and relevant
29 port sections of the online documentation.
30 ***************************************************************************
31 */
32
33 /* Scheduler includes. */
34 #include "FreeRTOS.h"
\ In segment DATA16_AN, at 0x160
\ union <unnamed> volatile __data16 _A_TACTL
\ _A_TACTL:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x162
\ union <unnamed> volatile __data16 _A_TACCTL0
\ _A_TACCTL0:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x172
\ unsigned short volatile __data16 TACCR0
\ TACCR0:
\ 000000 DS8 2
35 #include "task.h"
36
37 /*-----------------------------------------------------------
38 * Implementation of functions defined in portable.h for the MSP430 port.
39 *----------------------------------------------------------*/
40
41 /* Constants required for hardware setup. The tick ISR runs off the ACLK,
42 not the MCLK. */
43 #define portACLK_FREQUENCY_HZ ( ( portTickType ) 32768 )
44 #define portINITIAL_CRITICAL_NESTING ( ( unsigned portSHORT ) 10 )
45 #define portFLAGS_INT_ENABLED ( ( portSTACK_TYPE ) 0x08 )
46
47 // #define portCCR0_DIVISOR ( ( portTickType ) 65.536 )
48
49 /* We require the address of the pxCurrentTCB variable, but don't want to know
50 any details of its type. */
51 typedef void tskTCB;
52 extern volatile tskTCB * volatile pxCurrentTCB;
53
54 /* Each task maintains a count of the critical section nesting depth. Each
55 time a critical section is entered the count is incremented. Each time a
56 critical section is exited the count is decremented - with interrupts only
57 being re-enabled if the count is zero.
58
59 usCriticalNesting will get set to zero when the scheduler starts, but must
60 not be initialised to zero as this will cause problems during the startup
61 sequence. */
\ In segment DATA16_I, align 2, align-sorted
\ 000000 REQUIRE ?cstart_init_copy
62 volatile unsigned portSHORT usCriticalNesting = portINITIAL_CRITICAL_NESTING;
\ usCriticalNesting:
\ 000000 DS8 2
\ 000002 REQUIRE `?<Initializer for usCriticalNesting>`
63 /*-----------------------------------------------------------*/
64
65
66 /*
67 * Sets up the periodic ISR used for the RTOS tick. This uses timer 0, but
68 * could have alternatively used the watchdog timer or timer 1.
69 */
70 void prvSetupTimerInterrupt( void );
71 /*-----------------------------------------------------------*/
72
73 /*
74 * Initialise the stack of a task to look exactly as if a call to
75 * portSAVE_CONTEXT had been called.
76 *
77 * See the header file portable.h.
78 */
\ In segment CODE, align 2
79 portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )
\ pxPortInitialiseStack:
80 {
\ 000000 1F410200 MOV.W 0x2(SP), R15
81 /*
82 Place a few bytes of known values on the bottom of the stack.
83 This is just useful for debugging and can be included if required.
84
85 *pxTopOfStack = ( portSTACK_TYPE ) 0x1111;
86 pxTopOfStack--;
87 *pxTopOfStack = ( portSTACK_TYPE ) 0x2222;
88 pxTopOfStack--;
89 *pxTopOfStack = ( portSTACK_TYPE ) 0x3333;
90 pxTopOfStack--;
91 */
92
93 /* The msp430 automatically pushes the PC then SR onto the stack before
94 executing an ISR. We want the stack to look just as if this has happened
95 so place a pointer to the start of the task on the stack first - followed
96 by the flags we want the task to use when it starts up. */
97 *pxTopOfStack = ( portSTACK_TYPE ) pxCode;
\ 000004 8C4E0000 MOV.W R14, 0(R12)
98 pxTopOfStack--;
\ 000008 3C50FEFF ADD.W #0xfffe, R12
99 *pxTopOfStack = portFLAGS_INT_ENABLED;
\ 00000C BC420000 MOV.W #0x8, 0(R12)
100 pxTopOfStack--;
\ 000010 3C50FEFF ADD.W #0xfffe, R12
101
102 /* Next the general purpose registers. */
103 *pxTopOfStack = ( portSTACK_TYPE ) 0x4444;
\ 000014 BC4044440000 MOV.W #0x4444, 0(R12)
104 pxTopOfStack--;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -