Forum: ARM programming with GCC/GNU tools STM32 GDB / OpenOCD Commands and Initialization for Flash and Ram Debugging

Author: Jim T. (jim_t)
Posted on:

Rate this post
0 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 

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 

Any help would be greatly appreciated.

Jim T

Author: tom (Guest)
Posted on:

Rate this post
0 useful
not useful

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.


Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]

Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.