2015-12-07 02:51 AM
Hi,
unfortunately I am unable to get STM32-MAT/TARGET working with Simulink in PIL-mode. :( I had trouble to get code generation working with STM32-MAT-TARGET as well. I have tested it with three different MATLAB version (R2014b, R2015a, R1015b). It only works with MATLAB R2015a. R2014b has troubles finding the correct compiler and R2015b generates erroneous code, which can be fixed manually. My software stack is as follows: - Windows 10 Pro, Version 1511 - MATLAB R2015a - Keil uVision V5.16.0 - STM32CubeMX V4.11.0 - STM32-MAT/TARGET 4.2.0 Code-Generation finally works (/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/STM32F29I%20%2b%20MATLAB&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=200
). When I click ''Build Model'' on my project, a new Keil project is generated and it can be built and deployed without any error. Now I am trying to get PIL running. When I open the demo ''TEST_PIL_IIR_Filter'' and click ''Run''. I get the error ''STM32CubeMX path unknown'', although it is configured correctly. Ignoring the error, I continue and setup the communication with my COM-port. A new STM32CubeMX project is generated. After configuring the new project, I generate the code. In Keil I build and deploy the code and verify that the code is running using Keil's debugging functionality. Then I get the following error:The timeout of 10 seconds for receiving data from the rtiostream interface has been exceeded. There might be multiple reasons for this failure
Can anyone help me get this running? null2015-12-07 06:04 AM
Hi,
regarding compiler not found problem. You can modify STM32/rtw/stm32.tmf file line 68 add COMPILER_TOOL_CHAIN = default SYS_TARGET_FILE = stm32.tlc COMPILER_TOOL_CHAIN = default MAKEFILE_FILESEP = / Regarding R2014b and R2015a there is also a problem for peripheral initialization during code generation. As soon as peripheral is not initialized I think it is source of PIL pb. It is a known problem from MATLAB that has been fixed in R2015b version with a fix you can download. For releases R2014b and R2015a please see the following bugreports page:There you will find a patch to workaround the problem.Remark: Please login with you MathWorks account to see the page mentioned above and download the files. Best regards Pascal2015-12-08 01:06 AM
Thank you. I will try both. Where can I download the fix for MATLAB R2015b? I would love to work with the newest MATLAB version.
2015-12-08 01:51 AM
Peripheral initialization code generation has been fixed in R2015b.
Regards Pascal