📄 partest.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.30A/W32 KICKSTART 14/Dec/2005 14:41:42 #
# 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\ParTest\ParTest.c #
# Command line = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\ParTest\ParTest.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\ParTest.lst #
# Object file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IA #
# R\binary\Obj\ParTest.r79 #
# #
# #
##############################################################################
D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\ParTest\ParTest.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 /* Library includes. */
34 #include "GPIO.h"
35
36 /* Scheduler includes. */
37 #include "FreeRTOS.h"
38
39 /* Demo application includes. */
40 #include "partest.h"
41
42 /*-----------------------------------------------------------
43 * Simple parallel port IO routines for the LED's - which are
44 * connected to the second nibble of GPIO port 1.
45 *-----------------------------------------------------------*/
46
47 #define partstLED_3 0x0080
48 #define partstLED_2 0x0040
49 #define partstLED_1 0x0020
50 #define partstLED_0 0x0010
51 #define partstON_BOARD 0x0100 /* The LED built onto the KickStart board. */
52
53 #define partstALL_LEDs ( partstLED_0 | partstLED_1 | partstLED_2 | partstLED_3 | partstON_BOARD )
54
55 #define partstFIRST_LED_BIT 4
56
57 /* This demo application uses files that are common to all port demo
58 applications. These files assume 6 LED's are available, whereas I have
59 only 5 (including the LED built onto the development board). To prevent
60 two tasks trying to use the same LED a bit of remapping is performed.
61 The ComTest tasks will try and use LED's 6 and 7. LED 6 is ignored and
62 has no effect, LED 7 is mapped to LED3. The LED usage is described in
63 the port documentation available from the FreeRTOS.org WEB site. */
64 #define partstCOM_TEST_LED 7
65 #define partstRX_CHAR_LED 3
66
67 /*-----------------------------------------------------------*/
68
\ In segment CODE, align 4, keep-with-next
69 void vParTestInitialise( void )
70 {
\ vParTestInitialise:
\ 00000000 00B5 PUSH {LR}
71 /* Configure the bits used to flash LED's on port 1 as output. */
72 GPIO_Config(GPIO1, partstALL_LEDs, GPIO_OUT_OD);
\ 00000002 0422 MOV R2,#+0x4
\ 00000004 F821 MOV R1,#+0xF8
\ 00000006 4900 LSL R1,R1,#+0x1 ;; #+0x1F0
\ 00000008 .... LDR R0,??DataTable2 ;; 0xe0004000
\ 0000000A ........ _BLF GPIO_Config,GPIO_Config??rT
73 }
\ 0000000E 01BC POP {R0}
\ 00000010 0047 BX R0 ;; return
74 /*-----------------------------------------------------------*/
75
\ In segment CODE, align 4, keep-with-next
76 void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
77 {
\ vParTestSetLED:
\ 00000000 00B5 PUSH {LR}
78 if( uxLED == partstCOM_TEST_LED )
\ 00000002 0728 CMP R0,#+0x7
\ 00000004 00D1 BNE ??vParTestSetLED_0
79 {
80 /* Remap as described above. */
81 uxLED = partstRX_CHAR_LED;
\ 00000006 0320 MOV R0,#+0x3
82 }
83
84 /* Adjust the LED value to map to the port pins actually being used,
85 then write the required value to the port. */
86 uxLED += partstFIRST_LED_BIT;
87 GPIO_BitWrite( GPIO1, uxLED, !xValue );
\ ??vParTestSetLED_0:
\ 00000008 4A1E SUB R2,R1,#+0x1
\ 0000000A 9241 SBC R2,R2
\ 0000000C D20F LSR R2,R2,#+0x1F
\ 0000000E 001D ADD R0,R0,#+0x4
\ 00000010 0106 LSL R1,R0,#+0x18
\ 00000012 090E LSR R1,R1,#+0x18
\ 00000014 .... LDR R0,??DataTable2 ;; 0xe0004000
\ 00000016 ........ _BLF GPIO_BitWrite,GPIO_BitWrite??rT
88 }
\ 0000001A 01BC POP {R0}
\ 0000001C 0047 BX R0 ;; return
89 /*-----------------------------------------------------------*/
90
\ In segment CODE, align 4, keep-with-next
91 void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
92 {
\ vParTestToggleLED:
\ 00000000 00B5 PUSH {LR}
93 if( uxLED == partstCOM_TEST_LED )
\ 00000002 0728 CMP R0,#+0x7
\ 00000004 00D1 BNE ??vParTestToggleLED_0
94 {
95 /* Remap as described above. */
96 uxLED = partstRX_CHAR_LED;
\ 00000006 0320 MOV R0,#+0x3
97 }
98
99 /* Adjust the LED value to map to the port pins actually being used,
100 then write the opposite value to the current state to the port pin. */
101 uxLED += partstFIRST_LED_BIT;
\ ??vParTestToggleLED_0:
\ 00000008 001D ADD R0,R0,#+0x4
102 GPIO_BitWrite(GPIO1, uxLED, ~GPIO_BitRead( GPIO1, uxLED ) );
\ 0000000A 0749 LDR R1,??vParTestToggleLED_1 ;; 0xe000400c
\ 0000000C 0988 LDRH R1,[R1, #+0]
\ 0000000E 0141 ASR R1,R0
\ 00000010 0123 MOV R3,#+0x1
\ 00000012 0B40 AND R3,R1
\ 00000014 DA43 MVN R2,R3
\ 00000016 1206 LSL R2,R2,#+0x18
\ 00000018 120E LSR R2,R2,#+0x18
\ 0000001A 0106 LSL R1,R0,#+0x18
\ 0000001C 090E LSR R1,R1,#+0x18
\ 0000001E .... LDR R0,??DataTable2 ;; 0xe0004000
\ 00000020 ........ _BLF GPIO_BitWrite,GPIO_BitWrite??rT
103 }
\ 00000024 01BC POP {R0}
\ 00000026 0047 BX R0 ;; return
\ ??vParTestToggleLED_1:
\ 00000028 0C4000E0 DC32 0xe000400c
\ In segment CODE, align 4, keep-with-next
\ ??DataTable2:
\ 00000000 004000E0 DC32 0xe0004000
104
105
106
107
Maximum stack usage in bytes:
Function CSTACK
-------- ------
vParTestInitialise 4
vParTestSetLED 4
vParTestToggleLED 4
Segment part sizes:
Function/Label Bytes
-------------- -----
vParTestInitialise 18
vParTestSetLED 30
vParTestToggleLED 44
??DataTable2 4
Others 40
136 bytes in segment CODE
96 bytes of CODE memory (+ 40 bytes shared)
Errors: none
Warnings: none
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -