ARM Macro Assembler Page 1 1 00000000 ;/* 2 00000000 ; * Copyright (c) 2013-2018 Arm Limited. All rights rese rved. 3 00000000 ; * 4 00000000 ; * SPDX-License-Identifier: Apache-2.0 5 00000000 ; * 6 00000000 ; * Licensed under the Apache License, Version 2.0 (the License); you may 7 00000000 ; * not use this file except in compliance with the Lice nse. 8 00000000 ; * You may obtain a copy of the License at 9 00000000 ; * 10 00000000 ; * www.apache.org/licenses/LICENSE-2.0 11 00000000 ; * 12 00000000 ; * Unless required by applicable law or agreed to in wr iting, software 13 00000000 ; * distributed under the License is distributed on an A S IS BASIS, WITHOUT 14 00000000 ; * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 00000000 ; * See the License for the specific language governing permissions and 16 00000000 ; * limitations under the License. 17 00000000 ; * 18 00000000 ; * ---------------------------------------------------- ------------------------- 19 00000000 ; * 20 00000000 ; * Project: CMSIS-RTOS RTX 21 00000000 ; * Title: Cortex-M3 Exception handlers 22 00000000 ; * 23 00000000 ; * ---------------------------------------------------- ------------------------- 24 00000000 ; */ 25 00000000 26 00000000 27 00000000 00000014 I_T_RUN_OFS EQU 20 ; osRtxInfo.thread. run offset 28 00000000 00000038 TCB_SP_OFS EQU 56 ; TCB.SP offset 29 00000000 30 00000000 31 00000000 PRESERVE8 32 00000000 THUMB 33 00000000 34 00000000 35 00000000 AREA |.constdata|, DATA, READONLY 36 00000000 EXPORT irqRtxLib 37 00000000 00 irqRtxLib DCB 0 ; Non weak library reference 38 00000001 39 00000001 40 00000001 AREA |.text|, CODE, READONLY 41 00000000 42 00000000 43 00000000 SVC_Handler ARM Macro Assembler Page 2 PROC 44 00000000 EXPORT SVC_Handler 45 00000000 IMPORT osRtxUserSVC 46 00000000 IMPORT osRtxInfo 47 00000000 IF :DEF:MPU_LOAD 49 ENDIF 50 00000000 51 00000000 F01E 0F04 TST LR,#0x04 ; Determine return stack from EXC_RETU RN bit 2 52 00000004 BF0C ITE EQ 53 00000006 F3EF 8008 MRSEQ R0,MSP ; Get MSP if return stack is MSP 54 0000000A F3EF 8009 MRSNE R0,PSP ; Get PSP if return stack is PSP 55 0000000E 56 0000000E 6981 LDR R1,[R0,#24] ; Load saved PC fro m stack 57 00000010 F811 1C02 LDRB R1,[R1,#-2] ; Load SVC number 58 00000014 B9D9 CBNZ R1,SVC_User ; Branch if not SVC 0 59 00000016 60 00000016 B501 PUSH {R0,LR} ; Save SP and EXC_R ETURN 61 00000018 E890 100F LDM R0,{R0-R3,R12} ; Load function parameters and addr ess from stack 62 0000001C 47E0 BLX R12 ; Call service func tion 63 0000001E E8BD 5000 POP {R12,LR} ; Restore SP and EX C_RETURN 64 00000022 E88C 0003 STM R12,{R0-R1} ; Store function re turn values 65 00000026 66 00000026 SVC_Context 67 00000026 4B19 LDR R3,=osRtxInfo+I_T_RUN_OFS ; Loa d address of osRtxI nfo.run 68 00000028 E893 0006 LDM R3,{R1,R2} ; Load osRtxInfo.th read.run: curr & ne xt 69 0000002C 4291 CMP R1,R2 ; Check if thread s witch is required 70 0000002E BF08 IT EQ 71 00000030 4770 BXEQ LR ; Exit when threads are the same 72 00000032 73 00000032 B119 CBZ R1,SVC_ContextSwitch ; Branch i f running thread is deleted 74 00000034 75 00000034 SVC_ContextSave 76 00000034 E92C 0FF0 STMDB R12!,{R4-R11} ; Save R4..R11 77 00000038 F8C1 C038 STR R12,[R1,#TCB_SP_OFS] ; Store SP 78 0000003C 79 0000003C SVC_ContextSwitch 80 0000003C 601A STR R2,[R3] ; osRtxInfo.thread. run: curr = next ARM Macro Assembler Page 3 81 0000003E 82 0000003E IF :DEF:MPU_LOAD 87 ENDIF 88 0000003E 89 0000003E SVC_ContextRestore 90 0000003E 6B90 LDR R0,[R2,#TCB_SP_OFS] ; Load SP 91 00000040 E8B0 0FF0 LDMIA R0!,{R4-R11} ; Restore R4..R11 92 00000044 F380 8809 MSR PSP,R0 ; Set PSP 93 00000048 94 00000048 F06F 0E02 MVN LR,#~0xFFFFFFFD ; Set EXC_RETUR N value 95 0000004C 96 0000004C SVC_Exit 97 0000004C 4770 BX LR ; Exit from handler 98 0000004E 99 0000004E SVC_User 100 0000004E 4A10 LDR R2,=osRtxUserSVC ; Load address of SVC table 101 00000050 6813 LDR R3,[R2] ; Load SVC maximum number 102 00000052 4299 CMP R1,R3 ; Check SVC number range 103 00000054 D8FA BHI SVC_Exit ; Branch if out of range 104 00000056 105 00000056 B501 PUSH {R0,LR} ; Save SP and EXC_R ETURN 106 00000058 F852 C021 LDR R12,[R2,R1,LSL #2] ; Load addre ss of SVC function 107 0000005C C80F LDM R0,{R0-R3} ; Load function par ameters from stack 108 0000005E 47E0 BLX R12 ; Call service func tion 109 00000060 E8BD 5000 POP {R12,LR} ; Restore SP and EX C_RETURN 110 00000064 F8CC 0000 STR R0,[R12] ; Store function re turn value 111 00000068 112 00000068 4770 BX LR ; Return from handl er 113 0000006A 114 0000006A 00 00 ALIGN 115 0000006C ENDP 116 0000006C 117 0000006C 118 0000006C PendSV_Handler PROC 119 0000006C EXPORT PendSV_Handler 120 0000006C IMPORT osRtxPendSV_Handler 121 0000006C 122 0000006C B501 PUSH {R0,LR} ; Save EXC_RETURN 123 0000006E F7FF FFFE BL osRtxPendSV_Handler ; Call osRt xPendSV_Handler 124 00000072 E8BD 4001 POP {R0,LR} ; Restore EXC_RETUR N 125 00000076 F3EF 8C09 MRS R12,PSP 126 0000007A E7D4 B SVC_Context 127 0000007C ARM Macro Assembler Page 4 128 0000007C ALIGN 129 0000007C ENDP 130 0000007C 131 0000007C 132 0000007C SysTick_Handler PROC 133 0000007C EXPORT SysTick_Handler 134 0000007C IMPORT osRtxTick_Handler 135 0000007C 136 0000007C B501 PUSH {R0,LR} ; Save EXC_RETURN 137 0000007E F7FF FFFE BL osRtxTick_Handler ; Call osRtxT ick_Handler 138 00000082 E8BD 4001 POP {R0,LR} ; Restore EXC_RETUR N 139 00000086 F3EF 8C09 MRS R12,PSP 140 0000008A E7CC B SVC_Context 141 0000008C 142 0000008C ALIGN 143 0000008C ENDP 144 0000008C 145 0000008C 146 0000008C END 00000014 00000000 Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw ork --depend=..\output\irq_cm3.d -o..\output\irq_cm3.o -ID:\26数据采集电子\soft ware\增加标志位判断\RTX5_20220316\Project\RTE -ID:\26数据采集电子\software\增加 标志位判断\RTX5_20220316\Project\RTE\CMSIS -ID:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7. 0\CMSIS\RTOS2\Include -ID:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\Inc lude -ID:\Keil_v5\ARM\PACK\Keil\STM32L1xx_DFP\1.3.0 -ID:\Keil_v5\ARM\CMSIS\Incl ude --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 514" -- predefine="_RTE_ SETA 1" --predefine="STM32L151xD SETA 1" --list=.\irq_cm3.lst D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\Source\ARM\irq_cm3.s ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols .constdata 00000000 Symbol: .constdata Definitions At line 35 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses None Comment: .constdata unused irqRtxLib 00000000 Symbol: irqRtxLib Definitions At line 37 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 36 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: irqRtxLib used once 2 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering Relocatable symbols .text 00000000 Symbol: .text Definitions At line 40 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses None Comment: .text unused PendSV_Handler 0000006C Symbol: PendSV_Handler Definitions At line 118 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Uses At line 119 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: PendSV_Handler used once SVC_Context 00000026 Symbol: SVC_Context Definitions At line 66 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 126 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s At line 140 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s SVC_ContextRestore 0000003E Symbol: SVC_ContextRestore Definitions At line 89 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses None Comment: SVC_ContextRestore unused SVC_ContextSave 00000034 Symbol: SVC_ContextSave Definitions At line 75 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses None Comment: SVC_ContextSave unused SVC_ContextSwitch 0000003C Symbol: SVC_ContextSwitch Definitions At line 79 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 73 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: SVC_ContextSwitch used once ARM Macro Assembler Page 2 Alphabetic symbol ordering Relocatable symbols SVC_Exit 0000004C Symbol: SVC_Exit Definitions At line 96 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 103 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: SVC_Exit used once SVC_Handler 00000000 Symbol: SVC_Handler Definitions At line 43 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 44 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: SVC_Handler used once SVC_User 0000004E Symbol: SVC_User Definitions At line 99 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 58 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: SVC_User used once SysTick_Handler 0000007C Symbol: SysTick_Handler Definitions At line 132 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Uses At line 133 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: SysTick_Handler used once 10 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering Absolute symbols I_T_RUN_OFS 00000014 Symbol: I_T_RUN_OFS Definitions At line 27 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 67 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: I_T_RUN_OFS used once TCB_SP_OFS 00000038 Symbol: TCB_SP_OFS Definitions At line 28 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 77 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s At line 90 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s 2 symbols ARM Macro Assembler Page 1 Alphabetic symbol ordering External symbols osRtxInfo 00000000 Symbol: osRtxInfo Definitions At line 46 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 67 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Comment: osRtxInfo used once osRtxPendSV_Handler 00000000 Symbol: osRtxPendSV_Handler Definitions At line 120 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Uses At line 123 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: osRtxPendSV_Handler used once osRtxTick_Handler 00000000 Symbol: osRtxTick_Handler Definitions At line 134 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Uses At line 137 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: osRtxTick_Handler used once osRtxUserSVC 00000000 Symbol: osRtxUserSVC Definitions At line 45 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\So urce\ARM\irq_cm3.s Uses At line 100 in file D:\Keil_v5\ARM\PACK\ARM\CMSIS\5.7.0\CMSIS\RTOS2\RTX\S ource\ARM\irq_cm3.s Comment: osRtxUserSVC used once 4 symbols 358 symbols in table