eide icon indicating copy to clipboard operation
eide copied to clipboard

不能自定义烧录命令,希望可以修改烧录命令

Open gjk0510 opened this issue 5 months ago • 3 comments

@echo off openocd -s ./scripts -f ./scripts/interface/stlink.cfg -f ./scripts/target/py32f002b.cfg pause

上面是正确应该执行的

  • 终端进程“cmd.exe /D /C "C:\Users\Administrator.eide\tools\openocd-0.12.0\bin\openocd.exe -s "c:\Users\Administrator\Desktop\Work\PY32\104_humble_" -f interface/stlink.cfg -f target/py32f002b.cfg -c "program "c:/Users/Administrator/Desktop/Work/PY32/104_humble_/build/gpio_led_key/Project.hex" verify" -c "reset run" -c "exit""”已终止,退出代码: 1。
  • 终端将被任务重用,按任意键关闭。 这是实际执行的,可以看到 -s不对,-s应该是openocd的目录对呀

gjk0510 avatar Jun 12 '26 11:06 gjk0510

Open On-Chip Debugger 0.12.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : auto-selecting first available session transport "hla_swd". To override use 'transport select'. target/py32f002b.cfg:9: Error: Can't find mem_helper.tcl in procedure 'script' at file "embedded:startup.tcl", line 28 at file "target/py32f002b.cfg", line 9

会报这种错误,要把文件移到工程目录才解决

gjk0510 avatar Jun 12 '26 11:06 gjk0510

就是有点不方便

gjk0510 avatar Jun 12 '26 11:06 gjk0510

mem_helper.tcl 应该是 openocd 自带的。检查一下你的 openocd 目录

Image

openocd 搜索目录是有内置这些目录的,因此插件使用 -s 参数添加额外的搜索目录,这里就是当前的项目目录,

openocd 内置的目录它自己知道在哪,不用额外用 -s 添加。

github0null avatar Jun 12 '26 11:06 github0null