-
Notifications
You must be signed in to change notification settings - Fork 210
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
OpenOCD连接失败 #31
Comments
看到问题了,我找找是什么原因 |
相当严重的问题,我之前顾着搞其他功能去了,这里正经的dap全崩了。。。 |
找到原因了,栈太大炸了。。。 8266的内存实在有限,现在加了一堆功能,调小可能还会有暗病= = |
新的没有出现core panic的问题了。但是在连接目标MCU的时候还是会报错: Open On-Chip Debugger 0.11.0+dev-00571-g254883597-dirty (2022-02-15-15:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use '
transport select <transport>'.
Info : Using CMSIS-DAPv2 interface with VID:PID=0xc251:0xf00a, serial=1234
Info : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: JTAG supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Serial# = 1234
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 1 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 2000 kHz
Info : SWD DPIDR 0x2ba01477
Info : stm32f4x.cpu: Cortex-M4 r0p1 processor detected
Info : SWD DPIDR 0x2ba01477
Error: Failed to write memory and, additionally, failed to find out where
Warn : target stm32f4x.cpu examination failed
Info : gdb port disabled
Info : SWD DPIDR 0x2ba01477
Info : SWD DPIDR 0x2ba01477
Error: Could not find MEM-AP to control the core
Error: Target not examined, reset NOT asserted!
embedded:startup.tcl:1136: Error: ** Unable to reset target **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1173
at file "embedded:startup.tcl", line 1136 我看看要怎么用命令行复现 |
我手头没有M4的设备,但是M3测试是可以的 |
可以用telnet连上,然后看看下面的指令能不能复现: init
reset init
halt
flash write_image erase E:/TEST.bin 0x08000000 |
指令的返回依次是:
|
openocd的连接命令是啥样的? |
指令是
|
我感觉是板子没有选择对,因为这个MEM-AP是要和芯片匹配的。 我再找找看是什么原因 |
你这个 |
你看看这个: 用他的方案一试试看 |
是F4,通过ST-Link+STM32CubeProgrammer可以看得到。我怀疑前面是线没有接牢固的原因,所以我把线直接焊到排针上了。
这和不插入设备是一样的 |
我再检查一下其他的硬件问题,排除偶然性吧。真是辛苦你了 |
对,确实是F4,但是现在的问题属于是没有读到数据,比刚才要糟糕一些 |
我换了一个STM32H750的开发板,似乎可以正常工作。所以有可能是那个F4的原因。 |
我后面有时间找块f4试试看 |
@ZhuYanzhen1 我刚才试了块F4,没啥问题 不过8266确实很容易受到干扰 |
我觉得很有可能是我这个芯片的问题。不过ESP8266本身的收发能力也决定了它的稳定性和速度没法做到很高。
…---原始邮件---
发件人: ***@***.***>
发送时间: 2022年3月1日(周二) 晚上7:42
收件人: ***@***.***>;
抄送: ***@***.***>;"State ***@***.***>;
主题: Re: [windowsair/wireless-esp8266-dap] OpenOCD连接失败 (Issue #31)
我刚才试了块F4,没啥问题
不过8266确实很容易受到干扰
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
还有个esp32的分支,有意思的是esp32的速度稍微比8266慢些,暂时还没有搞清楚是啥原因😂
…------------------ 原始邮件 ------------------
发件人: Lao·Zhu ***@***.***>
发送时间: 2022年3月3日 04:16
收件人: windowsair/wireless-esp8266-dap ***@***.***>
抄送: windowsair ***@***.***>, Comment ***@***.***>
主题: 回复:[windowsair/wireless-esp8266-dap] OpenOCD连接失败 (Issue #31)
我觉得很有可能是我这个芯片的问题。不过ESP8266本身的收发能力也决定了它的稳定性和速度没法做到很高。
---原始邮件---
发件人: ***@***.***&gt;
发送时间: 2022年3月1日(周二) 晚上7:42
收件人: ***@***.***&gt;;
抄送: ***@***.***&gt;;"State ***@***.***&gt;;
主题: Re: [windowsair/wireless-esp8266-dap] OpenOCD连接失败 (Issue #31)
我刚才试了块F4,没啥问题
不过8266确实很容易受到干扰
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you modified the open/close state.Message ID: ***@***.***&gt;
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you commented.Message ID: ***@***.***>
|
Hi, 我再次遇到了这个问题,这次我使用的是MM32F3277G9。它是Cortex-M3内核的,而我使用ST-Link可以正常连接它。 Open On-Chip Debugger 0.11.0+dev-00571-g254883597-dirty (2022-02-15-15:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "swd". To override use '
transport select <transport>'.
Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,
disable}
Info : Using CMSIS-DAPv2 interface with VID:PID=0xc251:0xf00a, serial=1234
�[0mInfo : CMSIS-DAP: SWD supported
Info : CMSIS-DAP: JTAG supported
Info : CMSIS-DAP: Atomic commands supported
Info : CMSIS-DAP: Test domain timer supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Serial# = 1234
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 0 SWDIO/TMS = 0 TDI = 1 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 10000 kHz
Error: Error connecting DP: cannot read IDR
in procedure 'program'
** OpenOCD init failed **
shutdown command invoked OpenOCD配置文件: adapter driver cmsis-dap
source [find target/swj-dp.tcl]
source [find mem_helper.tcl]
adapter speed 10000
if { [info exists CHIPNAME] } {
set _CHIPNAME $CHIPNAME
} else {
set _CHIPNAME stm32f1x
}
set _ENDIAN little
if { [info exists WORKAREASIZE] } {
set _WORKAREASIZE $WORKAREASIZE
} else {
set _WORKAREASIZE 0x1000
}
set _FLASH_SIZE 0x80000
if { [using_jtag] } {
# See STM Document RM0008 Section 26.6.3
set _CPUTAPID 0x3ba00477
} {
# this is the SW-DP tap id not the jtag tap id
set _CPUTAPID 0x2ba01477
}
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
if {[using_jtag]} {
jtag newtap $_CHIPNAME bs -irlen 5
}
set _TARGETNAME $_CHIPNAME.cpu
target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME mm32f3x 0x08000000 $_FLASH_SIZE 0 0 $_TARGETNAME
adapter srst delay 100
if {[using_jtag]} {
jtag_ntrst_delay 100
}
reset_config none
if {![using_hla]} {
cortex_m reset_config sysresetreq
}
$_TARGETNAME configure -event examine-end {
mmw 0xE0042004 0x00000307 0
}
$_TARGETNAME configure -event trace-config {
mmw 0xE0042004 0x00000020 0
} |
这个比较麻烦,我建议刚开始连接的时候不要用太高的速率,先用1MHz左右的,等连接上了再切换到10Mhz以上 |
我将速率修改成了 |
我怀疑是不是某一些openocd的配置使得它无法连接芯片? |
这个比较玄学了。。因为第一步就发生了 实际上,第一步做的是读芯片的ID,这个基本上和openocd配置没有关系,因为Cortex M0、M1、M3、M7都是这样读的,调试器软件都是按这个规范来做的。如果说是高速下的时序问题,那改用低速方式就是原始的IO翻转,这里也不太可能出问题。 我还是觉得和硬件连接关系比较大;或者是usbip的问题,这个玩意在丢包条件下很不稳定 |
我实在无法在硬件中找到什么问题。请问有没有办法不使用SP而I改用IO进行操作? |
速度设置成小于10Mhz就是纯io翻转。 后续我具体测试下是哪里出现问题了 |
STM32F303RE 开发版报错。 我只连接了SWD的SWCLK SWDIO GND 以及 RESET,同样的接线ST-LINK 通过OpenOCD是可以的。
|
OpenOCD版本:Open On-Chip Debugger 0.11.0+dev-00571-g254883597-dirty (2022-02-15-15:05),自己拉仓库下来编译的。ST Link等支持完美。
OpenOCD连接语句:
openocd.exe -f cmsis-dap.cfg
,cmsis-dap.cfg内容为adapter driver cmsis-dap
。连接的过程中就出错了,OpenOCD返回信息:
串口返回的错误信息:
复现方法:
.\openocd.exe -f .\cmsis-dap.cfg
The text was updated successfully, but these errors were encountered: