This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

STM32F1 compiler issues

Hello,

I am trying to compile a project for STM32F103CB, but it doesn't seem to work properly.
First of all, this project compiles and runs on IAR SDK.
I ported it on uVision 5 SDK, and, after quite some pain, I made it compile.
The problem is, I am still getting this warning:

Libraries\X_Lib\src\X_Configuration.c(438): warning:  #223-D: function "roundf" declared implicitly
        GAverage[0] = (u32)(roundf((float)GAverage[0]/(float)(GSampleCount)));

although I am including the math.h file in X_Configuration.c:

#include <math.h>

in math.h, roundf is defined as

extern _ARMABI_FPEXCEPT double round(double /*x*/);
extern _ARMABI_FPEXCEPT float roundf(float /*x*/);
_ARMDEFLD1(round);

...what am I doing wrong?
Is there some precise setting I overlooked?

Thanks a lot for your time!

Parents
  • How to do that?
    Because it looks like it finds the <math.h> include.
    In fact, it lists it under the dependencies of X_configuration.c, and it does not generate file-not-found error.
    In addition, I added all the necessary libs under C/C++ include path, and the compiler string shows -l C:\Keil\ARM, which is where the standard C library is supposed to be (well in a subfolder).

    I am stuck.

Reply
  • How to do that?
    Because it looks like it finds the <math.h> include.
    In fact, it lists it under the dependencies of X_configuration.c, and it does not generate file-not-found error.
    In addition, I added all the necessary libs under C/C++ include path, and the compiler string shows -l C:\Keil\ARM, which is where the standard C library is supposed to be (well in a subfolder).

    I am stuck.

Children
No data