📄 portisr.lst
字号:
1 .file "portISR.c"
9 .Ltext0:
10 .align 2
11 .global vPortISRStartFirstTask
13 vPortISRStartFirstTask:
14 .LFB2:
15 .file 1 "FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c"
1:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*
2:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** FreeRTOS V4.0.0 - Copyright (C) 2003-2006 Richard Barry.
3:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
4:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** This file is part of the FreeRTOS distribution.
5:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
6:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** FreeRTOS is free software; you can redistribute it and/or modify
7:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** it under the terms of the GNU General Public License as published by
8:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** the Free Software Foundation; either version 2 of the License, or
9:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** (at your option) any later version.
10:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
11:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** FreeRTOS is distributed in the hope that it will be useful,
12:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** but WITHOUT ANY WARRANTY; without even the implied warranty of
13:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** GNU General Public License for more details.
15:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
16:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** You should have received a copy of the GNU General Public License
17:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** along with FreeRTOS; if not, write to the Free Software
18:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
20:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** A special exception to the GPL can be applied should you wish to distribute
21:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** a combined work that includes FreeRTOS, without being obliged to provide
22:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** the source code for any proprietary components. See the licensing section
23:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** of http://www.FreeRTOS.org for full details of how and when the exception
24:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** can be applied.
25:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
26:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** ***************************************************************************
27:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** See http://www.FreeRTOS.org for documentation, latest information, license
28:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** and contact details. Please ensure to read the configuration and relevant
29:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** port sections of the online documentation.
30:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** ***************************************************************************
31:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** */
32:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
33:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
34:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*-----------------------------------------------------------
35:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * Components that can be compiled to either ARM or THUMB mode are
36:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * contained in port.c The ISR routines, which can only be compiled
37:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * to ARM mode, are contained in this file.
38:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** *----------------------------------------------------------*/
39:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
40:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*
41:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** Changes from V2.5.2
42:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
43:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** + The critical section management functions have been changed. These no
44:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** longer modify the stack and are safe to use at all optimisation levels.
45:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** The functions are now also the same for both ARM and THUMB modes.
46:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
47:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** Changes from V2.6.0
48:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
49:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** + Removed the 'static' from the definition of vNonPreemptiveTick() to
50:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** allow the demo to link when using the cooperative scheduler.
51:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
52:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** Changes from V3.2.4
53:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
54:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** + The assembler statements are now included in a single asm block rather
55:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** than each line having its own asm block.
56:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** */
57:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
58:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
59:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Scheduler includes. */
60:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #include "FreeRTOS.h"
61:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #include "task.h"
62:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
63:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Constants required to handle interrupts. */
64:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #define portTIMER_MATCH_ISR_BIT ( ( unsigned portCHAR ) 0x01 )
65:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #define portCLEAR_VIC_INTERRUPT ( ( unsigned portLONG ) 0 )
66:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
67:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Constants required to handle critical sections. */
68:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #define portNO_CRITICAL_NESTING ( ( unsigned portLONG ) 0 )
69:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** volatile unsigned portLONG ulCriticalNesting = 9999UL;
70:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
71:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*-----------------------------------------------------------*/
72:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
73:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* ISR to handle manual context switches (from a call to taskYIELD()). */
74:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vPortYieldProcessor( void ) __attribute__((interrupt("SWI"), naked));
75:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
76:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*
77:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * The scheduler can only be started from ARM mode, hence the inclusion of this
78:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * function here.
79:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** */
80:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vPortISRStartFirstTask( void );
81:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*-----------------------------------------------------------*/
82:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
83:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vPortISRStartFirstTask( void )
84:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** {
16 Function supports interworking.
17 @ args = 0, pretend = 0, frame = 0
18 @ frame_needed = 0, uses_anonymous_args = 0
19 @ link register save eliminated.
20 @ lr needed for prologue
21 .loc 1 87 0
85:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Simply start the scheduler. This is included here as it can only be
86:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** called from ARM mode. */
87:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** portRESTORE_CONTEXT();
22 R0, =pxCurrentTCB
23 0000 48029FE5 LDR R0, [R0]
24 0004 000090E5 LDR LR, [R0]
25 0008 00E090E5 LDR R0, =ulCriticalNesting
26 000c 40029FE5 LDMFD LR!, {R1}
27 0010 0200BEE8 STR R1, [R0]
28 0014 001080E5 LDMFD LR!, {R0}
29 0018 0100BEE8 MSR SPSR, R0
30 001c 00F069E1 LDMFD LR, {R0-R14}^
31 0020 FF7FDEE8 NOP
32 0024 0000A0E1 LDR LR, [LR, #+60]
33 0028 3CE09EE5 SUBS PC, LR, #4
34 002c 04F05EE2
35 ldr r3, .L3
36 0030 0C309FE5 ldr r3, [r3, #0]
37 0034 003093E5 ldr r3, .L3+4
38 0038 08309FE5 ldr r3, [r3, #0]
39 003c 003093E5 .loc 1 88 0
88:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** }
40 n 2
41 0040 1EFF2FE1 .L3:
42 .word ulCriticalNesting
43 .word pxCurrentTCB
44 .LFE2:
46 0048 00000000 .align 2
47 .global vPortDisableInterruptsFromThumb
49 vPortDisableInterruptsFromThumb:
50 .LFB5:
51 .loc 1 172 0
52 @ Function supports interworking.
53 @ Naked Function: prologue and epilogue provided by programmer.
89:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*-----------------------------------------------------------*/
90:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
91:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*
92:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * Called by portYIELD() or taskYIELD() to manually force a context switch.
93:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** *
94:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * When a context switch is performed from the task level the saved task
95:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * context is made to look as if it occurred from within the tick ISR. This
96:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * way the same restore context function can be used when restoring the context
97:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * saved from the ISR or that saved from a call to vPortYieldProcessor.
98:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** */
99:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vPortYieldProcessor( void )
100:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** {
101:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Within an IRQ ISR the link register has an offset from the true return
102:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** address, but an SWI ISR does not. Add the offset manually so the same
103:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** ISR return code can be used in both cases. */
104:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** asm volatile ( "ADD LR, LR, #4" );
105:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
106:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Perform the context switch. First save the context of the current task. */
107:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** portSAVE_CONTEXT();
108:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
109:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Find the highest priority task that is ready to run. */
110:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** vTaskSwitchContext();
111:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
112:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* Restore the context of the new task. */
113:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** portRESTORE_CONTEXT();
114:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** }
115:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*-----------------------------------------------------------*/
116:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
117:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /*
118:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * The ISR used for the scheduler tick depends on whether the cooperative or
119:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** * the preemptive scheduler is being used.
120:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** */
121:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
122:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #if configUSE_PREEMPTION == 0
123:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
124:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** /* The cooperative scheduler requires a normal IRQ service routine to
125:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** simply increment the system tick. */
126:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vNonPreemptiveTick( void ) __attribute__ ((interrupt ("IRQ")));
127:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** void vNonPreemptiveTick( void )
128:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** {
129:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** vTaskIncrementTick();
130:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** T0_IR = portTIMER_MATCH_ISR_BIT;
131:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** VICVectAddr = portCLEAR_VIC_INTERRUPT;
132:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** }
133:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c ****
134:FreeRTOS/Source/portable/GCC/ARM7_LPC2000/portISR.c **** #else
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -