Error: Could not verify ST device

Discuss how to use the features of Atollic TrueSTUDIO, including the editor, assembler, C/C++ compiler, linker, debugger, static code analysis and team collaboration tools.

Moderators: Markus Girdland, Mattias Norlander

didier9
Posts: 10
Joined: Sat Jan 05, 2019 1:48 am

Error: Could not verify ST device

Postby didier9 » Sat Jan 05, 2019 2:00 am

I am a new ST/Atollic user, lots of experience with other tools including Eclipse on ARM (NXP) and Keil on 8051.
The target is an STM32F103C8T6 on a BluePill board.
I am using an eBay debug head marked ST-LINK V2 which works with the Arduino IDE and the same target.
I have installed the Atollic tools and built a simple project which compiles without error.
When starting a debug session, the first time I got an error message saying my debug head needed to be upgraded, which I did with the ST tools stsw-link007
The upgrade completed. Now the Atollic IDE tells me:

Code: Select all

Vendor = 0x3B

Error in initializing ST-LINK device.
Reason: ST-LINK: Could not verify ST device! Abort connection.

Not sure where to go from here. Any help appreciated.
Didier

didier9
Posts: 10
Joined: Sat Jan 05, 2019 1:48 am

Re: Error: Could not verify ST device

Postby didier9 » Sat Jan 05, 2019 2:49 am

I want to add that after upgrading the ST-LINK with the ST tool, the debug head still works with the Arduino IDE.

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Sun Jan 06, 2019 11:45 pm

I think i have the same Problem
but a Gentoo Linux machine
Yesterday the atollicTrueStudio told me that the STLink firmeware on my STM32F411 Nucleo is old and there is an update available
-> OK

then i debugged a part of software ... OK disconnected
powered off my PC and today it doesn't work any more
the Program on the Target is still running like charm
BUT
there is no more connection

Code: Select all

dmesg
....
[551559.359615] usb 11-4: USB disconnect, device number 6
[551563.688058] usb 11-4: new full-speed USB device number 7 using ohci-pci
[551563.967202] usb 11-4: New USB device found, idVendor=0483, idProduct=374b
[551563.967210] usb 11-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[551563.967214] usb 11-4: Product: STM32 STLink
[551563.967217] usb 11-4: Manufacturer: STMicroelectronics
[551563.967220] usb 11-4: SerialNumber: 066AFF494851877267065831
[551563.969199] usb 11-4: can't set config #1, error -62
...

Code: Select all

st-info --probe
setting new configuration (0 -> 1)
Found 1 stlink programmers
 serial:
openocd: ""
  flash: 0 (pagesize: 0)
   sram: 0
 chipid: 0x0000
  descr: unknown device



so it looks like Atollic has, with this update, killed the STLink on my nucleo device :cry: :oops: :evil:

perhaps somebody knows how to fix this problem :o
Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Mon Jan 07, 2019 8:10 am

NO DRIVER PROBLEM

another STM32F411 nucleo from the same batch

i bought 4 of this at the same time 3 working like charm

Code: Select all

[583125.194222] usb 11-4: USB disconnect, device number 12
[583125.632133] usb 11-4: new full-speed USB device number 13 using ohci-pci
[583125.931172] usb 11-4: New USB device found, idVendor=0483, idProduct=374b
[583125.931175] usb 11-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[583125.931176] usb 11-4: Product: STM32 STLink
[583125.931177] usb 11-4: Manufacturer: STMicroelectronics
[583125.931178] usb 11-4: SerialNumber: 066EFF494851877267013639
[583125.941190] usb-storage 11-4:1.1: USB Mass Storage device detected
[583125.941383] scsi host8: usb-storage 11-4:1.1
[583125.943287] cdc_acm 11-4:1.2: ttyACM0: USB ACM device
[583127.019180] scsi 8:0:0:0: Direct-Access     MBED     microcontroller  1.0  PQ: 0 ANSI: 2
[583127.019398] sd 8:0:0:0: Attached scsi generic sg5 type 0
[583127.029117] sd 8:0:0:0: [sde] 1056 512-byte logical blocks: (541 kB/528 KiB)
[583127.035123] sd 8:0:0:0: [sde] Write Protect is off
[583127.035126] sd 8:0:0:0: [sde] Mode Sense: 03 00 00 00
[583127.041129] sd 8:0:0:0: [sde] No Caching mode page found
[583127.041132] sd 8:0:0:0: [sde] Assuming drive cache: write through
[583127.121279] sd 8:0:0:0: [sde] Attached SCSI removable disk

Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

Markus Girdland
Posts: 146
Joined: Thu May 11, 2017 11:27 am

Re: Error: Could not verify ST device

Postby Markus Girdland » Mon Jan 07, 2019 10:34 am

