⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 os_cpu_a.lst

📁 ucosii和ucgui移植到LPC1788上
💻 LST
📖 第 1 页 / 共 2 页
字号:
  187 00000042         ;              h) Restore R4-R11 from new process stack;
                       
  188 00000042         ;              i) Perform exception return which will re
                       store remaining context.
  189 00000042         ;



ARM Macro Assembler    Page 6 


  190 00000042         ;           3) On entry into PendSV handler:
  191 00000042         ;              a) The following have been saved on the p
                       rocess stack (by processor):
  192 00000042         ;                 xPSR, PC, LR, R12, R0-R3
  193 00000042         ;              b) Processor mode is switched to Handler 
                       mode (from Thread mode)
  194 00000042         ;              c) Stack is Main stack (switched from Pro
                       cess stack)
  195 00000042         ;              d) OSTCBCur      points to the OS_TCB of 
                       the task to suspend
  196 00000042         ;                 OSTCBHighRdy  points to the OS_TCB of 
                       the task to resume
  197 00000042         ;
  198 00000042         ;           4) Since PendSV is set to lowest priority in
                        the system (by OSStartHighRdy() above), we
  199 00000042         ;              know that it will only be run when no oth
                       er exception or interrupt is active, and
  200 00000042         ;              therefore safe to assume that context bei
                       ng switched out was using the process stack (PSP).
  201 00000042         ;*******************************************************
                       *************************************************
  202 00000042         
  203 00000042         OS_CPU_PendSVHandler
  204 00000042 B672            CPSID            I           ; Prevent interrupt
                                                            ion during context 
                                                            switch
  205 00000044 F3EF 8009       MRS              R0, PSP     ; PSP is process st
                                                            ack pointer
  206 00000048 B128            CBZ              R0, OS_CPU_PendSVHandler_nosave
 
                                                            ; Skip register sav
                                                            e the first time
  207 0000004A         
  208 0000004A 3820            SUBS             R0, R0, #0x20 ; Save remaining 
                                                            regs r4-11 on proce
                                                            ss stack
  209 0000004C E880 0FF0       STM              R0, {R4-R11}
  210 00000050         
  211 00000050 490F            LDR              R1, =OSTCBCur ; OSTCBCur->OSTCB
                                                            StkPtr = SP;
  212 00000052 6809            LDR              R1, [R1]
  213 00000054 6008            STR              R0, [R1]    ; R0 is SP of proce
                                                            ss being switched o
                                                            ut
  214 00000056         
  215 00000056         ; At this point, entire context of process has been save
                       d
  216 00000056         OS_CPU_PendSVHandler_nosave
  217 00000056 B500            PUSH             {R14}       ; Save LR exc_retur
                                                            n value
  218 00000058 480E            LDR              R0, =OSTaskSwHook 
                                                            ; OSTaskSwHook();
  219 0000005A 4780            BLX              R0
  220 0000005C F85D EB04       POP              {R14}
  221 00000060         
  222 00000060 480D            LDR              R0, =OSPrioCur ; OSPrioCur = OS
                                                            PrioHighRdy;
  223 00000062 490E            LDR              R1, =OSPrioHighRdy
  224 00000064 780A            LDRB             R2, [R1]



ARM Macro Assembler    Page 7 


  225 00000066 7002            STRB             R2, [R0]
  226 00000068         
  227 00000068 4809            LDR              R0, =OSTCBCur ; OSTCBCur  = OST
                                                            CBHighRdy;
  228 0000006A 490D            LDR              R1, =OSTCBHighRdy
  229 0000006C 680A            LDR              R2, [R1]
  230 0000006E 6002            STR              R2, [R0]
  231 00000070         
  232 00000070 6810            LDR              R0, [R2]    ; R0 is new process
                                                             SP; SP = OSTCBHigh
                                                            Rdy->OSTCBStkPtr;
  233 00000072 E890 0FF0       LDM              R0, {R4-R11} ; Restore r4-11 fr
                                                            om new process stac
                                                            k
  234 00000076 3020            ADDS             R0, R0, #0x20
  235 00000078 F380 8809       MSR              PSP, R0     ; Load PSP with new
                                                             process SP
  236 0000007C F04E 0E04       ORR              LR, LR, #0x04 ; Ensure exceptio
                                                            n return uses proce
                                                            ss stack
  237 00000080 B662            CPSIE            I
  238 00000082 4770            BX               LR          ; Exception return 
                                                            will restore remain
                                                            ing context
  239 00000084         
  240 00000084                 END
              E000ED22 
              00000000 
              E000ED04 
              00000000 
              00000000 
              00000000 
              00000000 
              00000000 
Command Line: --debug --xref --device=DARMP1 --apcs=interwork -o.\IFlash\os_cpu
_a.o -IC:\Keil\ARM\INC\NXP\LPC177x_8x --list=.\os_cpu_a.lst ARM\os_cpu_a.asm



ARM Macro Assembler    Page 1 Alphabetic symbol ordering
Relocatable symbols

.text 00000000

Symbol: .text
   Definitions
      At line 56 in file ARM\os_cpu_a.asm
   Uses
      None
Comment: .text unused
OSCtxSw 0000002E

Symbol: OSCtxSw
   Definitions
      At line 147 in file ARM\os_cpu_a.asm
   Uses
      At line 39 in file ARM\os_cpu_a.asm
Comment: OSCtxSw used once
OSIntCtxSw 00000038

