Toggle navigation
首页
问答
文章
积分商城
专家
专区
更多专区...
文档中心
返回主站
搜索
提问
会员
中心
登录
注册
linux下使用vscode进行rtt的开发教程[支持断点,补全]
发布于 2019-11-20 21:46:27 浏览:2607
订阅该版
* 本帖最后由 921742079 于 2019-11-20 21:48 编辑 * 先上图  下载toolchain ```https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads``` 安装openocd,用于调试 ```sudo apt install gdb-multiarch openocd -y``` 我是jlink,编写jlink_board.cfg ```source [find interface/jlink.cfg] transport select swd source [find target/stm32f1x.cfg] ``` vscode,安装插件 ```C/C++ Cortex-Debug C++ Intellisense``` 复制下面两个文件到项目目录 launch.json, runToMain 如果为false,可以一步步调试rtt的启动流程,为true的话,直接到applications里面的main函数 ```{ // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "name": "openocd_debug", "cwd": "${workspaceRoot}", "executable": "${workspaceRoot}/rt-thread.elf", "request": "launch", "type": "cortex-debug", "servertype": "openocd", "device": "stm32f411ce", "gdbpath": "/usr/bin/gdb-multiarch", "configFiles":[ "/home/xxx/dev/embedded/stm32/openocd/stm32f4x/jlink_board.cfg" ], // "preLaunchTask": "build", "runToMain": true } ] }``` tasks.json ```{ // See https://go.microsoft.com/fwlink/?LinkId=733558 // for the documentation about the tasks.json format "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "command": "scons -c; scons" }, { "label": "serial", "type": "shell", "command": "picocom -b 115200 -s 'sb -vv' -v 'rb -vv' /dev/ttyUSB0" }, { "label": "burn", "type": "shell", // 请注意修改这里具体的板子配置文件 "command": "openocd -f ~/dev/embedded/stm32/openocd/stm32f4x/jlink_board.cfg -c init -c 'reset halt' -c 'flash write_image erase rtthread.bin 0x08000000' -c 'verify_image rtthread.bin 0x08000000' -c 'reset run' -c shutdown" }, { "label": "erase", "type": "shell", // 请注意修改这里具体的板子配置文件 // 如果无法erase,请按住板子的reset键,再erase "command": "openocd -f ~/dev/embedded/stm32/openocd/stm32f4x/jlink_board.cfg -c init -c 'reset halt' -c 'flash info 0' -c 'flash erase_sector 0 0 last' -c 'flash erase_check 0' -c shutdown" } ] }```按F5, 即可调试 代码补全按F1, edit configurations, 设置includePath 基本上补全,断点,都有了
查看更多
2
个回答
默认排序
按发布时间排序
cccc
2020-07-11
这家伙很懒,什么也没写!
支持 mark
撰写答案
登录
注册新账号
关注者
0
被浏览
2.6k
关于作者
921742079
这家伙很懒,什么也没写!
提问
42
回答
145
被采纳
3
关注TA
发私信
相关问题
推荐文章
1
RT-Thread应用项目汇总
2
玩转RT-Thread系列教程
3
国产MCU移植系列教程汇总,欢迎查看!
4
机器人操作系统 (ROS2) 和 RT-Thread 通信
5
五分钟玩转RT-Thread新社区
6
【技术三千问】之《玩转ART-Pi》,看这篇就够了!干货汇总
7
关于STM32H7开发板上使用SDIO接口驱动SD卡挂载文件系统的问题总结
8
STM32的“GPU”——DMA2D实例详解
9
RT-Thread隐藏的宝藏之completion
10
【ART-PI】RT-Thread 开启RTC 与 Alarm组件
最新文章
1
【CFP】2025 RT-Thread全球技术大会演讲征集开始啦!
2
在 RT-Thread Studio 环境中为 ART-Pi 2 移植 CherryUSB(以 usb_device 为例)
3
嵌入式ARM RISCV toolchain工具 梳理arm-none-eabi-gcc
4
使用官方BOOT升级,看这一篇就够了?(以STM32F407VGT6为例)
5
可以使用MQTT连接AI大模型吗
热门标签
RT-Thread Studio
串口
Env
LWIP
SPI
AT
Bootloader
Hardfault
CAN总线
FinSH
ART-Pi
DMA
USB
文件系统
RT-Thread
SCons
RT-Thread Nano
线程
MQTT
STM32
RTC
rt-smart
FAL
I2C_IIC
cubemx
ESP8266
WIZnet_W5500
UART
ota在线升级
BSP
PWM
flash
packages_软件包
freemodbus
潘多拉开发板_Pandora
ADC
GD32
定时器
flashDB
编译报错
socket
keil_MDK
中断
rt_mq_消息队列_msg_queue
Debug
SFUD
msh
ulog
C++_cpp
at_device
本月问答贡献
聚散无由
9
个答案
6
次被采纳
RTT_逍遥
7
个答案
2
次被采纳
a1012112796
5
个答案
2
次被采纳
加缪
2
个答案
2
次被采纳
踩姑娘的小蘑菇
8
个答案
1
次被采纳
本月文章贡献
wake_mirco
2
篇文章
7
次点赞
mushroom
1
篇文章
9
次点赞
张世争
1
篇文章
7
次点赞
RTT_逍遥
1
篇文章
5
次点赞
Jack_____
1
篇文章
5
次点赞
回到
顶部
发布
问题
分享
好友
手机
浏览
扫码手机浏览
投诉
建议
回到
底部