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


C++ Project for System Workbench

I have a project generated from STM32CubeMX for STM32F439x and I was able to compile the code and run with system workbench. Now, I would like to include C++ files into the project. When I add any .cc or .cpp file, I don’t see the make command invoking the call for the newly added file.
Is there any special procedure that you have to do in order to support C++ files? Has anyone compiles C++ files with System Workbench?
I tried converting main.c to main.cpp and the linker can’t link the main function ( I am assuming since the file isn’t being compiled by gcc?)
Thanks in advance!


-Rup

I had the same problem: my cpp files were not compiled.
I found that the file was not compiled because while importing c++ files, the compiler is not automatically set as it is for C files.
To correct this, you have to select your cpp file in the project explorer, right click -> Properties -> C/C++ build -> Tool chain Editor -> Select tool
Here select “MCU G++ Compiler” instead of “NO TOOL”

Once done, on my side, the workbench now tries to compile the file but I have no compilation errors:
cc1plus: error: invalid option `thumb’
cc1plus: error: invalid option `float-abi=soft’
myfile.cpp:1: warning: -ffunction-sections may affect debugging on some targets

and I don’t know yet why?

Hmm, interesting. Thanks for the tip.

I have MCU G++ added, though when I look at the workbench settings, looks like it is grayed out.

Also, once the G++ is added, I would expect on the tool settings to have MCU C++ Compiler options for c++, just like what you would expect for c.

Below are the screenshots I took.
Eclipss Tools GPP1

ECLPISE GPP 2

ECLPISE GPP 3

Notice there is no G++ compiler and linker options, under tool settings :-(


Hi everyone,

Converting C project to C++ project is not supported yet. However i found a trick to manually do it.
In the project directory, you should find a “.project” file. Add “org.eclipse.cdt.core.ccnature” under the “natures” parent element, then save the changes.
The project has to be refreshed (or close then re-open).

Under the project properties, you should find the G++ settings :

Convert C C++

Hope it help you.

Kevin.


Thanks. This workaround allows me to compile.

Nevertheless, I had to redefine the include paths (included the ones of the HAL driver) and the preprocessor options “USE_HAL_DRIVER” and “STM32F401xE” (in my case) via the following path(C/C++ General -> Paths and Symbols -> Symbols-> Gnu C++.


Kevin,
The workaround also worked for me too! Like uncommonmanu said, I had to add the path and symbols, also add the right linker file since the g++ linker was pointing to some default *.ld file.
I was able to create a dummy c++ test class and compile and run with the stmf439xx micro. Can’t wait to port our project from IAR to gcc. Goodbye 3K+ compiler license fees :-)

-Rup