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!
Hello Xiumin,
When you create project , please try configure :
Hope it helps
Have a great day,
Alice
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
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,
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!
-----------------------------------------------------------------------------------------------------------------------
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.
Dear Alice,
Thank you very much!
Best Regards,