2022-10-10 04:50 AM
2022-10-10 05:21 AM
Sorry what's the question?
With .cpp / C++ builds watch for name mangling and related linker issues. Also initialization of constructors prior to external memories being viable.
2022-10-10 06:01 AM
it work well if the suffix-name of main.c and stm32f3xx_it.c were set .cpp.
this is what the developers need.
I have given the advice times.
2022-10-10 06:07 AM
let me clarify my questions again.
i want to develope with C++.
and STM32cubeide has the option to use c++ as major user developing language.
user's c++ code will mixed with c in main.c and stm32f3xx_it.c. but this want work unless main.c and stm32f3xx_it.c 's suffix name change to .cpp.
2022-10-10 06:32 AM
For the ISRs in stm32fxxx_it.c to work correctly, it's necessary to declare them as C functions. Same for some components of main.c. It's easier to keep these files as C rather than C++.
2022-10-10 06:33 AM
if so,how to use c++?
2022-10-10 06:46 AM
in a C++ module, declare a single function to be called by main as extern "C", this funcion will provide the interfce between main() and C++ code. It will call the other C++ stuff. Do the same for interrupts handled in C++.
2022-10-10 06:54 AM
how would you use c++ class in the main.c file?
2022-10-10 06:54 AM
c++ is compatible with c,but c is not with c++.
2022-10-19 12:18 PM