update file header.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1891 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong@gmail.com 2011-12-31 04:08:12 +00:00
parent 23839bc886
commit 3df72cc21f
2 changed files with 40 additions and 61 deletions

View File

@ -1,28 +1,20 @@
/***************************************************************************//** /*
* @file context_gcc.S * File : context_gcc.S
* @brief Context switch functions * This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2011, RT-Thread Development Team * COPYRIGHT (C) 2009 - 2011, RT-Thread Development Team
* @author Bernard, onelife *
* @version 0.4 beta * The license and distribution terms for this file may be
******************************************************************************* * found in the file LICENSE in this distribution or at
* @section License * http://www.rt-thread.org/license/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 * Change Logs:
******************************************************************************* * Date Author Notes
* @section Change Logs * 2009-10-11 Bernard First version
* Date Author Notes * 2010-12-29 onelife Modify for EFM32
* 2009-10-11 Bernard first version * 2011-06-17 onelife Merge all of the assembly source code into context_gcc.S
* 2010-12-29 onelife Modify for EFM32 * 2011-07-12 onelife Add interrupt context check function
* 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 .cpu cortex-m3
.fpu softvfp .fpu softvfp
.syntax unified .syntax unified
@ -35,7 +27,6 @@
.equ SHPR3, 0xE000ED20 /* system priority register (3) */ .equ SHPR3, 0xE000ED20 /* system priority register (3) */
.equ PENDSV_PRI_LOWEST, 0x00FF0000 /* PendSV priority value (lowest) */ .equ PENDSV_PRI_LOWEST, 0x00FF0000 /* PendSV priority value (lowest) */
/* /*
* rt_base_t rt_hw_interrupt_disable(); * rt_base_t rt_hw_interrupt_disable();
*/ */
@ -193,7 +184,3 @@ HardFault_Handler:
rt_hw_interrupt_check: rt_hw_interrupt_check:
MRS R0, IPSR MRS R0, IPSR
BX LR BX LR
/***************************************************************************//**
* @}
******************************************************************************/

View File

@ -1,31 +1,23 @@
/******************************************************************//** /*
* @file cpuport.c * File : cpuport.c
* @brief This file is part of RT-Thread RTOS * This file is part of RT-Thread RTOS
* COPYRIGHT (C) 2011, RT-Thread Development Team * COPYRIGHT (C) 2011, RT-Thread Development Team
* @author Bernard, onelife *
* @version 0.4 beta * The license and distribution terms for this file may be
********************************************************************** * found in the file LICENSE in this distribution or at
* @section License * http://www.rt-thread.org/license/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 * Change Logs:
**********************************************************************
* @section Change Logs
* Date Author Notes * Date Author Notes
* 2009-01-05 Bernard first version * 2009-01-05 Bernard first version
* 2011-02-14 onelife Modify for EFM32 * 2011-02-14 onelife Modify for EFM32
* 2011-06-17 onelife Merge all of the C source code into cpuport.c * 2011-06-17 onelife Merge all of the C source code into cpuport.c
*********************************************************************/ */
/******************************************************************//**
* @addtogroup cortex-m3
* @{
*********************************************************************/
/* Includes -------------------------------------------------------------------*/
#include <rtthread.h> #include <rtthread.h>
/* Private typedef -------------------------------------------------------------*/ /* stack context */
struct stack_contex struct stack_context
{ {
rt_uint32_t r0; rt_uint32_t r0;
rt_uint32_t r1; rt_uint32_t r1;
@ -37,15 +29,13 @@ struct stack_contex
rt_uint32_t psr; rt_uint32_t psr;
}; };
/* Private define --------------------------------------------------------------*/ /* flag in interrupt handling */
/* Private macro --------------------------------------------------------------*/
/* Private variables ------------------------------------------------------------*/
/* exception and interrupt handler table */
rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread; rt_uint32_t rt_interrupt_from_thread, rt_interrupt_to_thread;
rt_uint32_t rt_thread_switch_interrupt_flag; 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 *rt_hw_stack_init(void *tentry, void *parameter,
rt_uint8_t *stack_addr, void *texit) 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 void list_thread(void);
extern rt_thread_t rt_current_thread; 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("psr: 0x%08x\n", contex->psr);
rt_kprintf(" pc: 0x%08x\n", contex->pc); rt_kprintf(" pc: 0x%08x\n", contex->pc);
@ -94,13 +87,12 @@ void rt_hw_hard_fault_exception(struct stack_contex* contex)
while (1); while (1);
} }
/**
* shutdown CPU
*/
void rt_hw_cpu_shutdown() void rt_hw_cpu_shutdown()
{ {
rt_kprintf("shutdown...\n"); rt_kprintf("shutdown...\n");
RT_ASSERT(0); RT_ASSERT(0);
} }
/******************************************************************//**
* @}
*********************************************************************/