Is it possible to use tanh() function at aw32 microcontroller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is it possible to use tanh() function at aw32 microcontroller

Jump to solution
1,690 Views
edrian
Contributor I
Hello, i am trying to use tanh() at codwarrior 6.0 but i am not sure if it is possible with 8 bits microcontroller aw32. Does anyone knows how to use.

the error massage is as follow L1822: Symbol <Symbol Name> in file <File Name> is undefined
Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
689 Views
CrasyCat
Specialist III
Hello
 
ANSI C math functions can be used for HC08, but you need to be aware that this will significantly increase your application size.
 
Did you include math.h in the source file where you did use tanh?
Did you specify you want to use floating point arithmetic when you have created your project?
If the option -D__NO_FLOAT__ is specified on your command line, remove it.
 
With which ansi library file are you linking your application?
You need to link your application with a library file supporting floating point operation.
The file {Install}\lib\hc08c\readme.txt describes which library file to use according to the options you are using.
 
If you really want to use floating point sand math function I would recommend compiling with -Fd option. This tells the compiler to encode double on 32-bits and reduce the overhead a bit. But with this configuration you only get single precision on your double operation.
 
CrasyCat

View solution in original post

0 Kudos
Reply
2 Replies
690 Views
CrasyCat
Specialist III
Hello
 
ANSI C math functions can be used for HC08, but you need to be aware that this will significantly increase your application size.
 
Did you include math.h in the source file where you did use tanh?
Did you specify you want to use floating point arithmetic when you have created your project?
If the option -D__NO_FLOAT__ is specified on your command line, remove it.
 
With which ansi library file are you linking your application?
You need to link your application with a library file supporting floating point operation.
The file {Install}\lib\hc08c\readme.txt describes which library file to use according to the options you are using.
 
If you really want to use floating point sand math function I would recommend compiling with -Fd option. This tells the compiler to encode double on 32-bits and reduce the overhead a bit. But with this configuration you only get single precision on your double operation.
 
CrasyCat
0 Kudos
Reply
689 Views
edrian
Contributor I
Thank you very much, i forgot specify that would be using float, now it is working fine.
0 Kudos
Reply