How can we set up a 64 - bit Integer operations under  CodeWarrior Development Studio for HCS12(X) Microcontrollers (Classic IDE) v5.1

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

How can we set up a 64 - bit Integer operations under  CodeWarrior Development Studio for HCS12(X) Microcontrollers (Classic IDE) v5.1

1,942 Views
xiuminsong
Contributor I

The customers is using CodeWarrior Development Studio for HCS12(X) Microcontrollers (Classic IDE) v5.1 do a S12 project,Which need use 64 bit integer operations. The results is correct when set unsigned long 32 bits, But if set to unsigned longlong 64 bits , the result is error. How can we set up a 64 - bit integer? thanks!

Labels (1)
0 Kudos
Reply
5 Replies

1,573 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Xiumin,

When you create project , please try configure :

pastedImage_0.png

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,574 Views
xiuminsong
Contributor I

Dear Alice,

Thanks for your reply.

I've tried this, but it's floating point type, and use an integer that needs to change.

Best Regards,

0 Kudos
Reply

1,573 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Xiumin,

Sorry  i said before is wrong .

the HCS12(x) chips is 16 bit , so the maximum bit is 32 , it can not  realize 64 bits.

For the kinetis chip , for it is 32 bit , so the longlong type is 64 bits.

Hope it helps


Have a great day,
Alice

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

1,574 Views
kef2
Senior Contributor V

Alice,

It's not true that 16bit MCU can't have 64bit integers in C. Even 8bit MCU's can do. But CW for S12(X) doesn't support it.

0 Kudos
Reply

1,574 Views
xiuminsong
Contributor I

Dear Alice,

Thank you very much!

Best Regards,

0 Kudos
Reply