SDCC math.h with LPC922

Florian
2011-08-15
2013-03-12
  • Florian
    Florian
    2011-08-15

    Hello,
    I am using an NXP P89LPC922 with Eclipse and SDCC. I need some mathematical functions and so I want so include <math.h> but Eclipse is saying: unresolved inclusion. I tried to find something about that in the documentation of SDCC but there is not much written. Can anyone help me on how to get mathematical functions to work with the LPC922?
    Thanks in advance.

     
  • Maarten Brock
    Maarten Brock
    2011-08-15

    SDCC should be able to find it as it is shipped with it.
    It is Eclipse that cannot find it so you'll have to tell eclipse where to look for it.

     
  • Florian
    Florian
    2011-08-16

    Thank you very much. I found math.h .

     
  • Florian
    Florian
    2011-08-16

    With math.h I got the problem that it needs to much storage on the microcontroller. Do you think it is possible to use some kind of Approximation of the pow() - Part without using math.h?

     
  • Maarten Brock
    Maarten Brock
    2011-08-16

    Try to stay with integers only if possible.