OpenOCD problem with STM32F4 Discovery

Open source ARM Debugger

Moderator: phalanx

Post Reply
TMorita
Posts: 1
Joined: Tue Mar 20, 2018 4:24 pm

OpenOCD problem with STM32F4 Discovery

Post by TMorita » Tue Mar 20, 2018 4:31 pm

Hiya, I'm trying to use OpenOCD with an STM32F4 Discovery board.
Details:

Host: Ubuntu Linux
OpenOCD version: 0.9.0
Interface: ST-LINK/V2

This is what happens:

$ openocd -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg
Open On-Chip Debugger 0.9.0 (2018-01-24-01:05)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Warn : Interface already configured, ignoring
Error: already specified hl_layout stlink
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Error: open failed
in procedure 'init'
in procedure 'ocd_bouncer'

Contents of the cfg files:

$ cat interface/stlink-v2.cfg
#
# STMicroelectronics ST-LINK/V2 in-circuit debugger/programmer
#

interface hla
hla_layout stlink
hla_device_desc "ST-LINK/V2"
hla_vid_pid 0x0483 0x3748

# Optionally specify the serial number of ST-LINK/V2 usb device. ST-LINK/V2
# devices seem to have serial numbers with unreadable characters. ST-LINK/V2
# firmware version >= V2.J21.S4 recommended to avoid issues with adapter serial
# number reset issues.
# eg.
#hla_serial "\xaa\xbc\x6e\x06\x50\x75\xff\x55\x17\x42\x19\x3f"

$ cat board/stm32f4discovery.cfg
# This is an STM32F4 discovery board with a single STM32F407VGT6 chip.
# http://www.st.com/internet/evalboard/product/252419.jsp

source [find interface/stlink-v2.cfg]

transport select hla_swd

# increase working area to 64KB
set WORKAREASIZE 0x10000

source [find target/stm32f4x.cfg]

reset_config srst_only

Looking for advice on what is wrong.

Toshi

Post Reply