首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >通过Platform.io上传到Teensy 3.6 (J-LINK)

通过Platform.io上传到Teensy 3.6 (J-LINK)
EN

Stack Overflow用户
提问于 2017-08-10 19:29:13
回答 1查看 911关注 0票数 1

我正在使用优秀的http://platformio.org/和Visual Studio Code为Teensy3.6( Arduino兼容板)进行开发。

这很好用。但我想通过SWD (串行线调试)做更好的调试。因此,我断开了兼容Arduino的USB芯片的连接,转而通过SWD和JLINK连接。与此类似:https://mcuoneclipse.com/2017/04/29/modifying-the-teensy-3-5-and-3-6-for-arm-swd-debugging/

我可以使用"J-Link Lite“软件刷新我通过platformio构建的固件。我也可以毫无问题地运行J-Link GDB服务器。但是我不能让IDE集成工作。

我的platformio.ini看起来像这样:

代码语言:javascript
复制
[env:teensy36]
platform = teensy
board = teensy36
framework = arduino
upload_protocol = jlink
debug_tool = jlink

尽管如此,upload_protocol仍然被忽略,当我通过集成开发环境调用upload (platformio.exe run --target upload)时,我得到的结果是

代码语言:javascript
复制
Linking .pioenvs\teensy36\firmware.elf
Checking program size
text       data     bss     dec     hex filename
17348       172    2696   20216    4ef8 .pioenvs\teensy36\firmware.elf
Building .pioenvs\teensy36\firmware.hex
Uploading .pioenvs\teensy36\firmware.hex
Teensy Loader, Command Line, Version 2.1
Read ".pioenvs\teensy36\firmware.hex": 17520 bytes, 1.7% usage
Soft reboot is not implemented for Win32
Waiting for Teensy device...
(hint: press the reset button)

所以它仍然在尝试通过Arduino兼容的USB连接上传,而不是通过SWD连接。如何让platformio更改上传方法或upload_protocol?

EN

回答 1

Stack Overflow用户

发布于 2017-08-20 14:22:04

Project Configuration File platformio.ini中,它提供了一个如何配置Jlink GDB服务器的示例:

代码语言:javascript
复制
[env:bluepill_f103c8]
...
; Debug options
debug_tool = custom
debug_server =
    JLinkGDBServer
    -singlerun
    -if
    SWD
    -select
    USB
    -port
    2331
    -device
    STM32F103C8

如果PATH中没有包含JLinkGDBServer.exe,则需要指定JLinkGDBServer.exe的完整文件名。

我试过了,很管用。

还有另一个使用JlinkGDBServerCL.exe - J-Link and ST Nucleo的例子。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45612493

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档