I am having a problem with a subtraction of 20 bit numbers. I'm wondering if I have floating point. I don't see math.h in the list of included components. I have the following statement in my header.
#ifdef USE_FLOAT // for the LPC175x you must also add to USERargs "-mfpu=vfp"
#include <math.h>
#endif
Where do the USERargs belong?
#include math.h on LPC175x
Re: #include math.h on LPC175x
It is in the compiler options, normally it is one of the defaults.
Does the Csample compile with -DUSE_FLOAT set as a User compile option?
Does the Csample compile with -DUSE_FLOAT set as a User compile option?
Re: #include math.h on LPC175x
basicchip wrote:It is in the compiler options, normally it is one of the defaults.
Does the Csample compile with -DUSE_FLOAT set as a User compile option?
Yes, with a couple of Warnings, this is one of those:
C:/PROGRA~2/Tools/CMSIS/Csample.c:24:0: warning: "USE_FLOAT" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
-mfpu=vfp s in the compiler options.
Re: #include math.h on LPC175x
The subtraction is OK, it must be something else in the program causing a problem.