AnsweredAssumed Answered

How to use OpenOCD to program the STM32F469 Discovery Board?

Question asked by Matt Barclay on Oct 13, 2017
Latest reply on Mar 12, 2018 by James Murray

Hello,

 

I am trying to program the ST Discovery Demo binary on the board.  This is the pre-built file provided with STM32Cube_FW_F4_V1.16.0.  I am calling OpenOCD like this:

 

cd STM32Cube_FW_F4_V1.16.0/Projects/STM32469I-Discovery/Demonstrations/Binary

$HOME/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.16.0.201708311556/tools/openocd/bin/openocd \
-s $HOME/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.1.2.201709081530/resources/openocd/st_scripts \
-s $HOME/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.1.2.201709081530/resources/openocd/scripts \
-f st_board/stm32f469i_disco.cfg \
-c "program STM32469I-Disco_Demo_V1.2.0_FULL.hex verify reset exit"

 

OpenOCD outputs the following:

 

 

Open On-Chip Debugger 0.10.0-dev-00004-gcef2a8c-dirty (2017-08-31-14:01)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1800 kHz
adapter_nsrst_delay: 100
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v25 API v2 M v13 VID 0x0483 PID 0x374B
Info : using stlink api v2
Info : Target voltage: 3.240473
Info : Stlink adapter speed set to 1800 kHz
Info : STM32F469.cpu: hardware has 6 breakpoints, 4 watchpoints
can't read "ENABLE_LOW_POWER": no such variable
in procedure 'program'
in procedure 'init' called at file "embedded:startup.tcl", line 473
in procedure 'ocd_bouncer'

Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
can't read "ENABLE_LOW_POWER": no such variable
in procedure 'program'
in procedure 'reset' called at file "embedded:startup.tcl", line 478
in procedure 'ocd_bouncer'
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 248
in procedure 'STM32F469.cpu' called at file "embedded:startup.tcl", line 299
in procedure 'ocd_bouncer'

STM32F469.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080aeb28 msp: 0x20002c50
configuring PLL
Info : Stlink adapter speed set to 1800 kHz
adapter speed: 1800 kHz
** Programming Started **
auto erase enabled
Info : device id = 0x10006434
Info : flash size = 2048kbytes
STM32F469.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000046 msp: 0x20002c50
Warn : no flash bank found for address 90000000
wrote 786432 bytes from file STM32469I-Disco_Demo_V1.2.0_FULL.hex in 25.377024s (30.264 KiB/s)
** Programming Finished **
** Verify Started **
STM32F469.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002c50
STM32F469.cpu: target state: halted
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002c50
Error: checksum mismatch - attempting binary compare
diff 0 address 0x90000000. Was 0x00 instead of 0x99
diff 1 address 0x90000001. Was 0x00 instead of 0xa5
*** LOTS OF THESE ***
*** LOTS OF THESE ***
diff 127 address 0x9000007f. Was 0x00 instead of 0xa5
More than 128 errors, the rest are not printed.
** Verify Failed **
shutdown command invoked

 

What am I doing wrong?  Shouldn't this work?

Outcomes