fault_gcc.S 771 字节
Newer Older
B
bernard.xiong@gmail.com 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
/*
 * File      : fault_gcc.S
 * This file is part of RT-Thread RTOS
 * COPYRIGHT (C) 2009, RT-Thread Development Team
 *
 * The license and distribution terms for this file may be
 * found in the file LICENSE in this distribution or at
 * http://www.rt-thread.org/license/LICENSE
 *
 * Change Logs:
 * Date           Author       Notes
 * 2009-10-11     Bernard      first version
 */

.cpu cortex-m3
.fpu softvfp
.syntax unified
.thumb
.text

.global rt_hw_hard_fault
.type rt_hw_hard_fault, %function
rt_hw_hard_fault:
    /* get current context */
    MRS     r0, psp                 /* get fault thread stack pointer */
    PUSH    {lr}
    BL      rt_hw_hard_fault_exception
    POP     {lr}

    ORR     lr, lr, #0x04
    BX      lr