Conversion of Atollic C project to STM32Cube IDE C++
The original project was compiled and maintained in Atollic 9.3.0 for a STM32F030C8. We are trying to add a vendor stack that is written in C++.
We began by adding the #include <new> to the main to insure the compiler could see the needed include paths.
arm-atollic-eabi-gcc -c ..\src\main.c -mthumb -mcpu=cortex-m0 -std=gnu11 -DHSI_VALUE=8000000 -DSTM32F030 -DUSE_STDPERIPH_DRIVER -I../src -I../Libraries/CMSIS/Include -I../Libraries/CMSIS/Device/ST/STM32F0xx/Include -I../Libraries/STM32F0xx_StdPeriph_Driver/inc -IC:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\ARMTools\arm-atollic-eabi\include\c++\6.3.1 -IC:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\ARMTools\arm-atollic-eabi\include\c++\6.3.1\arm-atollic-eabi\bits -Og -ffunction-sections -g -fstack-usage -Wall -Wfatal-errors -specs=nano.specs -o src\main.o
In file included from ..\src\main.c:22:0:
C:\Program Files (x86)\Atollic\TrueSTUDIO for STM32 9.3.0\ARMTools\arm-atollic-eabi\include\c++\6.3.1/new:39:28: fatal error: bits/c++config.h: No such file or directoryThe new file has a includes of "bit/c++config.h" which is not present. So it seemed that Atollic needed to install the specific includes for g++. Because Atollic is out of date we created a C++ workspace in the Cube IDE(version 1.8.0) and imported the original into it. The new project seems to have all the need GNU C++ references.
We are still seeing issues finding the include <new>:
rm-none-eabi-gcc "../src/main.c" -mcpu=cortex-m0 -std=gnu11 -g3 -DHSI_VALUE=8000000 -DSTM32F030 -DUSE_STDPERIPH_DRIVER -c -I../src -I../Libraries/CMSIS/Include -I../Libraries/CMSIS/Device/ST/STM32F0xx/Include -I../Libraries/STM32F0xx_StdPeriph_Driver/inc -O0 -ffunction-sections -fdata-sections -Wall -fstack-usage -MMD -MP -MF"src/main.d" -MT"src/main.o" --specs=nano.specs -mfloat-abi=soft -mthumb -o "src/main.o"
../src/main.c:22:10: fatal error: new: No such file or directory
22 | #include <new>There must be something basic about the project/workspace configuration for a mixed C/C++ STM32 build. Anyone running a mixed C/C++ build in Cube IDE?
Any help is appreciated.