|
楼主 |
发表于 2024-4-15 20:44:41
|
显示全部楼层
添加问题的附加描述:
keil软件中的设置没有特别之处,就是debug settings中的Reset采用了 SYSRESETREQ。
keil软件是能够正确下载程序到flash中的。
但采用openocd时,虽然能够成功连接上芯片
然后打开telnet连接上openocd架设的telnet服务器,分别直接执行halt和resume命令都是可以的。
然而一旦执行了 reset halt命令,则会出现错误信息:
> reset halt
timed out while waiting for target halted
TARGET: stm32f1x.cpu - Not halted
Halt timed out, wake up GDB.
此时,程序已经运行不正常,且无法停止。
用program命令下载程序到flash也失败:
> program project.hex
timed out while waiting for target halted
embedded:startup.tcl:1467: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1504
at file "embedded:startup.tcl", line 1467
Halt timed out, wake up GDB.
openocd 装载的cfg文件中与reset相关的命令为:
reset_config srst_only
cortex_m reset_config sysresetreq
与reset_config 相关的子命令
reset_config [none|trst_only|srst_only|trst_and_srst]
[srst_pulls_trst|trst_pulls_srst|combined|separate]
[srst_gates_jtag|srst_nogate] [trst_push_pull|trst_open_drain]
[srst_push_pull|srst_open_drain]
[connect_deassert_srst|connect_assert_srst]
等等都尝试过,结果都不正确!都会出现上述 timed out while waiting for target halted 的出错信息。
所以,想问问各位大神,该问题如何解决?
或者说,keil软件中的Reset 设置为 SYSRESETREQ,对应于openocd的命令应该是啥?
|
|