📄 main.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\Demo\msp430_IAR\m #
# ain.c #
# Command line = C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\msp430_IAR\m #
# ain.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\main.l #
# st #
# Object file = C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\Obj\main.r4 #
# 3 #
# #
# #
##############################################################################
C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\msp430_IAR\main.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 // TODO - Par & Serial Tests need to be ripped out - maybe go ahead and
34 // modify ser test for uart....
35 // note that flash is for flashing leds...
36
37 /*
38 * Creates all the demo application tasks, then starts the scheduler. The WEB
39 * documentation provides more details of the demo application tasks.
40 *
41 * This demo is configured to execute on the ES449 prototyping board from
42 * SoftBaugh. The ES449 has a built in LCD display and a single built in user
43 * LED. Therefore, in place of flashing an LED, the 'flash' and 'check' tasks
44 * toggle '*' characters on the LCD. The left most '*' represents LED 0, the
45 * next LED 1, etc.
46 *
47 * Main. c also creates a task called 'Check'. This only executes every three
48 * seconds but has the highest priority so is guaranteed to get processor time.
49 * Its main function is to check that all the other tasks are still operational.
50 * Each task that does not flash an LED maintains a unique count that is
51 * incremented each time the task successfully completes its function. Should
52 * any error occur within such a task the count is permanently halted. The
53 * 'check' task inspects the count of each task to ensure it has changed since
54 * the last time the check task executed. If all the count variables have
55 * changed all the tasks are still executing error free, and the check task
56 * toggles an LED with a three second period. Should any task contain an error
57 * at any time the LED toggle rate will increase to 500ms.
58 *
59 * Please read the documentation for the MSP430 port available on
60 * http://www.FreeRTOS.org.
61 */
62
63 /* Standard includes. */
64 #include <stdlib.h>
65
66 /* Scheduler includes. */
67 #include "FreeRTOS.h"
\ In segment DATA16_AN, at 0x2
\ union <unnamed> volatile __data16 _A_IFG1
\ _A_IFG1:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x120
\ union <unnamed> volatile __data16 _A_WDTCTL
\ _A_WDTCTL:
\ 000000 DS8 2
\ In segment DATA16_AN, at 0x22
\ union <unnamed> volatile __data16 _A_P1DIR
\ _A_P1DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x26
\ union <unnamed> volatile __data16 _A_P1SEL
\ _A_P1SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x2a
\ union <unnamed> volatile __data16 _A_P2DIR
\ _A_P2DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x2e
\ union <unnamed> volatile __data16 _A_P2SEL
\ _A_P2SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x1a
\ union <unnamed> volatile __data16 _A_P3DIR
\ _A_P3DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x1b
\ union <unnamed> volatile __data16 _A_P3SEL
\ _A_P3SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x1e
\ union <unnamed> volatile __data16 _A_P4DIR
\ _A_P4DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x1f
\ union <unnamed> volatile __data16 _A_P4SEL
\ _A_P4SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x32
\ union <unnamed> volatile __data16 _A_P5DIR
\ _A_P5DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x33
\ union <unnamed> volatile __data16 _A_P5SEL
\ _A_P5SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x36
\ union <unnamed> volatile __data16 _A_P6DIR
\ _A_P6DIR:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x37
\ union <unnamed> volatile __data16 _A_P6SEL
\ _A_P6SEL:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x57
\ union <unnamed> volatile __data16 _A_BCSCTL1
\ _A_BCSCTL1:
\ 000000 DS8 1
\ In segment DATA16_AN, at 0x58
\ union <unnamed> volatile __data16 _A_BCSCTL2
\ _A_BCSCTL2:
\ 000000 DS8 1
68 #include "task.h"
69
70 /* Demo application includes. */
71 #include "partest.h"
72 #include "flash.h"
73 #include "integer.h"
74 #include "comtest2.h"
75 #include "PollQ.h"
76 #include "dynamic.h"
77
78 /* Constants required for hardware setup. */
79 #define mainALL_BITS_OUTPUT ( ( unsigned portCHAR ) 0xff )
80 #define mainMAX_FREQUENCY ( ( unsigned portCHAR ) 121 )
81
82 /* Constants that define the LED's used by the various tasks. [in this case
83 the '*' characters on the LCD represent LED's] */
84 #define mainCHECK_LED ( 4 )
85 #define mainCOM_TEST_LED ( 10 )
86
87 /* Demo task priorities. */
88 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
89 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
90 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
91 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
92
93 /* Baud rate used by the COM test tasks. */
94 #define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200L )
95
96 /* The frequency at which the 'Check' tasks executes. See the comments at the
97 top of the page. When the system is operating error free the 'Check' task
98 toggles an LED every three seconds. If an error is discovered in any task the
99 rate is increased to 500 milliseconds. [in this case the '*' characters on the
100 LCD represent LED's]*/
101 #define mainNO_ERROR_CHECK_DELAY ( ( portTickType ) 3000 / portTICK_RATE_MS )
102 #define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
103
104 /* The constants used in the calculation. */
105 #define intgCONST1 ( ( portLONG ) 123 )
106 #define intgCONST2 ( ( portLONG ) 234567 )
107 #define intgCONST3 ( ( portLONG ) -3 )
108 #define intgCONST4 ( ( portLONG ) 7 )
109 #define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )
110
111 /*
112 * The function that implements the Check task. See the comments at the head
113 * of the page for implementation details.
114 */
115 static void vErrorChecks( void *pvParameters );
116
117 /*
118 * Called by the Check task. Returns pdPASS if all the other tasks are found
119 * to be operating without error - otherwise returns pdFAIL.
120 */
121 static portSHORT prvCheckOtherTasksAreStillRunning( void );
122
123 /*
124 * Perform the hardware setup required by the ES449 in order to run the demo
125 * application.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -