Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
天中雨水
rt-thread
提交
bae4de3b
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,发现更多精彩内容 >>
提交
bae4de3b
编写于
11月 05, 2021
作者:
G
greedyhao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ble support
上级
9e7d7ae5
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
119 addition
and
9 deletion
+119
-9
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
+74
-0
bsp/bluetrum/ab32vg1-ab-prougen/board/Kconfig
bsp/bluetrum/ab32vg1-ab-prougen/board/Kconfig
+17
-2
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
+5
-0
bsp/bluetrum/ab32vg1-ab-prougen/link.lds
bsp/bluetrum/ab32vg1-ab-prougen/link.lds
+16
-5
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
+2
-2
bsp/bluetrum/libraries/hal_libraries/bmsis/source/startup.S
bsp/bluetrum/libraries/hal_libraries/bmsis/source/startup.S
+5
-0
未找到文件。
bsp/bluetrum/ab32vg1-ab-prougen/applications/blehr_app.c
0 → 100644
浏览文件 @
bae4de3b
/*
* Copyright (c) 2006-2021, Bluetrum Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2021-10-15 greedyhao the first version
*/
#include <rtthread.h>
#include <stdint.h>
#include <stddef.h>
#ifdef BSP_USING_NIMBLE
void
nimble_port_run
(
void
);
void
nimble_port_init
(
void
);
int
ble_hci_rtthread_init
(
void
);
void
ble_svc_gap_init
(
void
);
void
ble_store_ram_init
(
void
);
int
blehr_main
(
void
);
void
bb_init
(
void
);
void
bthw_get_heap_info
(
void
**
p_heap
,
uint16_t
**
p_heap_size
,
uint32_t
*
p_block_size
);
typedef
void
(
*
nsmem_cb_init_func
)(
void
*
heap_buf
,
void
*
heap_size_buf
,
uint32_t
mem_block_max
);
#define nsmem_cb_init ((nsmem_cb_init_func)0x84140)
int
btctrl_mem_init
(
void
)
{
void
*
heap_buf
;
uint16_t
*
heap_size_buf
;
uint32_t
block_size
;
bthw_get_heap_info
(
&
heap_buf
,
&
heap_size_buf
,
&
block_size
);
// rt_kprintf("heap_buf=0x%p heap_size_buf=0x%p block_size=0x%p\n", heap_buf, heap_size_buf, block_size);
nsmem_cb_init
(
heap_buf
,
heap_size_buf
,
block_size
);
return
0
;
}
INIT_BOARD_EXPORT
(
btctrl_mem_init
);
static
void
blehr_thread_entry
(
void
*
param
)
{
bb_init
();
nimble_port_init
();
ble_hci_rtthread_init
();
ble_svc_gap_init
();
/* XXX Need to have template for store */
ble_store_ram_init
();
blehr_main
();
nimble_port_run
();
}
static
int
blehr_sample
(
void
)
{
rt_thread_t
tid
=
rt_thread_create
(
"blehr"
,
blehr_thread_entry
,
RT_NULL
,
1024
,
15
,
1
);
if
(
tid
!=
RT_NULL
)
{
rt_thread_startup
(
tid
);
}
}
MSH_CMD_EXPORT
(
blehr_sample
,
blehr_sample
);
#endif
bsp/bluetrum/ab32vg1-ab-prougen/board/Kconfig
浏览文件 @
bae4de3b
...
@@ -5,6 +5,10 @@ config SOC_AB32VG1
...
@@ -5,6 +5,10 @@ config SOC_AB32VG1
select PKG_USING_BLUETRUM_SDK
select PKG_USING_BLUETRUM_SDK
default y
default y
config PKG_USING_BLUETRUM_NIMBLE
bool
default n
menu "Onboard Peripheral Drivers"
menu "Onboard Peripheral Drivers"
menuconfig BSP_USING_AUDIO
menuconfig BSP_USING_AUDIO
...
@@ -231,7 +235,18 @@ menu "On-chip Peripheral Drivers"
...
@@ -231,7 +235,18 @@ menu "On-chip Peripheral Drivers"
endmenu
endmenu
menu "Board extended module Drivers"
choice
endmenu
prompt "BLE STACK"
default BLE_STACK_USING_NULL
help
Select the ble stack
config BLE_STACK_USING_NULL
bool "not use the ble stack"
config BSP_USING_NIMBLE
bool "use nimble stack(iot)"
select PKG_USING_BLUETRUM_NIMBLE
endchoice
endmenu
endmenu
bsp/bluetrum/ab32vg1-ab-prougen/board/board.c
浏览文件 @
bae4de3b
...
@@ -145,6 +145,11 @@ void rt_hw_board_init(void)
...
@@ -145,6 +145,11 @@ void rt_hw_board_init(void)
#endif
#endif
}
}
void
rt_hw_us_delay
(
rt_uint32_t
us
)
{
}
RT_SECTION
(
".irq.cache"
)
RT_SECTION
(
".irq.cache"
)
void
cache_init
(
void
)
void
cache_init
(
void
)
{
{
...
...
bsp/bluetrum/ab32vg1-ab-prougen/link.lds
浏览文件 @
bae4de3b
/* Define the flash max size */
/* Define the flash max size */
__max_flash_size = 102
4
k;
__max_flash_size = 102
0
k;
__data_ram_size =
8
k;
__data_ram_size =
16
k;
__stack_ram_size = 4k;
__stack_ram_size = 4k;
__comm_ram_size = 42k;
__comm_ram_size = 42k;
__heap_ram_size = 70k;
__heap_ram_size = 52k;
__ble_ram_size = 10k;
__base = 0x10000000;
__base = 0x10000000;
__data_vma = 0x11000;
__bram_vma = 0x11000;
__heap_vma = __bram_vma + __ble_ram_size;
__data_vma = __heap_vma + __heap_ram_size;
__stack_vma = __data_vma + __data_ram_size;
__stack_vma = __data_vma + __data_ram_size;
__comm_vma = __stack_vma + __stack_ram_size;
__comm_vma = __stack_vma + __stack_ram_size;
__heap_vma = __comm_vma + __comm_ram_size;
__ram1_vma = 0x50000;
__ram1_vma = 0x50000;
...
@@ -21,6 +23,7 @@ MEMORY
...
@@ -21,6 +23,7 @@ MEMORY
flash(rx) : org = __base + 512, len = __max_flash_size
flash(rx) : org = __base + 512, len = __max_flash_size
comm(rx) : org = __comm_vma, len = __comm_ram_size
comm(rx) : org = __comm_vma, len = __comm_ram_size
bram : org = __bram_vma, len = __ble_ram_size
data : org = __data_vma, len = __data_ram_size
data : org = __data_vma, len = __data_ram_size
stack : org = __stack_vma, len = __stack_ram_size
stack : org = __stack_vma, len = __stack_ram_size
heap : org = __heap_vma, len = __heap_ram_size
heap : org = __heap_vma, len = __heap_ram_size
...
@@ -89,8 +92,16 @@ SECTIONS
...
@@ -89,8 +92,16 @@ SECTIONS
*(.data*)
*(.data*)
*(.sdata*)
*(.sdata*)
*(.com_text*)
*(.com_text*)
*(.text.ble_mqueue_get)
*(.text.ble_mqueue_put)
*(.text.os_memblock_get)
} > comm AT > flash
} > comm AT > flash
.bram __bram_vma (NOLOAD) : {
*(.btmem.bthw)
*(.btmem*)
} > bram
.bss (NOLOAD):
.bss (NOLOAD):
{
{
__bss_start = .;
__bss_start = .;
...
...
bsp/bluetrum/libraries/hal_libraries/ab32vg1_hal/SConscript
浏览文件 @
bae4de3b
...
@@ -48,8 +48,8 @@ ASFLAGS = ""
...
@@ -48,8 +48,8 @@ ASFLAGS = ""
CPPDEFINES
=
[]
CPPDEFINES
=
[]
LOCAL_CPPDEFINES
=
[]
LOCAL_CPPDEFINES
=
[]
LIBS
=
[
'hal'
]
LIBS
=
[]
LIBPATH
=
[
CWD
]
LIBPATH
=
[]
LINKFLAGS
=
""
LINKFLAGS
=
""
...
...
bsp/bluetrum/libraries/hal_libraries/bmsis/source/startup.S
浏览文件 @
bae4de3b
...
@@ -96,6 +96,11 @@ __exception:
...
@@ -96,6 +96,11 @@ __exception:
mret
mret
#endif
#endif
.
org
0x1e0
1:
j
1
b
nop
mret
.
global
cpu_irq_comm
.
global
cpu_irq_comm
cpu_irq_comm
:
cpu_irq_comm
:
la
a5
,
__irq_stack
la
a5
,
__irq_stack
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录