STM32 with Atollic (C++ project)
My task is to change our current microcontroller solution to STM32, for this i choose to use Atollic True Studio. My goal is to keep the current software and only replace the hardware access (which is the only mcu specific part).
Since all the libraries are C++, i tried to convet the project from cube to c++ with the follwoing steps
- Select MCU in Cube, generate project
- Open Project in Atollic (9.0)
- File-> New-> Convert to C/C++ and execute the procedure
- Rename "main.c" to "main.cpp"
- Project->Properties->C/C++ General-> Paths and Symbols and copy all paths from C to C++
- "main.h" add line "define __cplusplus
- Generate
Now i'm getting alot of errors, most comming from the lines that contain the followin code:
#ifdef __cplusplus
extern "C" {
#endif
....
#ifdef __cplusplus
}
#endifAnd the error (~15 times) is called:
expected identifier or '(' before string constant
Another error i already get is
unknown type name 'uint32_t'
What could be the solution to this problem?