Hi again!

> I have a code for STM32F100C4T6B that is run from SRAM. Problem is, that
> I'm unable to set breakpoint for address in SRAM area. My setup is
> following:
> - JTAG Turtelizer2 clone (ft2232 based)
> - latest OpenOCD from git [08ddb19f] (but older versions tested as
> well), executed like:
>    openocd -f interface/turtelizer2.cfg -d 3 -c "gdb_breakpoint_override
> soft" -c "gdb_memory_map enable" -c "gdb_flash_program enable" -f
> target/stm32f1x.cfg -c "adapter_khz 700" -c "reset_config srst_pulls_trst"
> - I changed workarea size from 16kB to 4kB
> - gcc 4.6/gdb 7.3 from Linaro (Codesourcery tested too)
> - Eclipse 3.8, GDB HW Debugging using following startup code:
>    monitor reset init
>    monitor reset halt
> - I checked Zylin Eclipse plugin, but problem is the same
>
>
> What works:
> - set breakpoint for flash code address, press resume, target halts as
> expected
> - set breakpoint just before jump to SRAM code, stepping in SRAM code
> works OK
>
> What doesn't work:
> - set breakpoint in SRAM code, press resume, target is running without
> halting on breakpoint (program is running as expected)
> - set breakpoint just before jump to SRAM code, stepping in SRAM code
> works OK, but then setting breakpoint in SRAM and resume doesn't halt
> target


OK, seems that I figured out where the problem is. Software breakpoints 
are set before code is copied to SRAM, so it is overwritten by 
initialization code. Setting breakpoint after code is copied seems to 
fix the problem.

Regards,
Krzysztof

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to