Hey, thanks for last quick help ;))
I have already bought ST-Link V2 and I have some new troubles. I tried to upload LIBOPENCM3-BLINK and this worked but I got 3 failed uploads and only one success. I would like to know what happens and if it will work in my own programs.
Processing disco_f407vg (platform: ststm32; framework: libopencm3; board: disco_f407vg)
-----------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 6.1.0 > ST STM32F4DISCOVERY
HARDWARE: STM32F407VGT6 168MHz, 128KB RAM, 1MB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES:
- framework-libopencm3 1.1.0
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Checking size .pio\build\disco_f407vg\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 0.0% (used 0 bytes from 131072 bytes)
Flash: [ ] 0.1% (used 752 bytes from 1048576 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\disco_f407vg\firmware.elf
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Warn : UNEXPECTED idcode: 0x1ba01477
Error: expected 1 of 1: 0x2ba01477
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked
*** [upload] Error 1
=========================================================== [FAILED] Took 1.00 seconds ===========================================================
Processing disco_l152rb (platform: ststm32; framework: libopencm3; board: disco_l152rb)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 6.1.0 > ST STM32LDISCOVERY
HARDWARE: STM32L152RBT6 32MHz, 16KB RAM, 128KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES:
- framework-libopencm3 1.1.0
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Checking size .pio\build\disco_l152rb\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 0.0% (used 0 bytes from 16384 bytes)
Flash: [ ] 0.5% (used 604 bytes from 131072 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, jlink, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\disco_l152rb\firmware.elf
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Warn : UNEXPECTED idcode: 0x1ba01477
Error: expected 1 of 1: 0x2ba01477
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked
*** [upload] Error 1
=========================================================== [FAILED] Took 1.00 seconds ===========================================================
Processing disco f303vc (platform: ststm32; framework: libopencm3; board: disco_f303vc)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 6.1.0 > ST STM32F3DISCOVERY
HARDWARE: STM32F303VCT6 72MHz, 48KB RAM, 256KB Flash
DEBUG: Current (stlink) On-board (stlink) External (blackmagic, jlink)
PACKAGES:
- framework-libopencm3 1.1.0
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Checking size .pio\build\disco f303vc\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 0.0% (used 0 bytes from 49152 bytes)
Flash: [ ] 0.3% (used 712 bytes from 262144 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, jlink, mbed, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\disco f303vc\firmware.elf
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Warn : UNEXPECTED idcode: 0x1ba01477
Error: expected 1 of 1: 0x2ba01477
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked
*** [upload] Error 1
=========================================================== [FAILED] Took 0.93 seconds ===========================================================
Processing genericSTM32F103C8 (platform: ststm32; framework: libopencm3; board: genericSTM32F103C8)
Verbose mode can be enabled via -v, --verbose
option
CONFIGURATION: Redirecting...
PLATFORM: ST STM32 6.1.0 > STM32F103C8 (20k RAM. 64k Flash)
HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash
DEBUG: Current (blackmagic) External (blackmagic, jlink, stlink)
PACKAGES:
- framework-libopencm3 1.1.0
- tool-dfuutil 1.9.200310
- tool-openocd 2.1000.190707 (10.0)
- tool-stm32duino 1.0.2
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder → Library Dependency Finder (LDF) — PlatformIO latest documentation
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 0 compatible libraries
Scanning dependencies…
No dependencies
Building in release mode
Checking size .pio\build\genericSTM32F103C8\firmware.elf
Advanced Memory Usage is available via “PlatformIO Home > Project Inspect”
RAM: [ ] 0.0% (used 0 bytes from 20480 bytes)
Flash: [ ] 1.0% (used 684 bytes from 65536 bytes)
Configuring upload protocol…
AVAILABLE: blackmagic, dfu, jlink, serial, stlink
CURRENT: upload_protocol = stlink
Uploading .pio\build\genericSTM32F103C8\firmware.elf
xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
Licensed under GNU GPL v2
For bug reports, read
OpenOCD: Bug Reporting
debug_level: 1
hla_swd
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x0800021c msp: 0x20005000
** Programming Started **
** Programming Finished **
** Verify Started **
** Verified OK **
** Resetting Target **
shutdown command invoked
========================================================== [SUCCESS] Took 1.16 seconds ==========================================================
Environment Status Duration
disco_f407vg FAILED 00:00:00.1000
disco_l152rb FAILED 00:00:00.996
disco f303vc FAILED 00:00:00.928
genericSTM32F103C8 SUCCESS 00:00:01.161
===================================================== 3 failed, 1 succeeded in 00:00:04.085 =====================================================
The terminal process terminated with exit code: 1
Terminal will be reused by tasks, press any key to close it.
Main problem looks like this:
Warn : UNEXPECTED idcode: 0x1ba01477
Error: expected 1 of 1: 0x2ba01477
in procedure ‘program’
** OpenOCD init failed **
shutdown command invoked
I don’t know what to do this. I tried change stm32f1x.cfg file but it made it worse.
btw. Is it normal in PlaformIO home in category devices i can’t see my st-link adapter?
[I am working on Win 10, my board is connected via ST-Link v2, bluepill]
Thanks!