提交 3df72cc2 编写于 作者: B bernard.xiong@gmail.com

update file header.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1891 bbd45198-f89e-11dd-88c7-29a3b14d5316
上级 23839bc8
/***************************************************************************//**
* @file context_gcc.S
* @brief Context switch functions
* COPYRIGHT (C) 2011, RT-Thread Development Team
* @author Bernard, onelife
* @version 0.4 beta
*******************************************************************************
* @section License
* 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
*******************************************************************************
* @section Change Logs
* Date Author Notes
* 2009-10-11 Bernard first version
* 2010-12-29 onelife Modify for EFM32
* 2011-06-17 onelife Merge all of the assembly source code into
* context_gcc.S
* 2011-07-12 onelife Add interrupt context check function
******************************************************************************/
/*
* File : context_gcc.S
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2009 - 2011, 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
* 2010-12-29 onelife Modify for EFM32
* 2011-06-17 onelife Merge all of the assembly source code into context_gcc.S
* 2011-07-12 onelife Add interrupt context check function
*/
/***************************************************************************//**
* @addtogroup cortex-m3
* @{
******************************************************************************/
.cpu cortex-m3
.fpu softvfp
.syntax unified
......@@ -35,7 +27,6 @@
.equ SHPR3, 0xE000ED20 /* system priority register (3) */
.equ PENDSV_PRI_LOWEST, 0x00FF0000 /* PendSV priority value (lowest) */
/*
* rt_base_t rt_hw_interrupt_disable();
*/
......@@ -193,7 +184,3 @@ HardFault_Handler:
rt_hw_interrupt_check:
MRS R0, IPSR
BX LR
/***************************************************************************//**
* @}
******************************************************************************/
/******************************************************************//**
* @file cpuport.c
* @brief This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2011, RT-Thread Development Team
* @author Bernard, onelife
* @version 0.4 beta
**********************************************************************
* @section License
* 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
**********************************************************************
* @section Change Logs
/*
* File : cpuport.c
* This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2011, 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-01-05 Bernard first version
* 2011-02-14 onelife Modify for EFM32
* 2011-06-17 onelife Merge all of the C source code into cpuport.c
*********************************************************************/
/******************************************************************//**
* @addtogroup cortex-m3
* @{
*********************************************************************/
*/
/* Includes -------------------------------------------------------------------*/
#include <rtthread.h>
/* Private typedef -------------------------------------------------------------*/
struct stack_contex
/* stack context */
struct stack_context
{
rt_uint32_t r0;
rt_uint32_t r1;
......@@ -37,15 +29,13 @@ struct stack_contex
rt_uint32_t psr;
};
/* Private define --------------------------------------------------------------*/
/* Private macro --------------------------------------------------------------*/
/* Private variables ------------------------------------------------------------*/
/* exception and interrupt handler table */
/* flag in interrupt handling */
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag;
/* Private function prototypes ---------------------------------------------------*/
/* Private functions ------------------------------------------------------------*/
/**
* initializes stack of thread
*/
rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
rt_uint8_t *stack_addr, void *texit)
{
......@@ -76,7 +66,10 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
extern void list_thread(void);
extern rt_thread_t rt_current_thread;
void rt_hw_hard_fault_exception(struct stack_contex* contex)
/**
* fault exception handling
*/
void rt_hw_hard_fault_exception(struct stack_context* contex)
{
rt_kprintf("psr: 0x%08x\n", contex->psr);
rt_kprintf(" pc: 0x%08x\n", contex->pc);
......@@ -94,13 +87,12 @@ void rt_hw_hard_fault_exception(struct stack_contex* contex)
while (1);
}
/**
* shutdown CPU
*/
void rt_hw_cpu_shutdown()
{
rt_kprintf("shutdown...\n");
RT_ASSERT(0);
}
/******************************************************************//**
* @}
*********************************************************************/
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册