fault_iar.S 772 B

12345678910111213141516171819202122232425262728293031323334
  1. ;/*
  2. ; * File : fault_iar.S
  3. ; * This file is part of RT-Thread RTOS
  4. ; * COPYRIGHT (C) 2009, 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. SECTION .text:CODE(2)
  15. THUMB
  16. REQUIRE8
  17. PRESERVE8
  18. IMPORT rt_hw_hard_fault_exception
  19. EXPORT rt_hw_hard_fault
  20. 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. END