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

2,691件の閲覧回数
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 返答(返信)

2,322件の閲覧回数
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 件の賞賛
返信

2,323件の閲覧回数
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 件の賞賛
返信

2,322件の閲覧回数
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 件の賞賛
返信

2,323件の閲覧回数
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 件の賞賛
返信

2,323件の閲覧回数
xiuminsong
Contributor I

Dear Alice,

Thank you very much!

Best Regards,

0 件の賞賛
返信