Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天中雨水
rt-thread
提交
6db31e30
R
rt-thread
项目概览
天中雨水
/
rt-thread
该项目与 Fork 源项目分叉
Fork自
RT-Thread / rt-thread
通知
2
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,发现更多精彩内容 >>
未验证
提交
6db31e30
编写于
12月 23, 2018
作者:
B
Bernard Xiong
提交者:
GitHub
12月 23, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2098 from RT-Thread/bsp_k210
[bsp][k210] Add get_free_heap_size function.
上级
2defcb75
597d71cc
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
71 addition
and
4 deletion
+71
-4
bsp/k210/.config
bsp/k210/.config
+35
-1
bsp/k210/README.md
bsp/k210/README.md
+4
-0
bsp/k210/driver/SConscript
bsp/k210/driver/SConscript
+1
-0
bsp/k210/driver/heap.c
bsp/k210/driver/heap.c
+11
-0
bsp/k210/rtconfig.h
bsp/k210/rtconfig.h
+1
-1
bsp/k210/rtconfig.py
bsp/k210/rtconfig.py
+1
-1
libcpu/risc-v/k210/interrupt.c
libcpu/risc-v/k210/interrupt.c
+13
-1
libcpu/risc-v/k210/startup_gcc.S
libcpu/risc-v/k210/startup_gcc.S
+5
-0
未找到文件。
bsp/k210/.config
浏览文件 @
6db31e30
...
...
@@ -93,7 +93,7 @@ CONFIG_FINSH_USING_SYMTAB=y
CONFIG_FINSH_USING_DESCRIPTION
=
y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
CONFIG_FINSH_THREAD_PRIORITY
=
20
CONFIG_FINSH_THREAD_STACK_SIZE
=
4096
CONFIG_FINSH_THREAD_STACK_SIZE
=
16384
CONFIG_FINSH_CMD_SIZE
=
80
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_USING_MSH
=
y
...
...
@@ -325,6 +325,40 @@ CONFIG_PKG_KENDRYTE_SDK_VER="v0.5.2"
# CONFIG_PKG_USING_ZLIB is not set
# CONFIG_PKG_USING_DSTR is not set
# CONFIG_PKG_USING_TINYFRAME is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO_V001 is not set
# CONFIG_PKG_USING_KENDRYTE_DEMO_LATEST_VERSION is not set
# CONFIG_KENDRYTE_DEMO_NONE is not set
# CONFIG_KENDRYTE_DEMO_AES_128_TEST is not set
# CONFIG_KENDRYTE_DEMO_AES_192_TEST is not set
# CONFIG_KENDRYTE_DEMO_AES_256_TEST is not set
# CONFIG_KENDRYTE_DEMO_AI_DEMO_SIM is not set
# CONFIG_KENDRYTE_DEMO_DVP_OV is not set
# CONFIG_KENDRYTE_DEMO_FACE_DETECT is not set
# CONFIG_KENDRYTE_DEMO_FFT_TEST is not set
# CONFIG_KENDRYTE_DEMO_FLASH_W25QXX is not set
# CONFIG_KENDRYTE_DEMO_FLASH_W25QXX_DMA_TEST is not set
# CONFIG_KENDRYTE_DEMO_FLASH_W25QXX_TEST is not set
# CONFIG_KENDRYTE_DEMO_GPIOHS_LED is not set
# CONFIG_KENDRYTE_DEMO_GPIO_LED is not set
# CONFIG_KENDRYTE_DEMO_HELLO_WORLD is not set
# CONFIG_KENDRYTE_DEMO_I2C_SLAVE is not set
# CONFIG_KENDRYTE_DEMO_KPU is not set
# CONFIG_KENDRYTE_DEMO_LCD is not set
# CONFIG_KENDRYTE_DEMO_MIC_PLAY is not set
# CONFIG_KENDRYTE_DEMO_PLAY_PCM is not set
# CONFIG_KENDRYTE_DEMO_PWM is not set
# CONFIG_KENDRYTE_DEMO_RTC is not set
# CONFIG_KENDRYTE_DEMO_RTC_SD3068 is not set
# CONFIG_KENDRYTE_DEMO_SD_CARD is not set
# CONFIG_KENDRYTE_DEMO_SERVO is not set
# CONFIG_KENDRYTE_DEMO_SHA256_TEST is not set
# CONFIG_KENDRYTE_DEMO_TIMER is not set
# CONFIG_KENDRYTE_DEMO_UART is not set
# CONFIG_KENDRYTE_DEMO_UART_DMA is not set
# CONFIG_KENDRYTE_DEMO_UART_DMA_IRQ is not set
# CONFIG_KENDRYTE_DEMO_UART_INTERRUPT is not set
# CONFIG_KENDRYTE_DEMO_WATCHDOG is not set
#
# samples: kernel and components samples
...
...
bsp/k210/README.md
浏览文件 @
6db31e30
...
...
@@ -64,6 +64,10 @@ Kendryte中文含义为勘智,而勘智取自勘物探智。这颗芯片主要
![
terminal
](
images/k210.png
)
如果是K210-test_v0.2开发板,可以用如下命令来打开串口:
python -m serial.tools.miniterm --rts 0 --dtr 0 COM9 115200
## 4. 驱动支持情况及计划
| 驱动 | 支持情况 | 备注 |
...
...
bsp/k210/driver/SConscript
浏览文件 @
6db31e30
...
...
@@ -5,6 +5,7 @@ from building import *
cwd
=
GetCurrentDir
()
src
=
Split
(
'''
board.c
heap.c
drv_uart.c
'''
)
CPPPATH
=
[
cwd
]
...
...
bsp/k210/driver/heap.c
0 → 100644
浏览文件 @
6db31e30
#include <rtthread.h>
#include <stdlib.h>
size_t
get_free_heap_size
(
void
)
{
rt_uint32_t
total
,
used
,
max
;
rt_memory_info
(
&
total
,
&
used
,
&
max
);
return
total
-
used
;
}
bsp/k210/rtconfig.h
浏览文件 @
6db31e30
...
...
@@ -64,7 +64,7 @@
#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_PRIORITY 20
#define FINSH_THREAD_STACK_SIZE
4096
#define FINSH_THREAD_STACK_SIZE
16384
#define FINSH_CMD_SIZE 80
#define FINSH_USING_MSH
#define FINSH_USING_MSH_DEFAULT
...
...
bsp/k210/rtconfig.py
浏览文件 @
6db31e30
...
...
@@ -50,7 +50,7 @@ if PLATFORM == 'gcc':
CFLAGS
+=
' -O0 -ggdb'
AFLAGS
+=
' -ggdb'
else
:
CFLAGS
+=
' -O2'
CFLAGS
+=
' -O2
-Os
'
CXXFLAGS
=
CFLAGS
...
...
libcpu/risc-v/k210/interrupt.c
浏览文件 @
6db31e30
...
...
@@ -114,6 +114,13 @@ rt_isr_handler_t rt_hw_interrupt_install(int vector, rt_isr_handler_t handler,
return
old_handler
;
}
RT_WEAK
void
plic_irq_handle
(
plic_irq_t
irq
)
{
rt_kprintf
(
"UN-handled interrupt %d occurred!!!
\n
"
,
irq
);
return
;
}
uintptr_t
handle_irq_m_ext
(
uintptr_t
cause
,
uintptr_t
epc
)
{
/*
...
...
@@ -142,7 +149,12 @@ uintptr_t handle_irq_m_ext(uintptr_t cause, uintptr_t epc)
/* Disable software interrupt and timer interrupt */
clear_csr
(
mie
,
MIP_MTIP
|
MIP_MSIP
);
if
(
irq_desc
[
core_id
][
int_num
].
handler
)
if
(
irq_desc
[
core_id
][
int_num
].
handler
==
(
rt_isr_handler_t
)
rt_hw_interrupt_handle
)
{
/* default handler, route to kendryte bsp plic driver */
plic_irq_handle
(
int_num
);
}
else
if
(
irq_desc
[
core_id
][
int_num
].
handler
)
{
irq_desc
[
core_id
][
int_num
].
handler
(
int_num
,
irq_desc
[
core_id
][
int_num
].
param
);
}
...
...
libcpu/risc-v/k210/startup_gcc.S
浏览文件 @
6db31e30
...
...
@@ -16,6 +16,11 @@
_start
:
j
1
f
.
word
0xdeadbeef
.
align
3
.
global
g_wake_up
g_wake_up
:
.
dword
1
.
dword
0
1
:
csrw
mideleg
,
0
csrw
medeleg
,
0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录