fault_gcc.S 771 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * File : fault_gcc.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-10-11 Bernard first version
  13. */
  14. .cpu cortex-m3
  15. .fpu softvfp
  16. .syntax unified
  17. .thumb
  18. .text
  19. .global rt_hw_hard_fault
  20. .type rt_hw_hard_fault, %function
  21. rt_hw_hard_fault:
  22. /* get current context */
  23. MRS r0, psp /* get fault thread stack pointer */
  24. PUSH {lr}
  25. BL rt_hw_hard_fault_exception
  26. POP {lr}
  27. ORR lr, lr, #0x04
  28. BX lr