EmbDev.net

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


von Jim T. (jim_t)


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

von tom (Guest)


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.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.