Comments (9)
cmd.exe /C "D:\MounRiver\MounRiver_Studio\toolchain\OpenOCD\bin\openocd.exe -s "h:\MajorProjects\AmusingDeviceProject\AntDevice\AntDevice" -f tools/wch-interface.cfg -f tools/wch-target.cfg -c "program "h:/MajorProjects/AmusingDeviceProject/AntDevice/AntDevice/build/Debug/AntDevice.hex" verify" -c "reset run" -c "exit"
下载命令不对,烧录器配置不要选用 OpenOCD
烧录器配置应该选用 Shell Flasher,才是用的 download.cmd 里的命令烧录的,
因为 CH32V 是定制的烧录命令和openocd,不能直接用普通的 openocd 命令去烧录
from eide.
原来如此,问题解决了,非常感谢!
from eide.
刚看到Shelll有个从云端安装Shell烧录脚本
于是好奇的试了一下,然后就下载失败了,错误提示:
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
** Programming Started **
Error: couldn't open h
embedded:startup.tcl:1136: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1201
at file "embedded:startup.tcl", line 1136
好奇心害死猫!
最后我还是把shell改回原来的配置,就好了。
但是我还是觉得,这个问题应该反馈一下,毕竟是从插件内直接下载的配置,竟然无法使用。
from eide.
请粘贴完整的命令行 log
from eide.
--------------------------------------------------
firmware: h:/MajorProjects/AmusingDeviceProject/AntDevice/AntDevice/build/Debug/AntDevice.hex
--------------------------------------------------
Open On-Chip Debugger 0.11.0+dev-02215-gcc0ecfb6d-dirty (2022-09-28-11:32)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : only one transport option; autoselect 'jtag'
Ready for Remote Connections
Info : WCH-Link-CH549 mod:RV version 2.8
Info : wlink_init ok
Info : This adapter doesn't support configurable speed
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
Info : [riscv.cpu.0] datacount=2 progbufsize=8
Info : Examined RISC-V core; found 1 harts
Info : hart 0: XLEN=32, misa=0x40901125
[riscv.cpu.0] Target successfully examined.
Info : starting gdb server for riscv.cpu.0 on 3333
Info : Listening on port 3333 for gdb connections
Info : device id = 0x263e578f
Info : flash size = 256kbytes
Info : ROM 256 kbytes RAM 64 kbytes
erased sectors 0 through 255 on flash bank 0 in 0.212998s
Info : JTAG tap: riscv.cpu tap/device found: 0x00000001 (mfg: 0x000 (<invalid>), part: 0x0000, ver: 0x0)
Warn : Bypassing JTAG setup events due to errors
** Programming Started **
Error: couldn't open h
embedded:startup.tcl:1136: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1201
at file "embedded:startup.tcl", line 1136
* 终端进程“cmd.exe /C "bash ./tools/program_flash.sh "h:\MajorProjects\AmusingDeviceProject\AntDevice\AntDevice\build\Debug\AntDevice.hex""”已终止,退出代码: 1。
原工程默认Shell配置是:
烧录文件:${ExecutableName}.bin
烧录命令:download.cmd "${programFile}"
// cmd脚本
set HEXFILE=%1
set "HEXFILE=%HEXFILE:\=/%"
openocd -f ./tools/wch-interface.cfg -f ./tools/wch-target.cfg -c init -c halt -c "flash erase_sector wch_riscv 0 last " -c "program %HEXFILE%" -c "verify_image %HEXFILE%" -c wlink_reset_resume -c exit
通过EIDE下载的配置是:
烧录文件(默认值):${ExecutableName}.hex
烧录命令:bash ./tools/program_flash.sh "${programFile}"
// bash脚本:
#!/bin/bash
firmwareFile=$(echo $1 | sed 's/\\/\//g')
echo "--------------------------------------------------"
echo "firmware: ${firmwareFile}"
echo "--------------------------------------------------"
./tools/wch_openocd/bin/openocd.exe -f ./tools/wch_openocd/bin/wch-riscv.cfg \
-c init -c halt \
-c "flash erase_sector wch_riscv 0 last" \
-c "program ${firmwareFile}" \
-c "verify_image ${firmwareFile}" \
-c wlink_reset_resume -c exit
from eide.
把命令改成 bash ./tools/program_flash.sh "./${OutDirBase}/${ProjectName}.hex"
试试?
可能是 shell 模式的路径解析问题
from eide.
问题解决,能正常下载了,的确是相对路径的问题。
但是这样写的话,程序文件那个配置似乎就没用了吧。
感觉应该把这个相对路径的父级写到shell里面,这样在gui菜单配置参数能简单点。
from eide.
只是验证问题原因,后面会修改 shell 脚本的,命令还是保持不变
from eide.
好的,大佬解决问题真快!
from eide.
Related Issues (20)
- [bug] iasmarm 有-n 选项,编译报错 HOT 1
- 多项目工作区只能添加4个项目
- [question] .NET6 runtime not found on kubuntu22.04LTS HOT 1
- [bug] 芯片支持包添加失败 HOT 1
- [bug] The name of library is incorrect.
- [bug] 安装实用工具报错:Error : certificate has expired HOT 6
- [bug] 导出keil中xml缺失vendor和device内容 HOT 3
- 有没有办法设置外部终端为debugger console或者更新下debug console让其能自动补全 HOT 1
- [bug] cube生成的工程导入之后无法自动补全以及结构体定义跳转
- [bug] cube生成的工程导入之后无法进行结构体跳转以及自动补全
- [bug] 图标显示异常 HOT 1
- [bug] Cannot setup any utility tools, show "certificate has expired" HOT 3
- [bug] 内置Perl版本过低,会与LaTeX 需要的版本冲突 HOT 2
- [question] Add "c++17" selection HOT 1
- come to a lot of "no such file or directory" when building HOT 2
- [question] CMSIS Configuration Wizard 代码有一部分没有开源? HOT 4
- [bug] Compile error HOT 2
- Where to define Off-Chip XData Memory HOT 1
- [bug]调用STM32标准库中stm32f10x_flash.h的函数时,编译出错 HOT 1
- [bug] Error can't connect WCH Template HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from eide.