Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
lfmiao0
rt-thread
提交
3dd72f95
R
rt-thread
项目概览
lfmiao0
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
3dd72f95
编写于
3月 20, 2019
作者:
lymzzyh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[libcpu][k210]add description of exception
上级
c9d88a8e
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
44 addition
and
5 deletion
+44
-5
libcpu/risc-v/k210/interrupt.c
libcpu/risc-v/k210/interrupt.c
+44
-5
未找到文件。
libcpu/risc-v/k210/interrupt.c
浏览文件 @
3dd72f95
...
...
@@ -230,10 +230,6 @@ uintptr_t handle_irq_m_ext(uintptr_t cause, uintptr_t epc)
/* Restore primitive IRQ threshold */
plic
->
targets
.
target
[
core_id
].
priority_threshold
=
int_threshold
;
}
else
{
rt_kprintf
(
"unhandled trap!
\n
"
);
}
return
epc
;
}
...
...
@@ -270,8 +266,51 @@ uintptr_t handle_trap(uintptr_t mcause, uintptr_t epc)
rt_hw_interrupt_disable
();
tid
=
rt_thread_self
();
rt_kprintf
(
"
\n
Exception:
\n
"
);
switch
(
cause
)
{
case
CAUSE_MISALIGNED_FETCH
:
rt_kprintf
(
"Instruction address misaligned"
);
break
;
case
CAUSE_FAULT_FETCH
:
rt_kprintf
(
"Instruction access fault"
);
break
;
case
CAUSE_ILLEGAL_INSTRUCTION
:
rt_kprintf
(
"Illegal instruction"
);
break
;
case
CAUSE_BREAKPOINT
:
rt_kprintf
(
"Breakpoint"
);
break
;
case
CAUSE_MISALIGNED_LOAD
:
rt_kprintf
(
"Load address misaligned"
);
break
;
case
CAUSE_FAULT_LOAD
:
rt_kprintf
(
"Load access fault"
);
break
;
case
CAUSE_MISALIGNED_STORE
:
rt_kprintf
(
"Store address misaligned"
);
break
;
case
CAUSE_FAULT_STORE
:
rt_kprintf
(
"Store access fault"
);
break
;
case
CAUSE_USER_ECALL
:
rt_kprintf
(
"Environment call from U-mode"
);
break
;
case
CAUSE_SUPERVISOR_ECALL
:
rt_kprintf
(
"Environment call from S-mode"
);
break
;
case
CAUSE_HYPERVISOR_ECALL
:
rt_kprintf
(
"Environment call from H-mode"
);
break
;
case
CAUSE_MACHINE_ECALL
:
rt_kprintf
(
"Environment call from M-mode"
);
break
;
default:
rt_kprintf
(
"Uknown exception : %08lX"
,
cause
);
break
;
}
rt_kprintf
(
"
\n
"
);
rt_kprintf
(
"
unhandled trap, epc => 0x%08x, INT[%d]
\n
"
,
epc
,
rt_interrupt_get_nest
()
);
rt_kprintf
(
"
exception pc => 0x%08x
\n
"
,
epc
);
rt_kprintf
(
"current thread: %.*s
\n
"
,
RT_NAME_MAX
,
tid
->
name
);
#ifdef RT_USING_FINSH
list_thread
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录