fault_rvds.S 837 B

1234567891011121314151617181920212223242526272829303132333435
  1. ;/*
  2. ; * File : fault_rvds.S
  3. ; * This file is part of RT-Thread RTOS
  4. ; * COPYRIGHT (C) 2006, RT-Thread Development Team
  5. ; *
  6. ; * The license and distribution terms for this file may be
  7. ; * found in the file LICENSE in this distribution or at
  8. ; * http://www.rt-thread.org/license/LICENSE
  9. ; *
  10. ; * Change Logs:
  11. ; * Date Author Notes
  12. ; * 2009-01-17 Bernard first version
  13. ; */
  14. AREA |.text|, CODE, READONLY, ALIGN=2
  15. THUMB
  16. REQUIRE8
  17. PRESERVE8
  18. IMPORT rt_hw_hard_fault_exception
  19. rt_hw_hard_fault PROC
  20. EXPORT rt_hw_hard_fault
  21. ; get current context
  22. MRS r0, psp ; get fault thread stack pointer
  23. PUSH {lr}
  24. BL rt_hw_hard_fault_exception
  25. POP {lr}
  26. ORR lr, lr, #0x04
  27. BX lr
  28. ENDP
  29. END