Floating Point Library

cancel
Showing results for 
Search instead for 
Did you mean: 

Floating Point Library

Jump to solution
1,246 Views
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

Labels (1)
Tags (3)
1 Solution
230 Views
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.

View solution in original post

2 Replies
231 Views
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.

View solution in original post

230 Views
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 Kudos