MATLAB Answers

Why do I get an error related to openOCD when I use the support package for ST Discovery Board and perform a PIL in simulink 8.2 (R2013b)?

1 view (last 30 days)
Why do I observe the following error message when I try to simulate the 'stm32f4discovery_pil_block' model in PIL mode for the ST Discovery board?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 11 May 2021
Edited: MathWorks Support Team on 11 May 2021
This issue is observed because the ST Link USB driver for the Discovery board  is not installed. One way to check if it is correctly installed (on a Windows 7 machine) would be:
- Ensure the device is switched on through the mini USB connection
- Go to Control Panel->Device Managers->STM32 ST Link->Properties
- if there are any issues, it should say the 'Device driver is not installed'.
To resolve this, 
1. Download the ST link device driver for your platform from here:
2. Install the device drivers. During installation, note the path where the drivers are installed. For example:
C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK_USB_V2_Driver
3. Now go back to STM32 ST Link -> Properties in Device Manager and select 'update driver'.
4. Manually provide the installation path for the driver.
Once you have updated the driver, you should be able to run the PIL simulation fine.

More Answers (0)


No tags entered yet.




Community Treasure Hunt

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

Start Hunting!

Translated by