Page 1 of 2
stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 6:20 am
by pacoblackxx
Hi giovanni,
Can you give more info about your saying "In order to start a debugging session first make sure that OpenOCD is running" in the eclipse tutorial?
how can i startup the openocd under windows? what commands should i issue in cygwin?
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 6:54 am
by Giovanni
just "openocd.exe", there must be an "openocd.cfg" in the same directory with your initialization script, for the STM32 I use:
Code: Select all
#daemon configuration
telnet_port 4444
gdb_port 3333
set WORKAREASIZE 0x5000
source [find interface/olimex-arm-usb-ocd.cfg]
source [find target/stm32f1x.cfg]
It can change depending the target and the used JTAG dongle.
Note that guides are not a replacement for documentation, OpenOCD is very complex.
Giovanni
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:17 am
by pacoblackxx
i am working withe the stm32f4 discovery and st-link, so the olimex in the .cfg is not correct i guess.
could you give me the right one please?
it gives an error:" unable to open ftdi device:device not found
in procedure init"
thanx
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:25 am
by Giovanni
I never used the ST-Link with OpenOCD.
Giovanni
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:29 am
by pacoblackxx
I followed the "Using ST-Link into an Eclipse environment" and after starting in crt0.c the "_unhandled_exception"
is called..
any idea about the error?
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:40 am
by Giovanni
Probably you didn't read the article, it does not use OpenOCD but another GDB server.
Giovanni
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:44 am
by pacoblackxx
yeah i noticed and changed the post!
after starting in crt0.c the "_unhandled_exception" is called.
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:49 am
by Giovanni
If you are going to follow that article then there is no need for OpenOCD

Now OpenOCD supports ST-Link but not yet in the officially released versions, I haven't tried it yet, probably I will give it a try when version 0.6.0 will be released, at that point there will be no more need to the Atollic GCB server.
Giovanni
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 7:53 am
by pacoblackxx
yes giovani i understand that i must not work with openocd.
i am using the gbd server, program goes to psp = SYMVAL(__process_stack_end__);
then i press step, and it goes to void _unhandled_exception(void)..
am i missing something?
in debug conmfigurations, the startup tab has not any "start command" textbox
in order to jump call resetHandler()
Re: stm32f4 st-link +openocd
Posted: Wed Apr 25, 2012 8:01 am
by Giovanni
Probably you created the wrong debug configuration.
Giovanni