Symbol: OSIntCtxSw
   Definitions
      At line 162 in file ARM\os_cpu_a.asm
   Uses
      At line 40 in file ARM\os_cpu_a.asm
Comment: OSIntCtxSw used once
OSStartHang 0000002C

Symbol: OSStartHang
   Definitions
      At line 135 in file ARM\os_cpu_a.asm
   Uses
      At line 136 in file ARM\os_cpu_a.asm
Comment: OSStartHang used once
OSStartHighRdy 0000000E

Symbol: OSStartHighRdy
   Definitions
      At line 117 in file ARM\os_cpu_a.asm
   Uses
      At line 38 in file ARM\os_cpu_a.asm
Comment: OSStartHighRdy used once
OS_CPU_PendSVHandler 00000042

Symbol: OS_CPU_PendSVHandler
   Definitions
      At line 203 in file ARM\os_cpu_a.asm
   Uses
      At line 41 in file ARM\os_cpu_a.asm
Comment: OS_CPU_PendSVHandler used once
OS_CPU_PendSVHandler_nosave 00000056

Symbol: OS_CPU_PendSVHandler_nosave
   Definitions
      At line 216 in file ARM\os_cpu_a.asm
   Uses
      At line 206 in file ARM\os_cpu_a.asm
Comment: OS_CPU_PendSVHandler_nosave used once
OS_CPU_SR_Restore 00000008

Symbol: OS_CPU_SR_Restore



ARM Macro Assembler    Page 2 Alphabetic symbol ordering
Relocatable symbols

   Definitions
      At line 98 in file ARM\os_cpu_a.asm
   Uses
      At line 37 in file ARM\os_cpu_a.asm
Comment: OS_CPU_SR_Restore used once
OS_CPU_SR_Save 00000000

Symbol: OS_CPU_SR_Save
   Definitions
      At line 93 in file ARM\os_cpu_a.asm
   Uses
      At line 36 in file ARM\os_cpu_a.asm
Comment: OS_CPU_SR_Save used once
9 symbols



ARM Macro Assembler    Page 1 Alphabetic symbol ordering
Absolute symbols

NVIC_INT_CTRL E000ED04

Symbol: NVIC_INT_CTRL
   Definitions
      At line 47 in file ARM\os_cpu_a.asm
   Uses
      At line 129 in file ARM\os_cpu_a.asm
      At line 148 in file ARM\os_cpu_a.asm
      At line 163 in file ARM\os_cpu_a.asm

NVIC_PENDSVSET 10000000

Symbol: NVIC_PENDSVSET
   Definitions
      At line 50 in file ARM\os_cpu_a.asm
   Uses
      At line 130 in file ARM\os_cpu_a.asm
      At line 149 in file ARM\os_cpu_a.asm
      At line 164 in file ARM\os_cpu_a.asm

NVIC_PENDSV_PRI 000000FF

Symbol: NVIC_PENDSV_PRI
   Definitions
      At line 49 in file ARM\os_cpu_a.asm
   Uses
      At line 119 in file ARM\os_cpu_a.asm
Comment: NVIC_PENDSV_PRI used once
NVIC_SYSPRI14 E000ED22

Symbol: NVIC_SYSPRI14
   Definitions
      At line 48 in file ARM\os_cpu_a.asm
   Uses
      At line 118 in file ARM\os_cpu_a.asm
Comment: NVIC_SYSPRI14 used once
4 symbols



ARM Macro Assembler    Page 1 Alphabetic symbol ordering
External symbols

OSIntExit 00000000

Symbol: OSIntExit
   Definitions
      At line 32 in file ARM\os_cpu_a.asm
   Uses
      None
Comment: OSIntExit unused
OSIntNesting 00000000

Symbol: OSIntNesting
   Definitions
      At line 31 in file ARM\os_cpu_a.asm
   Uses
      None
Comment: OSIntNesting unused
OSPrioCur 00000000

Symbol: OSPrioCur
   Definitions
      At line 27 in file ARM\os_cpu_a.asm
   Uses
      At line 222 in file ARM\os_cpu_a.asm
Comment: OSPrioCur used once
OSPrioHighRdy 00000000

Symbol: OSPrioHighRdy
   Definitions
      At line 28 in file ARM\os_cpu_a.asm
   Uses
      At line 223 in file ARM\os_cpu_a.asm
Comment: OSPrioHighRdy used once
OSRunning 00000000

Symbol: OSRunning
   Definitions
      At line 26 in file ARM\os_cpu_a.asm
   Uses
      At line 125 in file ARM\os_cpu_a.asm
Comment: OSRunning used once
OSTCBCur 00000000

Symbol: OSTCBCur
   Definitions
      At line 29 in file ARM\os_cpu_a.asm
   Uses
      At line 211 in file ARM\os_cpu_a.asm
      At line 227 in file ARM\os_cpu_a.asm

OSTCBHighRdy 00000000

Symbol: OSTCBHighRdy
   Definitions
      At line 30 in file ARM\os_cpu_a.asm
   Uses
      At line 228 in file ARM\os_cpu_a.asm
Comment: OSTCBHighRdy used once
OSTaskSwHook 00000000




ARM Macro Assembler    Page 2 Alphabetic symbol ordering
External symbols

Symbol: OSTaskSwHook
   Definitions
      At line 33 in file ARM\os_cpu_a.asm
   Uses
      At line 218 in file ARM\os_cpu_a.asm
Comment: OSTaskSwHook used once
8 symbols
342 symbols in table

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -