cancel
Showing results for 
Search instead for 
Did you mean: 

STM32-MAT/TARGET. Tons Of Bugs: Incorrect generation of projects for SW4STM32 and TrueSTUDIO

Dima Sagalov
Associate II
Posted on February 26, 2018 at 04:03

Environment:

Windows10 (x64)

Matlab R2017a

STM32-MAT/TARGET-v4.4.2

STM32CubeMX-v4.24.0

STM32Cube MCU Package for STM32F0 Series -v1.9.0

STM32Cube MCU Package for STM32F3 Series -v1.9.0

SW4STM32-v2.4

TrueSTUDIO-v9.0.0

I begin with the first problem that I encountered: the projects generated by STM32-MAT / TARGET ''cling'' not all of the directories �include� and �source�.

The problem manifests itself for both the IDE, SW4STM32 and TrueSTUDIO, but a little differently.

With SW4STM32 projects, everything is relatively simple - the code generator does not add the <project_name>/Src path to the project files. It is necessary to prescribe manually.

With the project TrueSTUDIO is going through more strange things: the contents of the Drivers/STM32F3xx_HAL_Driver directory are not completely visible through the Project Explorer:

0690X00000609kTQAQ.png

The files in this directory are ignored by the compiler.

And, it looks like the problem is in the ''.project'' file.

If you compare the ''pure'' TrueSTUDIO project generated with STM32CubeMX, and the project generated with STM32-MAT / TARGET + STM32CubeMX, you see that in the second case the following lines are added to the file ''.project'':

<link>

<name>Application</name>

<type>2</type>

<locationURI>virtual:/virtual</locationURI>

</link><link>

<name>MATLAB</name>

<type>2</type>

<locationURI>virtual:/virtual</locationURI>

</link><link>

<name>Drivers</name>

<type>2</type>

<locationURI>virtual:/virtual</locationURI>

</link><link>

<name>Drivers/CMSIS</name>

<type>2</type>

<locationURI>virtual:/virtual</locationURI>

</link><link>

<name>MATLAB/incorrect_project_truestudio.c</name>

<type>1</type>

<location>D:/stm32_mat_target_fixme/incorrect_project/incorrect_project_truestudio/incorrect_project_truestudio/Src/incorrect_project_truestudio.c</location>

</link>

If you delete them, the Drivers/STM32F3xx_HAL_Driver directory becomes visible through the Project Explorer and is no longer ignored by the compiler. But, again, you have to manually assign the paths <project_name>/Inc and <project_name>/Src.

#stm32-mat/target-matlab #simulink
0 REPLIES 0