Unable to download program to STM32F4 Discovery Board using OpenOCD-0.8.0 and simulink

9 vues (au cours des 30 derniers jours)
Hello together,
I use Matlab-R2015b with Hardware Support Packages for STM32F4 Discovery Board. I'm not able to download program to STM32F4 Discovery Board using OpenOCD and simulink. I got the following error-message:
### Launching openOCD server "C:\MATLAB\SupportPackages\R2015b\openocd-0.8.0\bin\openocd-0.8.0.exe" -f board/stm32f4discovery.cfg:
Unable to launch the openOCD debugger to download the executable to target. Check the following:
1. Are the 'ST-Link/V2' drivers installed properly?
2. Did you connect the STM32F4-Discovery board to the host computer using a USB cable?
3. Re-connect the STM32F4-Discovery board to the host machine and check that the drivers are detected.
For more information, look in the logfile generated by openOCD: C:/temp/stm32f4discovery_pb_led_ert_rtw/mw_openocd_log.txt.
Content of mw_openocd_log.txt:
Open On-Chip Debugger 0.8.0 (2014-04-28-08:39)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : This adapter doesn't support configurable speed
Error: open failed
in procedure 'transport'
in procedure 'init'
I installed the driver for ST-Link and ST-Link V2. I can download the program to the board using ST-Link Ultility or Keil.
Could someone please help me? Thank you in advance!

Réponses (4)

Ashot Melkonyan
Ashot Melkonyan le 24 Mai 2016
Hi Florence, yes I solved the issue. The Problem in my case was the rihght Installation of the OpenOCD Version. And we have to correct the wrong path references in the configuration files. Matlab assumes the Version of OpenOCD 6, but the right Version is openocd-0.8.0. so you have to manually correct this. Generally try to run OpenOCD from the command line "- standalone" then let matlab to run it.
Regards, Ashot
  1 commentaire
Florence Zhu
Florence Zhu le 25 Mai 2016
Thanks, in my case I followed the following steps from Mathwork input to get the problem fixed: (1) Go to the folder where your support packages are installed and go to the openocd-0.8.0 folder. For example, the default is C:\MATLAB\SupportPackages\R2015b\openocd-0.8.0 (2) Open scripts\board\stm32f4discovery.cfg (3) Change source [find interface/stlink-v2.cfg] to source [find interface/stlink-v2-1.cfg] (4) Save and restart MATLAB. Try the example again.

Connectez-vous pour commenter.


Ashot Melkonyan
Ashot Melkonyan le 22 Avr 2016
Hi QuangHuy and community, I got the same Problem, is there any solution?

jano song
jano song le 1 Juin 2016
Modifié(e) : Walter Roberson le 1 Juin 2016
thank you so much,I solved my issue.

Hosam
Hosam le 19 Déc 2016
Hello together,
I use Matlab-R2014a with Hardware Support Packages for STM32F4 Discovery Board. I'm not able to download program to STM32F4 Discovery Board using OpenOCD and simulink. I got the following error-message:
### Launching openOCD server C:\MATLAB\SupportPackages\R2014a\openocd-0.6.1/bin/openocd-0.6.1.exe -f board/stm32f4discovery.cfg: Following error captured during invoking of openOCD server:
Open On-Chip Debugger 0.6.1 (2012-10-07-10:34) Licensed under GNU GPL v2 For bug reports, read <http://openocd.sourceforge.net/doc/doxygen/bugs.html> adapter speed: 1000 kHz srst_only separate srst_nogate srst_open_drain Info : clock speed 1000 kHz Error: open failed in procedure 'transport' in procedure 'init'
"### Done invoking postbuild tool." ### Successful completion of build procedure for model: stm32f4discovery_led4
I installed the driver for ST-Link and ST-Link V2. I can download the program to the board using ST-Link Ultility or Keil.
Could someone please help me? Thank you in advance!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by