EmbDev.net

Forum: ARM programming with GCC/GNU tools OpenOCD load and debug fails sometimes


Author: Mike (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

I'm trying to debug and flash my STM32 with OpenOCD/GDB.

I start openocd with the following command:
openocd -f openocd.cfg -c init

My Debug / Load configuration:
target extended-remote localhost:3333
monitor soft_reset_halt
set mem inaccessible-by-default off
load
compare-sections
monitor reset init

Load works  only  one attempt out of 5. The error message is just Load 
failed...

Does anyone have a clue what the problem could be?

Thanks a lot!

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Mike wrote:
>...
> I start openocd with the following command:
> openocd -f openocd.cfg -c init
Please show openocd.cfg.
You may also just try:
openocd -f interface/<yourinterface> -f target/stm32 init
which will use files from the "target library". I have used them in my 
STM32 projects with success.

Author: Mike (Guest)
Posted on:

Rate this post
0 useful
not useful
Hi,

openocd.cfg:
interface ft2232
ft2232_vid_pid 0x0403 0x6010
ft2232_device_desc "Dual RS232 A"
ft2232_layout "oocdlink"
ft2232_latency 2

set BSTAPID 0x16410041
set WORKAREASIZE 0x5000


source  "C:/program files/openocd/target/stm32.cfg"

Openocd recognizes the target as stm32.
I use the yagarto toolchain with eclipse.

Reply

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.