2025-08-01 12:51 AM
I have installed STM32Cube IDE and created project successfully.
Generated basic programming and tried to create google test to create test cases. But while creating C/C++ Unit under C/C++ tests getting error in C/C++ application in Main tab.
Attached the screenshot of that error.
2025-08-01 12:22 PM
Your program hasn't built successfully.
2025-08-04 5:00 AM
Can you please help me in resolving this issue
2025-08-04 5:19 AM - edited 2025-08-04 5:21 AM
Building for unit testing usually means building for a different target. Usually native build for Windows/Linux x86/x64 instead of cross compiling for ARM bare metal.That requires a custom build script. Headers often need to be modified since they can contain compiler specific extensions, CPU specific macros or hardcoded register addresses.
Start with one file you want to test. I would not use STM32CubeIDE for the unit tests. I would use VSCode.