Hi all,
I am new in the community and I am doing on a project with the MC9S12XDP512 board, I need to do CMAC AES authentication and encryption via CAN communication on the board.I have tried several AES encryption codes in C in codewarrior but it keep showing errors in the program. Can anyone help?
Thank you so much.
Hi Kelly,
Please specify what error do you have with screenshot?
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi Jennie,
The following image shows the error, i tried adding the header file it can't work too.
Thank you very much.
Best Regards,
Kelly Lim
Hi Kelly,
From your screenshot, your code can not find some header files in your project.
while the file for example stdafx.h is not included in CW install folder.
did you get it anywhere and include it in your project folder?
Best Regards
Jennie
Hi Jennie,
It works in visual studio. Can I create the header files in CW? so that this C++ code can work in CW as well?
Thank you.
Best Regards,
Kelly
Hi Kelly,
No, CW for HCS12 is not full C++ compatible.
Some features of the C++ language are not designed for embedded controllers. There are some C++ restrictions for embedded MCU.
you should find it in {CW5.x install directory}\ Help\PDF\ Compiler_HC12.pdf:
- search doc with keyword “C++, EC++, compactC++”.
- Appendices E “Known C++ Issues in the HC(S)12 Compilers” which explains in detail, what features are not supported.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jennie,
Thank you so much for your help. Do you know how to do authentication or encryption in Cw?
Thank you.
Best regards,
Kelly Lim
Hi Jennie,
Thank you so much for your help. I am still trying out the examples as it don't seems to work for my board.
Thank you.
Best regards,
Kelly Lim
Kelly,
As I know, we have customer refer VKSP demo code for developing HCS12 device.
But unfortunately, we don't have demo code of that.
Have a great day,
Jennie Zhang
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jennie,
Thank you. I will continue to try.
Best Regards,
Kelly Lim