fault_gcc.S 743 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * File : fault_gcc.S
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 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. 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