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

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

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

1,482 次查看
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!

标签 (1)
0 项奖励
5 回复数

1,113 次查看
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 项奖励

1,114 次查看
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 项奖励

1,113 次查看
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 项奖励

1,114 次查看
kef2
Senior Contributor IV

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 项奖励

1,114 次查看
xiuminsong
Contributor I

Dear Alice,

Thank you very much!

Best Regards,

0 项奖励