Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools] 增加vscode pyocd下载命令 scons --target=vsc --pack=xxx #8036

Merged
merged 2 commits into from
Oct 22, 2023

Conversation

liYony
Copy link
Contributor

@liYony liYony commented Sep 14, 2023

拉取/合并请求描述:(PR description)

[

目的

为rt-thread的VsCode开发环境搭建编译、下载、调试环境!

使用流程如下:

执行scons --target=vsc --pack=xxx命令

--pack=xxx 用于指定cmsisPack包的路径,或者可以使用默认路径<--pack=env>(前提是在env安装路径下需要创建一个/tools/cmsisPacks/文件夹用来存放你的cmsisPack包)

image

  1. 生成launch.json和tasks.json文件:

image

image

主要核心也就是生成launch.jsontasks.json两个文件,利用python的pyocd库进行下载调试功能。
]

当前拉取/合并请求的状态 Intent for your PR

必须选择一项 Choose one (Mandatory):

  • 本拉取/合并请求是一个草稿版本 This PR is for a code-review and is intended to get feedback
  • 本拉取/合并请求是一个成熟版本 This PR is mature, and ready to be integrated into the repo

代码质量 Code Quality:

我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:

  • 已经仔细查看过代码改动的对比 Already check the difference between PR and old code
  • 代码风格正确,包括缩进空格,命名及其他风格 Style guide is adhered to, including spacing, naming and other styles
  • 没有垃圾代码,代码尽量精简,不包含#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up
  • 所有变更均有原因及合理的,并且不会影响到其他软件组件代码或BSP All modifications are justified and not affect other components or BSP
  • 对难懂代码均提供对应的注释 I've commented appropriately where code is tricky
  • 代码是高质量的 Code in this PR is of high quality
  • 已经使用formatting 等源码格式化工具确保格式符合RT-Thread代码规范 This PR complies with RT-Thread code specification

tools/vsc.py Outdated
vsc_space_file.close()
vsc_space_file.close()

res_pyocdconf = pyocdconf.get_cmsisPack_targetId()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果是ARM Cortex-A会怎么样?aarch64,又或者是riscv64会怎么样?又过测试吗?

tools/vsc.py Outdated
config_obj['type'] = 'cortex-debug'
config_obj['runToEntryPoint'] = 'Reset_Handler'
config_obj['servertype'] = 'pyocd'
config_obj['toolchainPrefix'] = 'arm-none-eabi'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

riscv64会怎么样?

@liYony
Copy link
Contributor Author

liYony commented Sep 14, 2023 via email

@BernardXiong BernardXiong added the proposal proposal for future version label Sep 14, 2023
@zhkag zhkag added the -1 No vote label Sep 15, 2023
@zhkag
Copy link
Member

zhkag commented Sep 15, 2023

待讨论和修改,目前仅提出并收集改进思路

@mysterywolf mysterywolf added in progress PR/issue in progress. and removed -1 No vote labels Sep 15, 2023
@mysterywolf mysterywolf marked this pull request as draft September 15, 2023 02:03
@BernardXiong
Copy link
Member

#8046 创建了一个vscode相关的讨论,欢迎一起来沟通。

@mysterywolf mysterywolf marked this pull request as ready for review October 22, 2023 14:53
@mysterywolf mysterywolf reopened this Oct 22, 2023
@mysterywolf
Copy link
Member

mysterywolf commented Oct 22, 2023

先合并 开源之夏结题需要,后续VSCode需求可以继续跟进补充

@mysterywolf mysterywolf changed the title [tools] VsCode 环境搭建(编译、下载、调试) [tools] 增加vscode pyocd下载命令 scons --target=vsc --pack=xxx Oct 22, 2023
@mysterywolf mysterywolf merged commit 9afd384 into RT-Thread:master Oct 22, 2023
@liYony liYony deleted the vscode branch April 11, 2024 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in progress PR/issue in progress. proposal proposal for future version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants