Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2345VOR
rt-thread
提交
4a40ba95
R
rt-thread
项目概览
2345VOR
/
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,发现更多精彩内容 >>
未验证
提交
4a40ba95
编写于
3月 03, 2021
作者:
B
Bernard Xiong
提交者:
GitHub
3月 03, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #4407 from hyhkjiy/feature/nrf5x
[ADD]vscode support for nrf52832
上级
7628f36f
d42e66cb
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
104 addition
and
2 deletion
+104
-2
bsp/nrf5x/nrf52832/.gitignore
bsp/nrf5x/nrf52832/.gitignore
+7
-0
bsp/nrf5x/nrf52832/.vscode/launch.json
bsp/nrf5x/nrf52832/.vscode/launch.json
+15
-0
bsp/nrf5x/nrf52832/.vscode/tasks.json
bsp/nrf5x/nrf52832/.vscode/tasks.json
+54
-0
bsp/nrf5x/nrf52832/README.md
bsp/nrf5x/nrf52832/README.md
+25
-1
bsp/nrf5x/nrf52832/rtconfig.py
bsp/nrf5x/nrf52832/rtconfig.py
+3
-1
未找到文件。
bsp/nrf5x/nrf52832/.gitignore
0 → 100644
浏览文件 @
4a40ba95
# vscode common config
.vscode/*
!.vscode/launch.json
!.vscode/tasks.json
# OS X icon info
.DS_Store
\ No newline at end of file
bsp/nrf5x/nrf52832/.vscode/launch.json
0 → 100644
浏览文件 @
4a40ba95
{
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"type"
:
"cortex-debug"
,
"request"
:
"launch"
,
"servertype"
:
"jlink"
,
"cwd"
:
"${workspaceRoot}"
,
"executable"
:
"rt-thread.elf"
,
"name"
:
"Cortex Debug"
,
"device"
:
"nrf52"
,
"interface"
:
"swd"
}
]
}
\ No newline at end of file
bsp/nrf5x/nrf52832/.vscode/tasks.json
0 → 100644
浏览文件 @
4a40ba95
{
//
See
https://go.microsoft.com/fwlink/?LinkId=
733558
//
for
the
documentation
about
the
tasks.json
format
"version"
:
"2.0.0"
,
"tasks"
:
[
{
"label"
:
"config"
,
"type"
:
"shell"
,
"command"
:
"RTT_ROOT=../../.. scons --pyconfig"
,
"problemMatcher"
:
[]
},
{
"label"
:
"build"
,
"type"
:
"shell"
,
"command"
:
"scons"
,
"problemMatcher"
:
[],
"group"
:
{
"kind"
:
"build"
,
"isDefault"
:
true
}
},
{
"label"
:
"clean"
,
"type"
:
"shell"
,
"command"
:
"scons -c"
,
"problemMatcher"
:
[]
},
{
"label"
:
"flash"
,
"type"
:
"shell"
,
"command"
:
"nrfjprog -f nrf52 --program rt-thread.hex --sectorerase"
,
"group"
:
"build"
,
"problemMatcher"
:
[]
},
{
"label"
:
"flash_softdevice"
,
"type"
:
"shell"
,
"command"
:
"nrfjprog -f nrf52 --program packages/nrf5x_sdk-latest/components/softdevice/s132/hex/s132_nrf52_7.0.1_softdevice.hex --sectorerase"
,
"problemMatcher"
:
[]
},
{
"label"
:
"erase"
,
"type"
:
"shell"
,
"command"
:
"nrfjprog -f nrf52 --eraseall"
,
"problemMatcher"
:
[]
},
{
"label"
:
"reset"
,
"type"
:
"shell"
,
"command"
:
"nrfjprog -f nrf52 --reset"
,
"problemMatcher"
:
[]
}
]
}
\ No newline at end of file
bsp/nrf5x/nrf52832/README.md
浏览文件 @
4a40ba95
...
...
@@ -2,7 +2,7 @@
## 简介
该文件夹主要存放所有主芯片为nRF528
40
的板级支持包。目前默认支持的开发板是官方
[
PCA10040
](
https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52-DK
)
该文件夹主要存放所有主芯片为nRF528
32
的板级支持包。目前默认支持的开发板是官方
[
PCA10040
](
https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52-DK
)
主要内容如下:
-
开发板资源介绍
...
...
@@ -61,6 +61,30 @@ PCA10040-nrf52832开发板常用 **板载资源** 如下:
4.
输入
`scons --target=mdk4/mdk5/iar`
命令重新生成工程。
### VS Code开发支持
配置步骤:
1.
在命令行设置以下两个环境变量:
```bash
export RTT_CC=gcc
export RTT_EXEC_PATH=<工具链路径/bin>
```
2.
搜索插件
`Cortex-debug`
并安装。
3.
安装
[
nRF Command Line Tools
](
https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Command-Line-Tools
)
以支持
`nrfjprog`
命令。
4.
在.vscode/settings.json内配置工具链和
`JlinkGDBServer`
,sample:
```json
{
"cortex-debug.armToolchainPath": "/usr/local/gcc-arm-none-eabi-9-2019-q4-major/bin/",
"cortex-debug.armToolchainPrefix": "arm-none-eabi",
"cortex-debug.JLinkGDBServerPath": "/Applications/SEGGER/JLink/JLinkGDBServer"
}
```
5.
点击
`终端`
->
`运行任务`
->
`build`
编译,点击
`终端`
->
`运行任务`
->
`flash`
烧录,点击左侧
`debug`
->
`run`
使用VS Code进行debug。
## 支持其他开发板
...
...
bsp/nrf5x/nrf52832/rtconfig.py
浏览文件 @
4a40ba95
...
...
@@ -54,7 +54,9 @@ if PLATFORM == 'gcc':
else
:
CFLAGS
+=
' -O2'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rtthread.bin
\n
'
+
SIZE
+
' $TARGET
\n
'
POST_ACTION
=
OBJCPY
+
' -O binary $TARGET rt-thread.bin
\n
'
POST_ACTION
+=
OBJCPY
+
' -O ihex $TARGET rt-thread.hex
\n
'
POST_ACTION
+=
SIZE
+
' $TARGET
\n
'
elif
PLATFORM
==
'armcc'
:
# toolchains
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录