C++ with STM32CubeIDE
Hi,
So I have been trying for last few days to port a library from Arduino and I am using STM32CubeIDE to generate code for the peripherals as it would be quick for my work and I do not want to change the Arduino code much other than the required things. The library is purely written in C++.
I have created a C++ project in CubeIDE but it is generating main.c file. One solution that I found after searching on the internet was to rename the main.c to main.cpp. I did that and it worked, the compiler compiled ran the main.cpp successfully but whenever I change some settings through .ioc file it regenerates the main.c file and I have to move the changes from main.c to main.cpp. I am pretty sure that there have to be a proper way to create c++ projects for stm32 boards. Suggest me whatever is the proper way to do this. Another solution that I found was to use main.c some how and call .cpp in main.c but I an unable to use that method because lack of understanding how that would work.
Kindly help me in this regard, TIA
