Wojtek | 13 Mar 23:13 2012
Picon

OCD problem with STLink and STM32L platform

Hallo all.
I have a problem with STLink-> OCD on STM32L152 platform (used STM32lx_stlink.cfg). Code loaded by GDB is always damaged in the first few tens bytes of flash memory. The same code loaded into STM32F217 (used STM32F2x_stlink.cfg) or STM32F103 (used STM32F1x_stlink.cfg ) and everything is ok
I used STLink and comunication SWD from the board Discovery STM32L1.
 
regards
Wojtek
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@...
https://lists.sourceforge.net/lists/listinfo/openocd-devel
Wojciech Szim | 20 Mar 08:53 2012
Picon

Re: OCD problem with STLink and STM32L platform

> 
> -----Original Message-----
> From: Attila Kinali [mailto:attila@...]
> Sent: Sunday, March 18, 2012 10:31 AM
> To: Wojtek
> Subject: Re: [OpenOCD-devel] OCD problem with STLink and 
> STM32L platform
> 
> On Tue, 13 Mar 2012 23:13:50 +0100
> "Wojtek" <wszim@...> wrote:
> 
> > I have a problem with STLink-> OCD on STM32L152 platform (used 
> > STM32lx_stlink.cfg). Code loaded by GDB is always damaged 
> in the first 
> > few tens bytes of flash memory. The same code loaded into STM32F217 
> > (used
> > STM32F2x_stlink.cfg) or STM32F103 (used STM32F1x_stlink.cfg ) and 
> > everything is ok I used STLink and comunication SWD from the board 
> > Discovery STM32L1.
> 
> You provide very little information...
> 
> A few questions for you:
> 1) Is it always the same byte positions?
> 2) Do you use the same programmer/JTAG interface for all boards?
> 3) How fast is your JTAG clock?
> 4) Did you try to reduce the JTAG speed?
> 5) What does OpenOCD say? Any warnings or error messages?
> 6) Which version of OpenOCD are you using?
> 7) How does your programming script look like?
> 
> 			Attila Kinali
> 
> --
> Why does it take years to find the answers to the questions 
> one should have asked long ago?
> 

 Thank you so much that you become interested in my problem. But today I
solved its.  In configuration debuger launcher now I'm using "Resume"
instead of "continue". I dont know why "continue" got wrong reaction but now
is ok. Still below the answers to your points:

> A few questions for you:
> 1) Is it always the same byte positions?
Yes. There are first several dozen of bytes.

> 2) Do you use the same programmer/JTAG interface for all boards?
Yes. So I wrote. Use STlink from STM32L Discovery board.
http://www.st.com/internet/evalboard/product/250990.jsp
When I loaded code to flash from another programmer and run debugging
without option "Load image" then only debugging works just fine.
If cables from debugger connect the to external systems with STM32F1xx or
STM32F2xx everything works without problems. Funny but STM32L152 being on
the Discovery board operates its own wrong.

> 3) How fast is your JTAG clock?
> 4) Did you try to reduce the JTAG speed?
Hmm. I dont know quite. Displays a 1KHz but it is strange and seems to me to
low frequency. But it isnt quite JTAG. It is SWD.

Log:
Open On-Chip Debugger 0.6.0-dev-00448-gc59a441 (2012-02-29-17:05)
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : must select a transport.
1 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 1 kHz
Info : IDCODE 2ba01477
Info : stm32lx.cpu: hardware has 6 breakpoints, 4 watchpoints

> 5) What does OpenOCD say? Any warnings or error messages?
No warnings. No errors.

> 6) Which version of OpenOCD are you using?
openocd-0.6.0-dev-120229143915 from Freddie Chopin compilation.
http://www.freddiechopin.info/en/download/category/10-openocd-dev
I talked with him on some forum, but he said that the platform can be STM32L
still unfinished, and directed me to the Open OCD devel.

> 7) How does your programming script look like?
I use Eclipse Indigo and its Standard GDB hardware Debuging Luncher. I dont
make script manually. It builds debuger launcher from debug configuration
panel.

Wojtek (wszim@...)

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure

Gmane