diff options
| author | [email protected] <[email protected]> | 2011-12-31 04:08:12 +0000 |
|---|---|---|
| committer | [email protected] <[email protected]> | 2011-12-31 04:08:12 +0000 |
| commit | 3df72cc21f1f2396371e57abc1ceb1241a04e0f7 (patch) | |
| tree | 2a6bbbab817d0b83484218301dfb0c6ee99c1c5d /libcpu/arm | |
| parent | 23839bc886696aba1c912cd6d901f7d337470142 (diff) | |
update file header.
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1891 bbd45198-f89e-11dd-88c7-29a3b14d5316
Diffstat (limited to 'libcpu/arm')
| -rw-r--r-- | libcpu/arm/cortex-m3/context_gcc.S | 45 | ||||
| -rw-r--r-- | libcpu/arm/cortex-m3/cpuport.c | 56 |
2 files changed, 40 insertions, 61 deletions
diff --git a/libcpu/arm/cortex-m3/context_gcc.S b/libcpu/arm/cortex-m3/context_gcc.S index a091474904..6c981bdfb3 100644 --- a/libcpu/arm/cortex-m3/context_gcc.S +++ b/libcpu/arm/cortex-m3/context_gcc.S @@ -1,28 +1,20 @@ -/***************************************************************************//**
- * @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
-
-/***************************************************************************//**
- * @}
- ******************************************************************************/
diff --git a/libcpu/arm/cortex-m3/cpuport.c b/libcpu/arm/cortex-m3/cpuport.c index 8a48b85b78..055afda43c 100644 --- a/libcpu/arm/cortex-m3/cpuport.c +++ b/libcpu/arm/cortex-m3/cpuport.c @@ -1,31 +1,23 @@ -/******************************************************************//** - * @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); } - -/******************************************************************//** - * @} -*********************************************************************/ |
