cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MATdemos (Test_PIL_IIR_Filter.mdl) Simulink problems

Koichi Sasaki
Associate
Posted on October 25, 2017 at 16:46

Hello, I'm having a problem getting the STM32-MAT/TARGET

 to run using STM32 nucleo-F401RE.

I'm trying to run PIL processing using the document which is obtained from following web site.

/external-link.jspa?url=http%3A%2F%2Fwww.st.com%2Fja%2Fdevelopment-tools%2Fstm32-mat-target.html

 

I'm using Matlab2017a for testing processor in the loop IIR Filter and installing following programs on the work space.

  0690X00000608TkQAI.png

and then, clicked run simulation green button and generated some codes.

After that, I set PC COM Port, selected the type of STM32(STM32F401RETx) and selected STM32 COM Port.

0690X00000608iaQAA.png

then, I selected the SW4STM32 as a toolchain and clicked continue without checking ''STM32CubeMx IDE not opened''.

And I got the display of STM32CubeMX IIR_Filter_int32.ioc. So, I pushed ''generate source code based on user settings ''.

0690X00000608bFQAQ.png

And then, I could generate following files. I'm using System Workbench for STM32.

0690X00000608kkQAA.png

However, if I push the button for Building project, The system says that there are some errors in the program.

It seems that there is problem in subdir.mk.

0690X00000608l9QAA.png0690X00000608kuQAA.png

It also says ''C:/Users/k.sasaki/Documents/MATLAB/IIR_Filter_int32_PIL/IIR_Filter_int32/Inc/xil_interface_lib.h:12:29: fatal error: xil_error_codes.h: No such file or directory'' and ''MATLAB/subdir.mk:101: recipe for target 'MATLAB/codeinstr_data_stream.o' failed make: *** [MATLAB/codeinstr_data_stream.o] Error 1''

I don't know why the system says these error because I'm just following the reference of the program.

Are there anyone who have some solutions for these problem?

 @

I really need your help.

#simulink-stm32f4-stm32-mat #stm32-mat/target-matlab #stm32-mat/target #simulink
3 REPLIES 3
Sam Q.
Associate III
Posted on November 07, 2017 at 16:34

Hi guy,

I also have problem getting it started. Could you tell me which PC communication port you used for this test?

According to the instruction, a port named 'Prolific USB-to-Serial Comm Port' is used for this demo. Does it mean that I have to connet the board with PC by using another special cable, although the board has already been connected with the PC by using a USB cable? What did you do?

Thanks a lot!

GPrel
Associate

You shall include all the missing header files from MATLAB installation folder.

For example xil_error_codes is found on:

c:\Program Files\MATLAB\R2017a\toolbox\rtw\targets\pil\c\

Note: I have Matlab 2017

If you use System Workbench for STM32:

- right click on the project Properties

- C/C++ Build -> Settings -> MCU GCC Compiler -> Includes and add the path of all header files in there.

Good luck!

Cyril FENARD
ST Employee

Hi @Koichi Sasaki​ ]​ ,

The version 5.1.0 of STM32-MAT/TARGET has just been released at the end of July 2019.

Be aware that a lot of changes were involved in this release (in detail, alignment with STM32CubeMX version 5.1.0 and Matlab 2018b).

While working on this version the followings tests were successful for PIL:

 - F429ZITx @ 180 Mhz, USART1: OK

 - L476RG  @ 80 Mhz, USART2: OK

It is strongly recommended to upgrade to the most recent version of STM32-MAT/TARGET.

Regards.

Cyril

PS:

As far the toolchain is concerned there are known issues with eclipse-based tools, especially for include paths and build resources that can be defined as excluded.

It is an issue with the project generator that is used.

In the current situation, in the project generated for these types of IDEs, check the include parameters for the paths and verify that the build resource is also enabled.

Sorry for the disturbance.