On Wed, 25 May 2016 03:44:52 +0200 Daniel Kowalski <kowal...@gmail.com> wrote:
> I downgraded openocd to v0.8.0 (compiled from sources) and it works > correctly (catches breakpoint). I had to change probe to jlink and > transport to jtag (I was using Jtag Lock-pick tiny 2 with SWD - FTDI > based), but it makes no difference to openocd 0.9.0. > > I will try bisecting this tomorrow. > > Daniel > OK, I found the culprit - my openocd script, thanks for assistance. It may just as well be bug in openocd - i think it should not behave this way Debugging works correctly when I remove last script line (program). I don't know why debugger is stuck in half-working state after flashing chip. I noticed that attaching with openocd to running target without programming flash memory causes led on probe to flash continuously (indicates that it is in debugging state?), but after programming led is off, I can still send commands to target through gdb, it halts, continues, sets breakpoints, breaks on them, etc. but does not respond to interrupt requests, and openocd misses halt on breakpoints events. I recall that this worked in the past (debug after flashing), and i used openocd with single script (with program line inside) like this: for just flashing chip: openocd -f scripts/stm32.cfg -c "exit" and for debugging new image: openocd -f scripts/stm32.cfg Maybe it should switch probe to appropriate mode after flashing or shutdown automatically (v0.8.0 dit this even without exit command - that's why I removed program line and everything worked)? script I used: -------------------------------------------------------------- telnet_port 4444 gdb_port 3333 # Jlink # source [find interface/jlink.cfg] # Jtag Lock Pick source [find interface/ftdi/jtag-lock-pick_tiny_2.cfg] # serial of debug adapter #ftdi_serial FTYHIMUW # transport select jtag transport select swd # JTAG speed should be <= F_CPU/6. F_CPU after reset is 8MHz, so use F_JTAG = 1MHz adapter_khz 1000 adapter_nsrst_delay 100 # only for JTAG # jtag_ntrst_delay 100 source [find target/stm32l1.cfg] program build/MinSizeRel/firmware.elf verify reset --------------------------------------------------------------- Daniel -- () ascii ribbon campaign - against html e-mail /\ - against proprietary attachments
pgpRvFFCWi_b3.pgp
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j
_______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel