Skip to main content
Associate
August 1, 2025
Question

Not able to configure Google tests with STM32Cube IDE

  • August 1, 2025
  • 2 replies
  • 349 views

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.

2 replies

Pavel A.
Super User
August 1, 2025

PavelA_0-1754076090595.png

Your program hasn't built successfully.

 

 

SasiSreeAuthor
Associate
August 4, 2025

Can you please help me in resolving this issue

 

 

Lead II
August 4, 2025

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."