OpenOCD load and debug fails sometimes

Guest #1436284
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:
1
target extended-remote localhost:3333
2
monitor soft_reset_halt
3
set mem inaccessible-by-default off
4
load
5
compare-sections
6
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!
Moderator #1436695
Mike wrote:
>...
> I start openocd with the following command:
> openocd -f openocd.cfg -c init
Please show openocd.cfg.
You may also just try:
1
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.
Guest #1436959
Hi,

openocd.cfg:
1
interface ft2232
2
ft2232_vid_pid 0x0403 0x6010
3
ft2232_device_desc "Dual RS232 A"
4
ft2232_layout "oocdlink"
5
ft2232_latency 2
6

7
set BSTAPID 0x16410041
8
set WORKAREASIZE 0x5000
9

10

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

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

Reply

A question of your own? This thread is over 17 years old. Ask it in a thread of its own – more people read along there, and it gets answered more often and sooner.

Start a new thread

A fix, an addition or feedback on this thread? Then reply here.

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.