Hello,

I'm glad you found it out finally!

Please see few commits inline.

On Wed, May 25, 2016 at 02:19:02PM +0200, Daniel Kowalski wrote:
> 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.

"program" does "reset init" before doing anything, and for debugging
reset-init handler is not appropriate usually, it's there mostly to
speed up flashing only. So after "program" you want "reset halt".

But I do not understand why you're not flashing from withing GDB
itself with "load" command. After "load" you can do "run" or "start"
and all your breakpoints are kept and nothing fancy is needed in the
config script.

Now let me comment your config a bit, outlining what I think would be
the best current practicies.

> for just flashing chip:
> openocd -f scripts/stm32.cfg -c "exit"

exit here is a no-op. You might want "shutdown".

> telnet_port 4444
> gdb_port 3333

Those are already default, no need to duplicate this in your config.

> source [find target/stm32l1.cfg]
> 
> program build/MinSizeRel/firmware.elf verify reset  

Here "reset" will lead to "reset run" internally which should be
appropriate for debugging (it doesn't run reset-init handler).

That said, I'm still confused about how "program ... reset" might make
debugging problematic. But I've to admit I didn't have a chance to
take a close look at your logs yet...

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

------------------------------------------------------------------------------
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

Reply via email to