AnsweredAssumed Answered

STM32F4 Discovery PIL Fails

Question asked by leuser.marc on May 5, 2014
Latest reply on May 12, 2014 by reynaud.pascal
Hello everyone,

i've been experimenting with the STM32F4 Discovery Board for quite a time now and i can get the Simulink Test Models to work (Blinking LEDs, USART Echo and so on). When i try to use any of the PIL Models however the trouble begins.

Toolchain: Keil v4
Matlab Version: R2013b
OS: Windows 8.1 x64
Sidenotes: R2014a fails completely, so does automatic path determination for the toolchain in R2013b

- I have installed Matlab in the default directory (C:\Program Files\MATLAB\R2013b)
- I have installed the blocksets in the default directory (C:\Program Files(x86)\STMicroelectronics\STM32F4xx-MAT)
- I have added the folder to my MATLAB Path
- I am aware that for every Simulink Demo Project i have to adjust the path to the system target file and toolchain.

My first problems were similar to the ones reported in this thread:Click
They are now sorted out.

These are the steps that i have taken from a fresh demo folder:
- set matlab folder to STM32F4xx-MAT\STM32F4xx\STM32F4xxDemos\PIL
- open IIR_Filter_int32.mdl and change simulation mode to "Processor-in-the-loop"
- adjust system target file and toolchain path
- save IIR_Filter_int32.mdl
- open IIR_Filter_PIL_int32.mdl
- set simulation mode in IIR_FilterInt32 block to PIL
- adjust system target file and toolchain path
- save IIR_Filter_PIL_int32.mdl
- type setpref('STM32F4xx','COMPort','COM4') in matlab console
(yes, COM4 is the right one. this is the only comport i have and it's a usb->rs232 ftdi converter with 3.3V levels)
- run iir_startup.m
- Hit the run button

the code generation completes and the compiler succeeds with no errors. strangely no toolchain ever opens up to actually flash the code onto the controller. then a window pops up that lets me choose the usart and pins.

then the following messages appear in matlab:
### Communication parameters is: 115200bds, 8b, 1s, no parity, no hw control
### Preparing to start PIL simulation

after a few seconds an error window pops up giving me a model error "An installed compiler was not detected" and the rest of this known default message.

This leaves me completely clueless and since the error message is so common i can't find any useful help on the web.

Outcomes