📄 main.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART 14/Dec/2005 14:46:58 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = interwork #
# Endian = little #
# Stack alignment = 4 #
# Source file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\main.c #
# Command line = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\main.c -D _NDEBUG -D STR71X_IAR -lC #
# D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\binary\List\ --diag_suppress pe191,pa082 -o #
# D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\binary\Obj\ -s9 --no_clustering --cpu_mode thumb #
# --endian little --cpu ARM7TDMI --stack_align 4 #
# --interwork -e --require_prototypes --fpu None #
# --dlib_config "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0 #
# Kickstart\arm\LIB\dl4tptinl8n.h" -I #
# D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\ -I D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR #
# 71x_IAR\library\include\ -I #
# D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\..\common\include\ -I D:\board\FreeRTOSV3.2.3\Free #
# RTOS\Demo\ARM7_STR71x_IAR\..\..\source\include\ -I #
# "C:\Program Files\IAR Systems\Embedded Workbench #
# 4.0 Kickstart\arm\INC\" #
# List file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\binary\List\main.lst #
# Object file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\binary\Obj\main.r79 #
# #
# #
##############################################################################
D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\main.c
1 /*
2 FreeRTOS V3.2.3 - Copyright (C) 2003-2005 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 /*
34 NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
35 The processor MUST be in supervisor mode when vTaskStartScheduler is
36 called. The demo applications included in the FreeRTOS.org download switch
37 to supervisor mode prior to main being called. If you are not using one of
38 these demo application projects then ensure Supervisor mode is used.
39 */
40
41 /*
42 * Creates all the demo application tasks, then starts the scheduler. The WEB
43 * documentation provides more details of the demo application tasks.
44 *
45 * Main.c also creates a task called "Check". This only executes every three
46 * seconds but has the highest priority so is guaranteed to get processor time.
47 * Its main function is to check that all the other tasks are still operational.
48 * Each task (other than the "flash" tasks) maintains a unique count that is
49 * incremented each time the task successfully completes its function. Should
50 * any error occur within such a task the count is permanently halted. The
51 * check task inspects the count of each task to ensure it has changed since
52 * the last time the check task executed. If all the count variables have
53 * changed all the tasks are still executing error free, and the check task
54 * toggles the onboard LED. Should any task contain an error at any time
55 * the LED toggle rate will change from 3 seconds to 500ms.
56 *
57 */
58
59 /* Library includes. */
60 #include "RCCU.h"
61 #include "wdg.h"
62
63 /* Scheduler includes. */
64 #include "FreeRTOS.h"
65 #include "task.h"
66
67 /* Demo application includes. */
68 #include "flash.h"
69 #include "integer.h"
70 #include "PollQ.h"
71 #include "BlockQ.h"
72 #include "semtest.h"
73 #include "dynamic.h"
74 #include "partest.h"
75 #include "comtest2.h"
76
77 /* Priorities for the demo application tasks. */
78 #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
79 #define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
80 #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
81 #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
82 #define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
83 #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
84
85 /* Constants required by the 'Check' task. */
86 #define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
87 #define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
88 #define mainCHECK_TASK_LED ( 4 )
89
90 /* Constants for the ComTest tasks. */
91 #define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )
92 #define mainCOM_TEST_LED ( 6 ) /* The LED built onto the kickstart board. */
93
94 /*
95 * The task that executes at the highest priority and calls
96 * prvCheckOtherTasksAreStillRunning(). See the description at the top
97 * of the file.
98 */
99 static void vErrorChecks( void *pvParameters );
100
101 /*
102 * Configure the processor for use with the IAR STR71x demo board. This
103 * just sets the PLL for the required frequency.
104 */
105 static void prvSetupHardware( void );
106
107 /*
108 * Checks that all the demo application tasks are still executing without error
109 * - as described at the top of the file. Called by vErrorChecks().
110 */
111 static portLONG prvCheckOtherTasksAreStillRunning( void );
112
113
114 /*-----------------------------------------------------------*/
115
116 /*
117 * Starts all the other tasks, then starts the scheduler.
118 */
\ In segment CODE, align 4, keep-with-next
119 void main( void )
120 {
\ main:
\ 00000000 00B5 PUSH {LR}
121 /* Setup any hardware that has not already been configured by the low
122 level init routines. */
123 prvSetupHardware();
\ 00000002 1A48 LDR R0,??main_0 ;; 0xa0000008
\ 00000004 0168 LDR R1,[R0, #+0]
\ 00000006 1A4A LDR R2,??main_0+0x4 ;; 0xffff7fff
\ 00000008 0A40 AND R2,R1
\ 0000000A 0260 STR R2,[R0, #+0]
\ 0000000C 0021 MOV R1,#+0
\ 0000000E 0120 MOV R0,#+0x1
\ 00000010 ........ _BLF RCCU_PLL1Config,RCCU_PLL1Config??rT
\ 00000014 0020 MOV R0,#+0
\ 00000016 ........ _BLF RCCU_RCLKSourceConfig,RCCU_RCLKSourceConfig??rT
124
125 /* Initialise the LED outputs for use by the demo application tasks. */
126 vParTestInitialise();
\ 0000001A ........ _BLF vParTestInitialise,vParTestInitialise??rT
127
128 /* Start all the standard demo application tasks. */
129 vStartIntegerMathTasks( tskIDLE_PRIORITY );
\ 0000001E 0020 MOV R0,#+0
\ 00000020 ........ _BLF vStartIntegerMathTasks,vStartIntegerMathTasks??rT
130 vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
\ 00000024 0320 MOV R0,#+0x3
\ 00000026 ........ _BLF vStartLEDFlashTasks,vStartLEDFlashTasks??rT
131 vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
\ 0000002A 0220 MOV R0,#+0x2
\ 0000002C ........ _BLF vStartPolledQueueTasks,vStartPolledQueueTasks??rT
132 vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
\ 00000030 0120 MOV R0,#+0x1
\ 00000032 ........ _BLF vStartSemaphoreTasks,vStartSemaphoreTasks??rT
133 vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
\ 00000036 0220 MOV R0,#+0x2
\ 00000038 ........ _BLF vStartBlockingQueueTasks,vStartBlockingQueueTasks??rT
134 vStartDynamicPriorityTasks();
\ 0000003C ........ _BLF vStartDynamicPriorityTasks,vStartDynamicPriorityTasks??rT
135 vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
\ 00000040 0622 MOV R2,#+0x6
\ 00000042 E121 MOV R1,#+0xE1
\ 00000044 4902 LSL R1,R1,#+0x9 ;; #+0x1C200
\ 00000046 0220 MOV R0,#+0x2
\ 00000048 ........ _BLF vAltStartComTestTasks,vAltStartComTestTasks??rT
136
137 /* Start the check task - which is defined in this file. */
138 xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
\ 0000004C 0020 MOV R0,#+0
\ 0000004E 01B4 PUSH {R0}
\ 00000050 0420 MOV R0,#+0x4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -