STM32F411 - STLINK - OpenOCD program/debug impossible
Dear ST support,
maybe the issue has already been found but could NOT found the ticket.
Well, I can’t program / debug my target STM32F411RE with st-link V2 and openOCD whereas it works correctly with ST-link utility.
OpenOCD output is the following:
Open On-Chip Debugger 0.9.0-dev-00415-g2d4ae3f-dirty (2015-04-22-11:10)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport “hla_swd”. To override use ‘transport select ‘.
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
none separate
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 v21 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.209430
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting ‘gdb’ connection on tcp/3333
Info : device id = 0x10006431
Info : flash size = 512kbytes
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x0f00f1b8 msp: 0x8000f8d0
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x0f00f1b8 msp: 0x8000f8d0
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x0f00f1b8 msp: 0x8000f8d0
Info : Padding image section 0 with 51040 bytes
Error: timeout waiting for algorithm, a target reset is recommended
Error: error executing stm32x flash write algorithm
Error: flash write failed = 00000040
Error: error writing to flash at address 0x08000000 at offset 0x00000000
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 0x0f00f1b8 msp: 0x8000f8d0
I use the following script associated to the debug configuration:
””“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”
- This is an STM32F411E
source find interface/stlink-v2.cfg
set WORKAREASIZE 0x20000
source find target/stm32f4x_stlink.cfg
- use hardware reset, connect under reset
reset_config srst_nogate
””“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”“”
Remark:
the loading process seems to start correctly and STLINK V2 led blinks red and green as usual. After something like about 5 seconds, loading fails.
Output of ST link Utility FYI:
05:30:05 : Connected via SWD.
05:30:05 : Connection mode : Connect Under Reset.
05:30:05 : Debug in Low Power mode enabled.
05:30:05 : Device ID:0x431
05:30:05 : Device flash Size : 512 KBytes
05:30:05 : Device family TM32F411xE
05:30:37 : stm32_F4.bin opened successfully.
05:31:11 : Flash memory programmed in 13s and 770ms.
05:31:11 : Verification...OK
Do you have an idea about this ?
Thanks for your help,
regards,
Sylvain