In S32 DS we created a project for the mpc5748g and selected C++ as the programming language.
The project generates and compiles. But it is not possible to add components from the Component Explorer:
What needs to be done to use Components in a C++ project?
已解决! 转到解答。
Hello Michael,
C++ project can be used in MPC5748G. I am only trying to explain that SDK drivers has never been tested in C++ projects.
So, you can write your own driver which is based on SDK driver using C++, but functionality of SDK driver is not guaranteed. From my point of view, it will work correct, but this is only my opinion.
Hope this helps.
Regards,
Martin
Hi Martin,
i just checked the S32_SDK_BETA_2.9.0. I found S32_SDK_BETA_2.9.0\platform\pal\ and a lot of drivers below. After checking some of them (can and i2c), these look like classic drivers, that is, drivers that do not require Device Expert code generation. If I do not miss something, these drivers can be used from C++, since it is no problem to call C code.
So you mean that Processor Expert and the Components Library integrated in S32 DS cannot be used in C++, only classic drivers from the SDK can be used?
Please clarify.
Hello,
in general, SDK code has never been tested in C++ projects and it is not determined to use in C++ project. I understand that C code can be called in C++ projects, but NXP cannot guarantee correct functionality.
So, you can try to use SDK drivers in your C++ project, but it is on your responsibility.
Regards,
Martin
Hello Michael,
C++ project can be used in MPC5748G. I am only trying to explain that SDK drivers has never been tested in C++ projects.
So, you can write your own driver which is based on SDK driver using C++, but functionality of SDK driver is not guaranteed. From my point of view, it will work correct, but this is only my opinion.
Hope this helps.
Regards,
Martin