2009-07-03 06:48:23 +08:00
|
|
|
;/*
|
2009-12-25 20:18:53 +08:00
|
|
|
; * File : fault_rvds.S
|
2009-07-03 06:48:23 +08:00
|
|
|
; * This file is part of RT-Thread RTOS
|
|
|
|
; * COPYRIGHT (C) 2006, RT-Thread Development Team
|
|
|
|
; *
|
|
|
|
; * The license and distribution terms for this file may be
|
|
|
|
; * found in the file LICENSE in this distribution or at
|
|
|
|
; * http://www.rt-thread.org/license/LICENSE
|
|
|
|
; *
|
|
|
|
; * Change Logs:
|
|
|
|
; * Date Author Notes
|
|
|
|
; * 2009-01-17 Bernard first version
|
|
|
|
; */
|
|
|
|
|
2009-09-28 08:00:23 +08:00
|
|
|
AREA |.text|, CODE, READONLY, ALIGN=2
|
|
|
|
THUMB
|
|
|
|
REQUIRE8
|
|
|
|
PRESERVE8
|
2009-07-03 06:48:23 +08:00
|
|
|
|
2009-09-28 08:00:23 +08:00
|
|
|
IMPORT rt_hw_hard_fault_exception
|
2009-07-03 06:48:23 +08:00
|
|
|
|
2009-09-28 08:00:23 +08:00
|
|
|
rt_hw_hard_fault PROC
|
|
|
|
EXPORT rt_hw_hard_fault
|
2009-07-03 06:48:23 +08:00
|
|
|
|
2009-09-28 08:00:23 +08:00
|
|
|
; get current context
|
|
|
|
MRS r0, psp ; get fault thread stack pointer
|
|
|
|
PUSH {lr}
|
|
|
|
BL rt_hw_hard_fault_exception
|
|
|
|
POP {lr}
|
2009-07-03 06:48:23 +08:00
|
|
|
|
2009-09-28 08:00:23 +08:00
|
|
|
ORR lr, lr, #0x04
|
|
|
|
BX lr
|
2009-08-15 23:51:12 +08:00
|
|
|
ENDP
|
|
|
|
|
|
|
|
END
|