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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

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

跳至解决方案
1,695 次查看
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
标签 (1)
标记 (1)
0 项奖励
回复
1 解答
694 次查看
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 项奖励
回复
2 回复数
695 次查看
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 项奖励
回复
694 次查看
edrian
Contributor I
Thank you very much, i forgot specify that would be using float, now it is working fine.
0 项奖励
回复