2026-01-24 12:59 AM
It is very inconvenient to have regenerated C files in C++ project.
Problem is not main.c only, *_it.c as well. In C++ project one have to call methods of class from interrupt handlers.
It is not possible to make directly from *_it.c. Indirect call chain is lost of time.
I renamed main.c to main.cpp in C++ project, made call from main.cpp to method of class. All is OK.
Flashed microcontroller with main.cpp, all is working.
ST done great work to support C++. And made it useles by generating new code to C files. Why not to generate code in C++ project to CPP files?
Solved! Go to Solution.
2026-01-30 8:27 AM
Please understand that the purpose of CubeMX is not to write applications and steal jobs of software developers. This is for Claude, Cursor and their AI friends. CubeMX is for rapid prototyping and evaluation. Exactly like Nucleos and other ST eval boards do not replace or compete with hardware designers.
You can feed the project generated by CubeMX into your favorite AI and ask it to transform it to whatever.
Hope this helps.