Codewarrier 5.9.0 types: double

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

Codewarrier 5.9.0 types: double

Jump to solution
1,390 Views
hiswitsend
Contributor II

Hi,

 

Would I be correct in saying that while I can declare a type as a double, it's really just a float.

 

That is the observed behaviour at any rate.

 

Cheers

 

Dave

Labels (1)
1 Solution
836 Views
TICS_Fiona
NXP Employee
NXP Employee

The new feature of 64-bit long long type support was added from the version CodeWarrior 8.1. In order to activate and make use of 64-bit data types, one has to:

(1) make use of #pragma slld on in a common header file or in C/C++ Preprocessor panel

(2) make use of precompiled MSL and runtime support libraries suffixed with _SLLD (e.g. use "MSL C 56800E smm_SLLD.lib" instead "MSL C 56800E smm.lib" and "runtime 56800E smm_SLLD.lib" instead"runtime 56800E smm.lib")

(3) add  * (ll_engine.text) to code section in linker command file

This description above is in the 56800E compiler release note. This note is in the folder below:

..\Freescale\CodeWarrior\Release_Notes\56800_E_Notes\Compiler_Notes

View solution in original post

0 Kudos
7 Replies
837 Views
TICS_Fiona
NXP Employee
NXP Employee

The new feature of 64-bit long long type support was added from the version CodeWarrior 8.1. In order to activate and make use of 64-bit data types, one has to:

(1) make use of #pragma slld on in a common header file or in C/C++ Preprocessor panel

(2) make use of precompiled MSL and runtime support libraries suffixed with _SLLD (e.g. use "MSL C 56800E smm_SLLD.lib" instead "MSL C 56800E smm.lib" and "runtime 56800E smm_SLLD.lib" instead"runtime 56800E smm.lib")

(3) add  * (ll_engine.text) to code section in linker command file

This description above is in the 56800E compiler release note. This note is in the folder below:

..\Freescale\CodeWarrior\Release_Notes\56800_E_Notes\Compiler_Notes

0 Kudos
836 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

hi Dave,

this depends on what floating point format you select when creating a project.

float.JPG.jpg

if you select "Float is IEEE32, double is IEEE32", these two types are the same.

if you select "Float is IEEE32, double is IEEE64",  they are different.

Hope this helps!

==================================================================

this answer is for you. if this answers, please click on "correct answer" button. thanks!

Best Regards,

ZhangJun

836 Views
hiswitsend
Contributor II

Can't find anything like that in the IDE, have tried setting a new project using the wizard and only get a choice of C, simple Assembly and C and then external or internal memory

0 Kudos
836 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

what chip do you work with?

836 Views
hiswitsend
Contributor II

Just been checking that very thing and it appears to be limitation of the MC56F8366.

Thank you all for your replies.


Dave

0 Kudos
836 Views
kef2
Senior Contributor IV

1. 5.9.0 is just a version of "editor" (IDE), not product version.

2. No it depends on compiler settings. Not sure about RS08 compiler, but S08 and S12 compilers both support 64 bit doubles. Just check you compiler settings and make sure project includes right library. Different libs are used for no float / double=64bit / double=32bit.

836 Views
hiswitsend
Contributor II

Have been through all the setting I can find and the only type related options seem to be "Enums always as int" and "use unsigned chars", nothing about floats or doubles.

Compiler appears to be 8.3.0 build 1061

0 Kudos