Problems with openOCD

Discussions and support about ChibiStudio, the free development environment for ARM.
demant
Posts: 8
Joined: Tue Nov 01, 2016 2:09 pm
Has thanked: 1 time

Problems with openOCD

Postby demant » Tue Nov 01, 2016 2:21 pm

Hi,when I run openOCD on ST-Link V2-1 I read this message

Open On-Chip Debugger 0.10.0-dev-00107-ge4848fe (2015-11-13-11:49)
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
Info : STLINK v2 JTAG v27 API v2 SWIM v15 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.245580
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'

What's the problem? How can I solve it?
thanks for the reply

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Problems with openOCD

Postby Giovanni » Tue Nov 01, 2016 2:24 pm

hi,

Are ST Link drivers installed? try connecting the target using the ST Link tool and verify if it works.

Giovanni

demant
Posts: 8
Joined: Tue Nov 01, 2016 2:09 pm
Has thanked: 1 time

Re: Problems with openOCD

Postby demant » Wed Nov 02, 2016 4:15 pm

thanks for the reply.
When I tried to connect the target using the ST-LINK tool it did not work. However the drivers are installed. I tried reinstalling but the problem persists. I used chibistudio without problems before the last update of Windows 10. Could this be the problem?

User avatar
Giovanni
Site Admin
Posts: 14457
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: Problems with openOCD

Postby Giovanni » Wed Nov 02, 2016 4:23 pm

Hi,

It could be the problem, however, there are lots of people using OpenOCD with W10, not sure what you are supposed to do, I avoid it like plague.

Probably it is related to USB or permissions.

Are you running as administrator?

Giovanni

demant
Posts: 8
Joined: Tue Nov 01, 2016 2:09 pm
Has thanked: 1 time

Re: Problems with openOCD

Postby demant » Sun Nov 20, 2016 2:32 am

I will also run as an administrator but the problem persists. I tried to connect via ST-Link tool but it responds with the following message: "Can not connect to the target." I checked the 3V3 pin of the core and actually delivers 3.3 V and this is a thing that makes me think that the USB cable is working (also the card is visible in management devices under "COM port"). I thought that my problem could be similar to that described in the following topic viewtopic.php?f=13&t=3562 .It is possible? In such a case could you provide further information on the procedure that you indicated (the one supplied by the user does not work)? I can not find in the user manual informations about the option to freeze the MCU after reset.
Thanks for support

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: Problems with openOCD

Postby RoccoMarco » Sun Nov 20, 2016 12:56 pm

Maybe your firwmare is changing the configuration of that PINs used by SWD. You need to connect under reset and erase the whole chip (using ST Link Utility). If your is a problem related to drivers you wouldn't be able to see Mass Storage.

Ciao
Ciao,
RM

demant
Posts: 8
Joined: Tue Nov 01, 2016 2:09 pm
Has thanked: 1 time

Re: Problems with openOCD

Postby demant » Sun Nov 20, 2016 1:46 pm

I already tried to connect under reset but when I select this option and then try to connect the ST-Link utility shows me the following message:

Can not connect to the target!
If you're trying to connect to an STM32W1xx device, please select Normal or hotplug from target-mode> Settings menu.

I see the card as mass storage and if I open it I find a text file entitled fail.txt containing the message "SWD ERROR".

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: Problems with openOCD

Postby RoccoMarco » Sun Nov 20, 2016 3:47 pm

On connection under reset you have to connect on the MCU reset (reset it through the related button).
Ciao,
RM

demant
Posts: 8
Joined: Tue Nov 01, 2016 2:09 pm
Has thanked: 1 time

Re: Problems with openOCD

Postby demant » Sun Nov 20, 2016 4:13 pm

yes I know. I keep pressing the reset button (black button) while I try to connect the board but does not connect.

User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: Problems with openOCD

Postby RoccoMarco » Sun Nov 20, 2016 4:17 pm

Can you provide more info about hardware and software?
Board type, PCB version, what firmware is currently on flash, when the problem has occurred for the first time.
Ciao,
RM


Return to “ChibiStudio”

Who is online

Users browsing this forum: No registered users and 29 guests