On Wed, Jan 21, 2015 at 12:32 PM, Uwe Bonnes <
b...@elektron.ikp.physik.tu-darmstadt.de> wrote:

> Hello,
>
> trying to debug on another Nucleo F411 board with some NutOs Program (__WFI
> in the idle loop), I have now hit again a state where I can't get openocd
> to
> work with the board.
> - Detach USB, board is unpowered, NutOs program in flash.
> - Reattach USB, first start of OpenOcd give a loop of
> Error: jtag status contains invalid mode value - communication failure
> Polling target stm32f4x.cpu failed, GDB will be halted. Polling again in
> 100ms
> Info : Previous state query failed, trying to reconnect
> Polling target stm32f4x.cpu succeeded again, trying to reexamine
>
> - Second start of OpenOcd seems fine:
> Info : 5 kHz
> Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
> Info : accepting 'gdb' connection on tcp/3333
> Info : device id = 0x10006431
> Warn : STM32 flash size failed, probe inaccurate - assuming 512k flash
> Info : flash size = 512kbytes
> undefined debug reason 7 - target needs reset
>

This doesn't seem that fine to me. Could it be because the target is in
sleep mode? Even though debug clock is running so you can connect, that
doesn't mean the entire chip is accessible.


> srst_only separate srst_nogate srst_open_drain connect_deassert_srst
>

This is a problem. Without holding reset asserted during start, you're not
going to get control over a sleeping target reliably.
Add connect_assert_srst to reset_config and reset (halt|init) the target
before interrogating it.

> (gdb) b NutInit
> Breakpoint 1 at 0x80000a0: file /home/bon/devel/ethernut_sf/
nut/os/../arch/cm3/os/nutinit.c, line 259.
> (gdb) r

Try using c here instead of r.

/Andreas
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to