cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to configure Google tests with STM32Cube IDE

SasiSree
Associate

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.

3 REPLIES 3
Pavel A.
Super User

PavelA_0-1754076090595.png

Your program hasn't built successfully.

 

 

Can you please help me in resolving this issue

 

 

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.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.