EmbDev.net

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


von Mike (Guest)


Rate this post
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:
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!

von Martin T. (mthomas) (Moderator)


Rate this post
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:
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.

von Mike (Guest)


Rate this post
useful
not useful
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.

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.