AnsweredAssumed Answered

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

Question asked by Dima Sagalov on Feb 26, 2018


Windows10 (x64)

Matlab R2017a



STM32Cube MCU Package for STM32F0 Series -v1.9.0

STM32Cube MCU Package for STM32F3 Series -v1.9.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:



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":
























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.