Could you enable the gdbserver log under the debugger tab in the debug configuration?
It might give a clue to the problem.

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Tue Jan 08, 2019 7:24 pm

Markus Girdland wrote:Could you enable the gdbserver log under the debugger tab in the debug configuration?
It might give a clue to the problem.

there was a computer shutdown between :roll: so NO logfile

the problem is that the usb i.e. udev lib didn't recognise the STMLink any more.
what ever happened
i think there is after all pages i've read no way except of cutting off the STLink part and do the programming over a external STLink device
:cry:
i didn't know if the reason was a bug in the update file, a wrong config from the STLink updater or bad update i.e. communication errors.
Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify STLink device

Postby artbody » Sun Jan 13, 2019 9:53 pm

ok now i'm at the same point as last time
error in initialising...

Code: Select all

Error in initializing ST-Link device.
Reason: (6) ST-Link firmware upgrade required.
Please upgrade the ST-Link firmware using the upgrade tool. Reconnect ST-LINK and click OK


Code: Select all

STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, STMicroelectronics. All rights reserved.

Starting server with the following options:
        Persistent Mode            : Disabled
        Logging Level              : 1
        Listen Port Number         : 61234
        Status Refresh Delay       : 15s
        Verbose Mode               : Disabled
        SWD Debug                  : Enabled


Error in initializing ST-LINK device.
Reason: ST-LINK firmware upgrade required. Please upgrade the ST-LINK firmware using the upgrade tool.



the last time i updated my nucleo and this kills the STLink device.
but this time I'LL NOT DO SUCH AN UPDATE
because this STLinkV2 works well under SW4STM32
without any error :!:

