Floating Point Library

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Floating Point Library

ソリューションへジャンプ
2,427件の閲覧回数
v_dave
Contributor IV

Hello All,

 

OK, this should hopefully be a simple issue but I can't seem to find the answer.

 

I started a project with CW10.3 for the HCS08 CPU (S08AW60) and when I started the project wizard I did not select the floating point library.  Now I find myself wanting to use floating point for 1 calculation but I can't find the setting to use the correct floating point lib.

 

I am using the ADS1118 for thermocouple measurement and I need to calculate the internal temperature sensor value:

 

#include <float.h>

float Temp_Sensor;

int Sensor_Reading;

 

Temp_Sensor  = (float)Sensor_Reading * 0.03125;                                  //calculate degrees

 

When I compile this I get the following errors:

3402_3402.JPGCW10_3 FP_Errors.JPG

I am pretty certain the issue is the missing floating point library.

 

Can anyone tell me where I go to include the floating point libraries in my project?  I looked all through the project settings and don't see a "use floating point libraries" check box.

 

Thanks,

Dave

ラベル(1)
タグ(3)
1 解決策
1,411件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

the different library file names are described in C:\Freescale\CW MCU v10.3\MCU\lib\hc08c\readme.txt.

Remove the __NO_FLOAT__ from the compiler preprocessor setting in the project options.

And in the linker Input settings change the library to the other one you want as described in the readme.txt.

This should do it.

元の投稿で解決策を見る

2 返答(返信)
1,412件の閲覧回数
BlackNight
NXP Employee
NXP Employee

Hello,

the different library file names are described in C:\Freescale\CW MCU v10.3\MCU\lib\hc08c\readme.txt.

Remove the __NO_FLOAT__ from the compiler preprocessor setting in the project options.

And in the linker Input settings change the library to the other one you want as described in the readme.txt.

This should do it.

1,411件の閲覧回数
v_dave
Contributor IV

Hello,

Thanks for the response.  I thought that was what I needed to do but I was not sure.  I searched the online help for __NO_FLOAT__ but did not find anything so I was not quite sure that would fix the issue.

I have removed it and now that part of my code seems to be compiling without any errors.

Thanks,

Dave

0 件の賞賛