2024-09-26 03:14 AM
In my project I use some git submodules to add features.
One of this submodules has a complex folder structure to add documentation, tests, examples and so on. But I only need the src folder.
Given how Git submodules work, the entire folder structure is downloaded, so I had to remove the unwanted folders from the compilation.
Now I can use the submodule and compile my project, but in the test folder of the submodule there is a main.c file that I don't include in my compilation. I tried to write a malformed line of code to see if it would report an error or not and I am sure that that file is not compiled, since I don't get the error.
But I still get an error after the compilation:
The float formatting support is not enabled, check your MCU Settings from "Project Properties > C/C++ Build > Settings > Tool Settings", or add manually "-u _printf_float" in linker flags.
The error points to the following line in the main.c:
printf("Coverage : %f\r\n", (float)(tests_passed) / (float)(tests_passed + tests_failed));
As I said, I'm sure that the file is not compiled, because if it were it would generate a syntax error.
How come it emit an error about the project configuration?
I tried following the error message and enabled the printf checkbox and the error actually goes away, but that's not the way I want to fix this.
Solved! Go to Solution.
2024-09-27 06:51 AM
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.
2024-09-27 06:51 AM
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.