Question
STM32F4 Discovery PIL Fails
Posted on May 05, 2014 at 16:21
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:/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/PIL%20mode%20with%20STM32%20Embedded%20Target%2c%20IAR%2c%20and%20J-LINK&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F¤tviews=196
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. #pil #stm32f4 #discovery
