cancel
Showing results for 
Search instead for 
Did you mean: 

When I use c++, and I modify .iot file, it doesn't generate the code anymore

William F
Associate II

To use cpp, I create the project in cpp and then I modify the name of main.c in main.cpp. This work pretty well, but when I try to update the configuration by ioc file, the code stay the same. It seems like I have to change to main.c before update to be fine. Do it exists a more easy way without modify the main extension everytime? Ty

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

CubeMX doesn't generate main.cpp. You can put your C++ code in a separate file instead, and call that from main.c. Or you can rename main.c every time. Those are your options.

 

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

2 REPLIES 2
TDK
Guru

CubeMX doesn't generate main.cpp. You can put your C++ code in a separate file instead, and call that from main.c. Or you can rename main.c every time. Those are your options.

 

If you feel a post has answered your question, please click "Accept as Solution".
Pavel A.
Evangelist III

Patient: - Doctor, when I do this, it pains!

Doctor: - Don't do this.