📄 portasm.lst
字号:
###############################################################################
# #
# IAR Systems ARM Assembler V4.30A/W32 14/Dec/2005 14:41:46 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Source file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\portable\IAR\STR71x\portasm.s79#
# List file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\binary\List\portasm.lst#
# Object file = D:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\binary\Obj\portasm.r79#
# Command line = D:\board\FreeRTOSV3.2.3\FreeRTOS\Source\portable\IAR\STR71x\portasm.s79 #
# -OD:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\binary\Obj\ #
# -s+ -M<> -w+ #
# -LD:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\binary\List\ #
# -t8 --cpu ARM7TDMI --fpu None #
# -IC:\Program Files\IAR Systems\Embedded Workbench 4.0 Kickstart\arm\INC\ #
# -ID:\board\FreeRTOSV3.2.3\FreeRTOS\Demo\ARM7_STR71x_IAR\..\..\Source\portable\IAR\STR71x\ #
# #
###############################################################################
1 00000000 RSEG ICODE:CODE
2 00000000 CODE32
3 00000000
4 00000000 EXTERN vPortPreemptiveTick
5 00000000 EXTERN vTaskSwitchContext
6 00000000
7 00000000 PUBLIC vPortYieldProcessor
8 00000000 PUBLIC vPortStartFirstTask
9 00000000 PUBLIC vPortPreemptiveTickISR
10 00000000
11 00000000 #include "ISR_Support.h"
12 00000000
13 00000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 00000000 ; Starting the first task is just a matter of
restoring the context that
15 00000000 ; was created by pxPortInitialiseStack().
16 00000000 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
17 00000000 vPortStartFirstTask:
18 00000000 portRESTORE_CONTEXT
18.1 00000000
18.2 00000000 ; Set the LR to the task stack.
18.3 00000000 2C119FE5 LDR R1, =pxCurrentTCB
18.4 00000004 000091E5 LDR R0, [R1]
18.5 00000008 00E090E5 LDR LR, [R0]
18.6 0000000C
18.7 0000000C ; The critical nesting depth is the
first item on the stack.
18.8 0000000C ; Load it into the ulCriticalNesting
variable.
18.9 0000000C 24019FE5 LDR R0, =ulCriticalNesting
18.10 00000010 0200BEE8 LDMFD LR!, {R1}
18.11 00000014 001080E5 STR R1, [R0]
18.12 00000018
18.13 00000018 ; Get the SPSR from the stack.
18.14 00000018 0100BEE8 LDMFD LR!, {R0}
18.15 0000001C 00F06FE1 MSR SPSR_cxsf, R0
18.16 00000020
18.17 00000020 ; Restore all system mode registers for
the task.
18.18 00000020 FF7FDEE8 LDMFD LR, {R0-R14}^
18.19 00000024 0000A0E1 NOP
18.20 00000028
18.21 00000028 ; Restore the return address.
18.22 00000028 3CE09EE5 LDR LR, [LR, #+60]
18.23 0000002C
18.24 0000002C ; And return - correcting the offset in
the LR to obtain the
18.25 0000002C ; correct address.
18.26 0000002C 04F05EE2 SUBS PC, LR, #4
18.27 00000030
18.28 00000030 ENDM
19 00000030
20 00000030 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
21 00000030 ; Manual context switch function. This is the
SWI hander.
22 00000030 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
23 00000030 vPortYieldProcessor:
24 00000030 04E08EE2 ADD LR, LR, #4
; Add 4 to
the LR to make the
LR appear
exactly
25 00000034
; as if the context was saved
during and IRQ
26 00000034
; handler.
27 00000034
28 00000034 portSAVE_CONTEXT
; Save the context of the current task...
28.1 00000034
28.2 00000034 ; Push R0 as we are going to use the
register.
28.3 00000034 01002DE9 STMDB SP!, {R0}
28.4 00000038
28.5 00000038 ; Set R0 to point to the task stack
pointer.
28.6 00000038 00204DE9 STMDB SP, {SP}^
28.7 0000003C 04D04DE2 SUB SP, SP, #4
28.8 00000040 0100BDE8 LDMIA SP!, {R0}
28.9 00000044
28.10 00000044 ; Push the return address onto the
stack.
28.11 00000044 004020E9 STMDB R0!, {LR}
28.12 00000048
28.13 00000048 ; Now we have saved LR we can use it
instead of R0.
28.14 00000048 00E0A0E1 MOV LR, R0
28.15 0000004C
28.16 0000004C ; Pop R0 so we can save it onto the
system mode stack.
28.17 0000004C 0100BDE8 LDMIA SP!, {R0}
28.18 00000050
28.19 00000050 ; Push all the system mode registers
onto the task stack.
28.20 00000050 FF7F4EE9 STMDB LR, {R0-LR}^
28.21 00000054 3CE04EE2 SUB LR, LR, #60
28.22 00000058
28.23 00000058 ; Push the SPSR onto the task stack.
28.24 00000058 00004FE1 MRS R0, SPSR
28.25 0000005C 01002EE9 STMDB LR!, {R0}
28.26 00000060
28.27 00000060 D0009FE5 LDR R0, =ulCriticalNesting
28.28 00000064 000090E5 LDR R0, [R0]
28.29 00000068 01002EE9 STMDB LR!, {R0}
28.30 0000006C
28.31 0000006C ; Store the new top of stack for the
task.
28.32 0000006C C0109FE5 LDR R1, =pxCurrentTCB
28.33 00000070 000091E5 LDR R0, [R1]
28.34 00000074 00E080E5 STR LR, [R0]
28.35 00000078
28.36 00000078 ENDM
29 00000078 BC009FE5 LDR R0, =vTaskSwitchContext ; before
selecting the next task to
execute.
30 0000007C 0FE0A0E1 mov lr, pc
31 00000080 10FF2FE1 BX R0
32 00000084 portRESTORE_CONTEXT
; Restore the context of the selected
task.
32.1 00000084
32.2 00000084 ; Set the LR to the task stack.
32.3 00000084 A8109FE5 LDR R1, =pxCurrentTCB
32.4 00000088 000091E5 LDR R0, [R1]
32.5 0000008C 00E090E5 LDR LR, [R0]
32.6 00000090
32.7 00000090 ; The critical nesting depth is the
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -