hi,
I'm a newer for openocd.
I compiled openocd code to debug a cortex_m4-based board( the chip support FPv4_SP feature).
The openocd was run as a demaon, and I use arm-none-eabi-gdb to connect it:
/arm-none-eabi-gdb -ex "target remote localhost:3333" /home/zyl/unicorn/out/u2/ap/nuttx/nuttx,
Reading symbols from /home/zyl/unicorn/out/u2/ap/nuttx/nuttx...done.
Remote debugging using localhost:3333
0x01000424 in up_cpu_wfi () at /home/zyl/unicorn/out/u2/ap/nuttx/arch/arm/src/chip/song_idle.c:194
194 __asm__ __volatile__
(gdb)
but when I send "Info registers"cmd,
~~~
(gdb) info registers
r0 0x0 0
r1 0x0 0
r2 0xff 255
r3 0x80 128
r4 0x600003f8 1610613752
r5 0x3 3
r6 0x101df6c 16899948
r7 0x80 128
r8 0xe000ed10 -536810224
r9 0x504 1284
r10 0x101df70 16899952
r11 0xe0 224
r12 0x0 0
sp 0x60003714 0x60003714
lr 0x10088db 16812251
pc 0x1000424 0x1000424 <up_cpu_wfi+20>
xPSR 0x1000000 16777216
Remote connection closed
~~~</up_cpu_wfi+20>
**An Assrtion caused and openocd deamon exit.
**
zyl@cone:~/openocd/openocd$ openocd -f tcl/u2.cfg -d3 -l log
Open On-Chip Debugger 0.10.0+dev-00620-g02279e2-dirty (2018-12-13-12:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
User : 13 4 command.c:544 command_print(): debug_level: 3
Debug: 14 4 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_log_output log
Debug: 15 4 command.c:143 script_debug(): command - log_output ocd_log_output log
*openocd: src/target/armv7m.c:255: armv7mreadcorereg: Assertion `num < (int)armv7m->arm.corecache->numregs' failed.
*
Attach is u2.cfg.
Any help in this regard his highly appreciated.
Thank you.
I cannot find the script u2.cfg in attachment. Can you please check?
Antonio
oh, I'm sorry for that.
Replicated with another Cortex-M4, STM32F411.
The issue is not present with HLA ST-Link adapter, but only with low level JTAG or SWD, e.g. with J-Link.
Would you mind checking this commit http://openocd.zylin.com/5165
It solves the issue on my side
The issue it's a little tricky because requires the target to be left in halt by a previous execution. If you can, please confirm this observation too.
Thanks
Hi zhuyanlin,
there is another possible fix in http://openocd.zylin.com/5203
Would you mind checking if it solves this ticket also in your case?
Thanks
Antonio
hello Borneo:
I'm in the reviewer list in http://openocd.zylin.com/#/c/5165/
If you discussions have a final result, i can checking on the that patch.
Thanks
No, the fix on http://openocd.zylin.com/5203
The patch http://openocd.zylin.com/#/c/5165/ was also avoiding the crash, but was not fixing the root cause.
So please check if 5203 alone fix also on your side.
Thanks
Hi, Borneo:
Sorry for log time no reply.
I cherry-picked the patch 5203 http://openocd.zylin.com/5203 .
It works will in my board now.
When I send "Info registers"cmd, the Assertion not appear.
Thank you for fix my quession!