so i enabled in debug : log 2 file
DEFAULT :(

Code: Select all

/home/achim/.../2019-01-13-pflamiku_3er_fsm_atollic/\Debug\st-link_gdbserver_log.txt

what's that " \ " :?:
i've a linux machine :D there is NO \ in path

../Debug/st-link_gdbserver_log.txt

Code: Select all

[0.000] initConfigParams():  Configuration flags start
[0.000] initConfigParams():  config-file                    ""
[0.000] initConfigParams():  persistent                     false
[0.000] initConfigParams():  log-file                       "/home/achim/mnt/Electronik/Pflamiku/stm_waage/2019-01-13-pflamiku_3er_fsm_atollic/Debug/st-link_gdbserver_log.txt"
[0.000] initConfigParams():  log-level                      31
[0.000] initConfigParams():  port-number                    61234
[0.000] initConfigParams():  verbose                        true
[0.000] initConfigParams():  refresh-delay                  15
[0.000] initConfigParams():  verify                         true
[0.000] initConfigParams():  swd                            true
[0.000] initConfigParams():  swo-port                       61234
[0.000] initConfigParams():  cpu-clock                      8000000
[0.000] initConfigParams():  swo-clock-div                  128
[0.000] initConfigParams():  initialize-reset               false
[0.000] initConfigParams():  debuggers                      false
[0.000] initConfigParams():  serial-number                  "303030303030303030303031"
[0.000] initConfigParams():  apid                           0
[0.000] initConfigParams():  attach                         false
[0.000] initConfigParams():  shared                         false
[0.000] initConfigParams():  erase-all                      false
[0.000] initConfigParams():  memory-map                     ""
[0.000] initConfigParams():  ext-memory-loaders             false
[0.000] initConfigParams():  extload                        ""
[0.000] initConfigParams():  stm32cubeprogrammer-path       "/opt/Atollic_TrueSTUDIO_for_STM32_x86_64_9.2.0/Servers/STM32CubeProgrammer/bin"
[0.000] initConfigParams():  temp-path                      ""
[0.000] initConfigParams():  preserve-temps                 false
[0.000] initConfigParams():  licenses                       false
[0.000] initConfigParams():  ignore-rest                    false
[0.000] initConfigParams():  version                        false
[0.000] initConfigParams():  help                           false
[0.000] initConfigParams():  Configuration flags end
[0.000] init():  STMicroelectronics ST-LINK GDB server. Version 5.1.0
Copyright (c) 2018, STMicroelectronics. All rights reserved.
[0.011] Device_Initialise():  Device firmware update for SWD mode support available
[0.011] initServerContext(): 
Error in initializing ST-LINK device.
Reason: [0.011] initServerContext():  ST-LINK firmware upgrade required. Please upgrade the ST-LINK firmware using the upgrade tool.


this is the what ever * from the atollic log file


That is what i have

Code: Select all

[491523.064704] usb 9-2: new full-speed USB device number 13 using ohci-pci
[491523.363814] usb 9-2: New USB device found, idVendor=0483, idProduct=3748
[491523.363822] usb 9-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[491523.363826] usb 9-2: Product: STM32 STLink
[491523.363829] usb 9-2: Manufacturer: STMicroelectronics
[491523.363832] usb 9-2: SerialNumber: QÿtQ\xc2\x82TT'\xc2\x87


Code: Select all

 st-info --probe
Found 1 stlink programmers
 serial: 513f7406513f54542719063f
openocd: "\x51\x3f\x74\x06\x51\x3f\x54\x54\x27\x19\x06\x3f"
  flash: 32768 (pagesize: 128)
   sram: 8192
 chipid: 0x0425
  descr: L0x Category 2 device
Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Mon Jan 14, 2019 9:20 am

if i use STLinkUtility to reflash the STLink i got the following error

Code: Select all

java -jar STLinkUpgrade.jar
[code]libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/009/015: No such file or directory
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [_get_usbfs_fd] File doesn't exist, wait 10 ms and try again
libusb: error [_get_usbfs_fd] libusb couldn't open USB device /dev/bus/usb/009/018: No such file or directory
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind[/code]


i removed the 2 jumpers which connect the STLink to the STM32F411
and restarted the update utility and suddenly after a few updates it works

Code: Select all

[532336.204676] sd 8:0:0:0: [sde] Attached SCSI removable disk
[532420.817924] usb 9-2: USB disconnect, device number 23
[532441.955141] usb 9-2: new full-speed USB device number 24 using ohci-pci
[532442.234173] usb 9-2: New USB device found, idVendor=0483, idProduct=374b
[532442.234181] usb 9-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[532442.234185] usb 9-2: Product: STM32 STLink
[532442.234188] usb 9-2: Manufacturer: STMicroelectronics
[532442.234191] usb 9-2: SerialNumber: 066AFF494851877267065831
[532442.294287] usb-storage 9-2:1.1: USB Mass Storage device detected
[532442.294496] scsi host8: usb-storage 9-2:1.1
[532442.296138] cdc_acm 9-2:1.2: ttyACM0: USB ACM device
[532443.302285] scsi 8:0:0:0: Direct-Access     MBED     microcontroller  1.0  PQ: 0 ANSI: 2
[532443.302599] sd 8:0:0:0: Attached scsi generic sg5 type 0
[532443.312266] sd 8:0:0:0: [sde] 1096 512-byte logical blocks: (561 kB/548 KiB)
[532443.318244] sd 8:0:0:0: [sde] Write Protect is off
[532443.318251] sd 8:0:0:0: [sde] Mode Sense: 03 00 00 00
[532443.324166] sd 8:0:0:0: [sde] No Caching mode page found
[532443.324168] sd 8:0:0:0: [sde] Assuming drive cache: write through
[532443.404144] sd 8:0:0:0: [sde] Attached SCSI removable disk


so my board is back again.

Code: Select all

but the reason why this happens is unsolved


because of working well with SW4STM AC6 i assume
some very bad configurations in Atollic trueStudio
like windows path \ :!:

is there a good documented tutorial for configuring the Atollic trueStudio debuger on a LINUX machine :?:
Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Mon Jan 14, 2019 10:56 am

so problem is back again

i started atollic -> ok
now it works to upload and debug a projekt.
after this i stopped debugger, disconnected the nucleo board

and after reconnecting i got this error again.

Code: Select all

[539253.809287] usb 9-2: new full-speed USB device number 30 using ohci-pci
[539254.098380] usb 9-2: New USB device found, idVendor=0483, idProduct=374b
[539254.098388] usb 9-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[539254.098392] usb 9-2: Product: STM32 STLink
[539254.098395] usb 9-2: Manufacturer: STMicroelectronics
[539254.098398] usb 9-2: SerialNumber: 066AFF494851877267065831
[539254.100640] usb 9-2: can't set config #1, error -62

Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:

User avatar
artbody
Posts: 18
Joined: Tue Jan 01, 2019 7:07 pm
Location: Germany
Contact:

Re: Error: Could not verify ST device

Postby artbody » Mon Jan 14, 2019 11:06 am

the trick with removing the jumpers didn't work any more
:?
STLinkUtil gives

Code: Select all

STLinkID :Unexpected_SN_Format

Code: Select all

 java -jar /opt/stm32/stsw-link0/AllPlatforms/STLinkUpgrade.jar
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action unbind
libusb: error [udev_hotplug_event] ignoring udev action bind
libusb: error [udev_hotplug_event] ignoring udev action bind

Linux artbody 4.14.83-gentoo #1 SMP Mon Dec 3 23:46:25 CET 2018 x86_64 AMD FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux
:mrgreen:


Return to “Atollic TrueSTUDIO tool discussions”

Who is online

Users browsing this forum: No registered users and 2 guests