STM32 GDB / OpenOCD Commands and Initialization for Flash and Ram Debugging

OP #2130981
Rate this post
• ▲ useful
▼ not useful
I am looking for assistance with the proper GDB / OpenOCD initializion 
and run commands to use within Eclipse for flash and ram debugging. 
Also, the proper modifications or additions that need to be incorporated 
in a make file for flash vs ram building for this mcu, if this matters 
of course.

mcu: STM32F103VET6

I am using Eclipse Helios with Zylin Embedded CDT, Yagarto Tools and 
Bins, OpenOCD .4, and have an Olimex ARM-USB-OCD-H Jtag adapter.

I have already configured the ARM-USB-OCD and added it as an external 
tool in  Eclipse. For initializing OpenOCD I used the  following command 
in Eclipse (The board config file references the stm32 mcu and was found 
in the OpenOCD installation as an example):

"openocd -f interface/olimex-arm-usb-ocd-h.cfg -f 
board/stm32f10x_128k_eval.cfg".

When I run this within Eclipse everything appears to be working (GDB 
Interface, OpenOCD finds the mcu, etc) .I can also telnet into OpenOCD 
and run commands.

So, I am stuck on the next part; initialization and commands for flash 
and ram debugging , as well as erasing flash.

I read through several tutorials, and scoured the net, but have not been 
able to find anything particular to this processor. I am new to this, so 
I might not be recognizing an equivent product for/as a suitable 
example.

Any help would be greatly appreciated.

Jim T
Guest #2143872
Rate this post
• ▲ useful
▼ not useful
jim,

take a look at the STM32F... example at the yagarto site how to setup a 
makefile for RAM and FLASH target.
try to understand the example (memory maps) before u proceed.
look at the jlink command scripts and look into the segger jlink gdb 
server manual, where u can find hints about debugging cortex-m3.
start with deriving an openocd config for debugging in RAM. if this 
works take next step with programming the flash via openocd. if this 
works setup a programming+debug sequence.

good luck.

Reply

Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.

Formatting
  • [c]C-Code[/c]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]
  • [[Title]] – link to an article
  • Link to another post: right-click its post ID (#8078628), copy the address, paste it into the text

More about formatting

Post long source code as an attachment, not in the text.

Already registered? Log in

Not shown to anyone. We send you a link; your post appears once you confirm it there.

By submitting you create a free account and accept the terms of use.