2020-11-15 09:48 AM
Hi,
I'd like to use C++, and I had a question.
Currently my procedure is:
(a) Configure the peripherals using CubeMX (since I wish to use MX HAL) and generate code .
(b) In CubeIDE I rename the main.c file to main.cpp, and then from the project window I right-click the project name and select Convert to C++
Although that procedure initially works, the problem is that if I subsequently wish to make additional peripheral configuration changes, things get messy, because if I use CubeMX and click on Generate Code, it won't modify the existing main.cpp and will instead create a new main.c file, because it thinks I'm coding in C. Now I have a merge problem to get the auto-generated content in main.c into main.cpp and then have to re-click on Convert to C++. What's the correct procedure I should be using?
Solved! Go to Solution.
2020-11-15 10:12 AM
2020-11-15 10:12 AM
2020-11-15 11:13 AM
Hello,
Thanks for the fast response!