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


How to properly convert c ++ project?

Any new solution for converting project to C++ ?

I successfully use some c++ code inside a .c file like

std::vector v = {1.2,2.3,4.5,5.6,6.7};
std::stack hp;
hp.push(“1221”);
hp.push(“test”);
hp.push(“stack”)
hp.push(” item”);
const char *data;
while( hp.size() > 0)
{
data = hp.top().c_str();
hp.pop();
USARTSendString(data);
}
USARTSendString(“\n”);

Just by changing ‘gcc’ to ‘g++’ in the project settings AND adding the flag ‘-fpermissive’

I know it is very far to be a good solution but I really need to use some C++ STL features, that’s the quick and dirty solution I found till now with the constraint that I want to keep my code in sync with CubeMX (which does not yet? generate C++ code if I’m right)


It compiles and runs on a F7...

It just makes the Eclipse indexer mad, I had hundreds of ‘unresolved symbols’ while the code compiles and links fine, I tried to find a workaround by googling a long time but nothing works, if you rename the *.c files in *.cpp files, than the indexer is happy but the code does not compile anymore for many other problems, so I just disabled the Eclipse indexer to avoid all the error messages polution but it is frustrating not to have this nice feature...

J.


France

Hi,

The simplest solution is to right-click on your project >> Convert to C++

You just have to check that your install of System Workbench for STM32 is up to date (Help >> Check for Updates....

Of course you must still name your C++ source files with a .cpp extension instead of .c; Standard C source files are still compiled by teh C compiler, only C++ source files are compiled by the C++ compiler.

Bernard (Ac6)