Question
How to use OpenOCD to program the STM32F469 Discovery Board?
Posted on October 13, 2017 at 18:16
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 v2For bug reports, read http://openocd.org/doc/doxygen/bugs.htmlInfo : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWDadapter speed: 1800 kHzadapter_nsrst_delay: 100Info : clock speed 1800 kHzInfo : STLINK v2 JTAG v25 API v2 M v13 VID 0x0483 PID 0x374BInfo : using stlink api v2Info : Target voltage: 3.240473Info : Stlink adapter speed set to 1800 kHzInfo : STM32F469.cpu: hardware has 6 breakpoints, 4 watchpointscan't read 'ENABLE_LOW_POWER': no such variablein procedure 'program' in procedure 'init' called at file 'embedded:startup.tcl', line 473in procedure 'ocd_bouncer'Info : Stlink adapter speed set to 1800 kHzadapter speed: 1800 kHzcan't read 'ENABLE_LOW_POWER': no such variablein procedure 'program' in procedure 'reset' called at file 'embedded:startup.tcl', line 478in procedure 'ocd_bouncer' in procedure 'ocd_process_reset' in procedure 'ocd_process_reset_inner' called at file 'embedded:startup.tcl', line 248in procedure 'STM32F469.cpu' called at file 'embedded:startup.tcl', line 299in procedure 'ocd_bouncer'STM32F469.cpu: target state: haltedtarget halted due to debug-request, current mode: Thread xPSR: 0x01000000 pc: 0x080aeb28 msp: 0x20002c50configuring PLLInfo : Stlink adapter speed set to 1800 kHzadapter speed: 1800 kHz** Programming Started **auto erase enabledInfo : device id = 0x10006434Info : flash size = 2048kbytesSTM32F469.cpu: target state: haltedtarget halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x20000046 msp: 0x20002c50Warn : no flash bank found for address 90000000wrote 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: haltedtarget halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002c50STM32F469.cpu: target state: haltedtarget halted due to breakpoint, current mode: Thread xPSR: 0x61000000 pc: 0x2000002e msp: 0x20002c50Error: checksum mismatch - attempting binary comparediff 0 address 0x90000000. Was 0x00 instead of 0x99diff 1 address 0x90000001. Was 0x00 instead of 0xa5*** LOTS OF THESE ****** LOTS OF THESE ***diff 127 address 0x9000007f. Was 0x00 instead of 0xa5More than 128 errors, the rest are not printed.** Verify Failed **shutdown command invokedWhat am I doing wrong? Shouldn't this work?
#openocd #stm32f469i-disco