Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
yunke120
rt-thread
提交
e1e563e8
R
rt-thread
项目概览
yunke120
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e1e563e8
编写于
10月 20, 2013
作者:
G
Grissiom
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cortex-r4: remove RM48x50.h and add armv7.h
上级
d3648dbc
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
66 addition
and
17 deletion
+66
-17
libcpu/arm/cortex-r4/armv7.h
libcpu/arm/cortex-r4/armv7.h
+47
-0
libcpu/arm/cortex-r4/interrupt.c
libcpu/arm/cortex-r4/interrupt.c
+5
-1
libcpu/arm/cortex-r4/stack.c
libcpu/arm/cortex-r4/stack.c
+2
-2
libcpu/arm/cortex-r4/trap.c
libcpu/arm/cortex-r4/trap.c
+12
-14
未找到文件。
libcpu/arm/cortex-r4/
RM48x50
.h
→
libcpu/arm/cortex-r4/
armv7
.h
浏览文件 @
e1e563e8
#ifndef
RM48X50_H
#define
RM48X50_H
#ifndef
__ARMV7_H__
#define
__ARMV7_H__
#include <system.h>
#include <sys_vim.h>
#ifndef VFP_DATA_NR
#define VFP_DATA_NR 32
#endif
#define USERMODE 0x10
#define FIQMODE 0x11
#define IRQMODE 0x12
#define SVCMODE 0x13
#define ABORTMODE 0x17
#define UNDEFMODE 0x1b
#define MODEMASK 0x1f
#define NOINT 0xc0
struct
rt_hw_register
/* the stack without VFP registers */
struct
rt_hw_base_stack
{
unsigned
long
cpsr
;
unsigned
long
r0
;
unsigned
long
r1
;
unsigned
long
r2
;
...
...
@@ -28,12 +22,26 @@ struct rt_hw_register
unsigned
long
r10
;
unsigned
long
fp
;
unsigned
long
ip
;
unsigned
long
sp
;
unsigned
long
lr
;
unsigned
long
pc
;
unsigned
long
cpsr
;
unsigned
long
ORIG_r0
;
};
#endif
/* end of include guard: RM48X50_H */
#define USERMODE 0x10
#define FIQMODE 0x11
#define IRQMODE 0x12
#define SVCMODE 0x13
#define MONITORMODE 0x16
#define ABORTMODE 0x17
#define HYPMODE 0x1b
#define UNDEFMODE 0x1b
#define MODEMASK 0x1f
#define NOINT 0xc0
#define T_Bit (1<<5)
#define F_Bit (1<<6)
#define I_Bit (1<<7)
#define A_Bit (1<<8)
#define E_Bit (1<<9)
#define J_Bit (1<<24)
#endif
libcpu/arm/cortex-r4/interrupt.c
浏览文件 @
e1e563e8
...
...
@@ -15,7 +15,11 @@
#include <rtthread.h>
#include <rthw.h>
#include "RM48x50.h"
#include <sys_vim.h>
#include <system.h>
#include "armv7.h"
#define MAX_HANDLERS 96
...
...
libcpu/arm/cortex-r4/stack.c
浏览文件 @
e1e563e8
...
...
@@ -13,7 +13,8 @@
* 2013-05-24 Grissiom port to RM48x50
*/
#include <rtthread.h>
#include "RM48x50.h"
#include "armv7.h"
/**
* @addtogroup RM48x50
*/
...
...
@@ -60,7 +61,6 @@ rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
#if defined(__TI_VFP_SUPPORT__) || (defined (__VFP_FP__) && !defined(__SOFTFP__))
#ifndef RT_VFP_LAZY_STACKING
{
#define VFP_DATA_NR 32
int
i
;
for
(
i
=
0
;
i
<
VFP_DATA_NR
;
i
++
)
...
...
libcpu/arm/cortex-r4/trap.c
浏览文件 @
e1e563e8
...
...
@@ -15,8 +15,10 @@
#include <rtthread.h>
#include <rthw.h>
#include "RM48x50.h"
//#define BSP_INT_DEBUG
#include <sys_vim.h>
#include "armv7.h"
/**
* @addtogroup RM48x50
...
...
@@ -28,26 +30,26 @@
*
* @param regs the registers point
*/
void
rt_hw_show_register
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_show_register
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"Execption:
\n
"
);
rt_kprintf
(
"r00:0x%08x r01:0x%08x r02:0x%08x r03:0x%08x
\n
"
,
regs
->
r0
,
regs
->
r1
,
regs
->
r2
,
regs
->
r3
);
rt_kprintf
(
"r04:0x%08x r05:0x%08x r06:0x%08x r07:0x%08x
\n
"
,
regs
->
r4
,
regs
->
r5
,
regs
->
r6
,
regs
->
r7
);
rt_kprintf
(
"r08:0x%08x r09:0x%08x r10:0x%08x
\n
"
,
regs
->
r8
,
regs
->
r9
,
regs
->
r10
);
rt_kprintf
(
"fp :0x%08x ip :0x%08x
\n
"
,
regs
->
fp
,
regs
->
ip
);
rt_kprintf
(
"sp :0x%08x lr :0x%08x pc :0x%08x
\n
"
,
regs
->
sp
,
regs
->
lr
,
regs
->
pc
);
rt_kprintf
(
"sp :0x%08x lr :0x%08x pc :0x%08x
\n
"
,
regs
+
1
,
regs
->
lr
,
regs
->
pc
);
rt_kprintf
(
"cpsr:0x%08x
\n
"
,
regs
->
cpsr
);
}
/**
* When
ARM7TDMI
comes across an instruction which it cannot handle,
* When comes across an instruction which it cannot handle,
* it takes the undefined instruction trap.
*
* @param regs system registers
*
* @note never invoke this function in application
*/
void
rt_hw_trap_udef
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_trap_udef
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"undefined instruction
\n
"
);
rt_hw_show_register
(
regs
);
...
...
@@ -65,7 +67,7 @@ void rt_hw_trap_udef(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void
rt_hw_trap_swi
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_trap_swi
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"software interrupt
\n
"
);
rt_hw_show_register
(
regs
);
...
...
@@ -82,7 +84,7 @@ void rt_hw_trap_swi(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void
rt_hw_trap_pabt
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_trap_pabt
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"prefetch abort
\n
"
);
rt_hw_show_register
(
regs
);
...
...
@@ -99,7 +101,7 @@ void rt_hw_trap_pabt(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void
rt_hw_trap_dabt
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_trap_dabt
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"Data Abort "
);
rt_hw_show_register
(
regs
);
...
...
@@ -115,7 +117,7 @@ void rt_hw_trap_dabt(struct rt_hw_register *regs)
*
* @note never invoke this function in application
*/
void
rt_hw_trap_resv
(
struct
rt_hw_
register
*
regs
)
void
rt_hw_trap_resv
(
struct
rt_hw_
base_stack
*
regs
)
{
rt_kprintf
(
"not used
\n
"
);
rt_hw_show_register
(
regs
);
...
...
@@ -124,10 +126,6 @@ void rt_hw_trap_resv(struct rt_hw_register *regs)
rt_hw_cpu_shutdown
();
}
/*
*#pragma CODE_STATE(rt_hw_trap_irq, 32)
*#pragma INTERRUPT(rt_hw_trap_irq, IRQ)
*/
extern
rt_isr_handler_t
isr_table
[];
void
rt_hw_trap_irq
(
void
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录