Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


several projects with same drivers

Hi!

How is the best way to create several projects that share the same Drivers/libraries?
Assuming that the project tree is composed of 3 different sub-projects:
/Project1
/Project2
/Project3
/Drivers

I guess I should play with the include and library paths in: Properties -> C/C++ Build -> Settings -> MCU GCC Compiler -> Includes.
So all projects (1, 2 and 3) shall include the correct path to the upper “Drivers” folder.

Is there any other recommended way?
I tried to do something as explained before but for some reason the drivers were not found.

Regards!
yuroscm

France

Hi,

You should create a Static Library project for the same board/MCU with your drivers and three application projects for your applications. All projects should be created by importing the firmware libraries as static external libraries.

In this project create two folders: inc for header files and src for source files; then in Project >> Properties >> C/C++ General >> Paths and Symbols >> Includes add (for all languages and configuration) the workspace path to your inc directory (You can also use the ProjDirPath Eclipse variable by typing ${ProjDirPath}/inc in the Directory field of the Add dialog)

Then, for each application project, go in Project >> Properties >> C/C++ General >> Paths and Symbols >> References and select the library project created first. As the include files are not in the root folder of the library project you must also go in Project >> Properties >> C/C++ General >> Paths and Symbols >> Includes and add (for all languages and configurations) the workspace path to the inc directory of your library

Then when you build your applications SW4STM32 should automatically build first your library, then your application, linked with your library.

Hope this helps,

Bernard (Ac6)


Hi Bernard,

Thanks for your response. Before I read your suggestion I achieved to use the same drivers as external folders by changing Project >> Properties >> C/C++ General >> Paths and Symbols >> Includes in all the three projects. Basically adding ../ to the current path I was using. That applies for all languages and configuration. Besides (and this is what I didn’t do when it failed) I had to add the source location manually in Project >> Properties >> C/C++ General >> Paths and Symbols >> Source Location. Then it worked so I am currently using the same folder for the three projects. I hope this can be useful for other users too.

Anyway, I’ll try to implement the static libraries you mentioned as soon as I have time for that. Because it looks like a better way to keep track of external libraries.

Thanks for the support!
yuroscm


Hi Bernard,

I finally followed your suggested steps and it works.
Thank you

Best regards
yuroscm