stlink: Unable to flash any Nucleo board

I am unable to flash any Nucleo board using version 1.6.1 or the current dev version while the same time version 1.6.0 works just fine. Is it possible I screwed up the build? But build is so simple that it is nearly impossible to break anything. The only thing I did differently: I used cmake which comes with VS Studio but I do not see how this could cause a problem. Version 1.6.0 built the same way works fine.

Boards tested: Nucleo-F303K8, Nucleo-F767ZI, Nucleo-F746ZG, DISCO-STM32F769NI Windows 10.0.19041

st-flash 1.6.1
libusb: info [cache_config_descriptors] could not access configuration descriptor 1 (dummy) for 'USB\VID_045E&PID_07C6\000001000000': [31] A device attached to the system is not functioning.
2020-07-28T22:38:40 WARN common.c: unknown chip id! 0x1a
Failed to connect to target
st-flash 1.6.0
2020-07-28T22:36:19 INFO common.c: Loading device parameters....
2020-07-28T22:36:19 INFO common.c: Device connected is: F76xxx device, id 0x10016451
2020-07-28T22:36:19 INFO common.c: SRAM size: 0x80000 bytes (512 KiB), Flash: 0x200000 bytes (2048 KiB) in pages of 2048 bytes
2020-07-28T22:36:19 INFO common.c: Attempting to write 36812 (0x8fcc) bytes to stm32 address: 134217728 (0x8000000)
Flash page at addr: 0x08008000 erasedEraseFlash - Sector:0x1 Size:0x8000 
2020-07-28T22:36:19 INFO common.c: Finished erasing 2 pages of 32768 (0x8000) bytes
2020-07-28T22:36:19 INFO common.c: Starting Flash write for F2/F4/L4
2020-07-28T22:36:19 INFO flash_loader.c: Successfully loaded flash loader in sram
enabling 32-bit flash writes
size: 32768
size: 4044
2020-07-28T22:36:20 INFO common.c: Starting verification of write complete
2020-07-28T22:36:20 INFO common.c: Flash written and verified! jolly good!
STM32 ST-LINK CLI v3.5.0.0
STM32 ST-LINK Command Line Interface

ST-LINK SN: 066BFF3035344E5043141238
ST-LINK Firmware version: V2J37M26
Connected via SWD.
SWD Frequency = 4000K.
Target voltage = 3.3 V
Connection mode: Normal
Reset mode: Hardware reset        
Device ID: 0x451 
Device flash Size: 2048 Kbytes
Device family: STM32F76x
Loading file...
Flash Programming:
  File : C:\Test Projects\STM32F767ZI/BUILD/NUCLEO_F767ZI/GCC_ARM-DEBUG/STM32F767ZI.bin
  Address : 0x08000000
Memory programming...
██████████████████████████████████████████████████ 100%
Memory programmed in 1s and 250ms.
Verification...OK
Programming Complete.
Programmed memory Checksum: 0x0034D2E0

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 26 (14 by maintainers)

Most upvoted comments

e:\test-st\stlink-git\build\Visual Studio Community 2019 Release - x86-Release\bin>st-info.exe --probe
Found 1 stlink programmers
  version:    V2J29S18
  serial:     0672FF485550755187220729
  flash:      1048576 (pagesize: 2048)
  sram:       327680
  chipid:     0x0449
  descr:      F7xx

e:\test-st\stlink-git\build\Visual Studio Community 2019 Release - x86-Release\bin>st-flash --reset write ./nucleo-h743zi.bin 0x8000000
st-flash 1.6.1-302-g6993491
2021-04-23T11:56:51 INFO common.c: F7xx: 320 KiB SRAM, 1024 KiB flash in at least 2 KiB pages.
file ./nucleo-h743zi.bin md5 checksum: 44fd8f817e9273d9abca8cb54f14353, stlink checksum: 0x002f3f1b
2021-04-23T11:56:51 INFO common.c: Attempting to write 30700 (0x77ec) bytes to stm32 address: 134217728 (0x8000000)
EraseFlash - Sector:0x0 Size:0x8000 2021-04-23T11:56:51 INFO common.c: Flash page at addr: 0x08000000 erased
2021-04-23T11:56:51 INFO common.c: Finished erasing 1 pages of 32768 (0x8000) bytes
2021-04-23T11:56:51 INFO common.c: Starting Flash write for F2/F4/F7/L4
2021-04-23T11:56:51 INFO flash_loader.c: Successfully loaded flash loader in sram
2021-04-23T11:56:51 INFO flash_loader.c: Clear DFSR
2021-04-23T11:56:51 INFO common.c: enabling 32-bit flash writes
2021-04-23T11:56:52 INFO common.c: Starting verification of write complete
2021-04-23T11:56:52 INFO common.c: Flash written and verified! jolly good!

Test with stm32f746-disco, it works.

Is this the latest commit?

yes, it is latest develop