cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MATLAB TARGET, structure of generated project

Martin Dvoracek
Associate II
Posted on May 14, 2018 at 12:25

Hi,

I testing STM32-MAT/TARGET. I started with development of new project in MATLAB SIMULINK. Actually I have trouble with genarating of the project for SW4STM. Generated project from my simulink model has structure left on attached picture, bud the structure should by like on the right side of the picture (Application, User, Drivers..).

When I started with my project the structure was similar like the right one and everything worked fine. Bud I had some troubles with generated code, a made modified some parameter in Model configuration parameters. And then generated project structure was changed. Why? Which parameteres affected this? I tryed to creat new project but the generated project's structure is like the left one.

I made some algorithms test with mormal and external modes.

The problem with project structure on the left is that I have to manually add source files and headr files for MATLAB code to Path and Symbols to compile the project. In external mode about 10files has to be manually added every regeneration of the project, it is very time consumming.

0690X0000060Ke8QAE.png

#stm32-mat/target-matlab #simulink
3 REPLIES 3
Posted on June 27, 2018 at 08:47

Hi, Martin Dvoracek

Before you build the project, have you try do like process from in instruction?

0690X0000060PHZQA2.jpg

This is my EWARM workspace from external mode.

0690X0000060PHaQAM.jpg

Could you please give me more information?

If you provide a little test case if possible or at least an simulink file or project file.

Best regards,

Jonas
Associate II

Hi Martin

I am assessing the STM32 MAT/TARGET toolchain for an STM32F7 board as well. I have also selected the Atollic Truestudio IDE, since it is free and is owned by ST (so I expect full support there).

However, I am facing the same problem as you. The generated project structure is not as expected and the Truestudio compiler cannot find the files (mostly header files) in the MATLAB-specific folder, algorithm_test in your example.

I am the following toolchain:

  • MATLAB 2018a
  • Atollic TRUEstudio 9.0.1
  • STM32CubeMX 4.26.1
  • STM32MAT Target 4.4.2
  • STM32 ST-LINK Utility 4.2.0

This post is not intended to answer your problem - since I am facing exactly the same - just to let everybody know that this is a common problem for the STM32 MAT/TARGET tool with Truestudio...

Kind regards,

Jonas

Cyril FENARD
ST Employee

Hi @Martin Dvoracek​ , Hi @Jonas​ ​ ,

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.