1
0

fault_gcc.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /******************************************************************//**
  2. * @file fault_gcc.S
  3. * @brief Faults handling functions
  4. * COPYRIGHT (C) 2011, RT-Thread Development Team
  5. * @author Bernard, onelife
  6. * @version 0.4 beta
  7. **********************************************************************
  8. * @section License
  9. * The license and distribution terms for this file may be found in the file LICENSE in this
  10. * distribution or at http://www.rt-thread.org/license/LICENSE
  11. **********************************************************************
  12. * @section Change Logs
  13. * Date Author Notes
  14. * 2009-10-11 Bernard first version
  15. * 2010-12-29 onelife Modify for EFM32
  16. *********************************************************************/
  17. /******************************************************************//**
  18. * @addtogroup cortex-m3
  19. * @{
  20. *********************************************************************/
  21. .cpu cortex-m3
  22. .fpu softvfp
  23. .syntax unified
  24. .thumb
  25. .text
  26. .global rt_hw_hard_fault
  27. .type rt_hw_hard_fault, %function
  28. rt_hw_hard_fault:
  29. /* get current context */
  30. MRS r0, psp /* get fault thread stack pointer */
  31. PUSH {lr}
  32. BL rt_hw_hard_fault_exception
  33. POP {lr}
  34. ORR lr, lr, #0x04
  35. BX lr
  36. /******************************************************************//**
  37. * @}
  38. *********************************************************************/