I've found an error with using the "math.c" file from TUST with A7. To fix this put the following function at the beginning of the "math.c" file (thanks to MasterQ):
Code:
int floor(float f)
{
int i = f;
if(i < 0) i--;
return i;
}