Hello,
I'm new with NXP and S32 Design Studio.
My main goal is create one project where I can import my libs.
That is, I want to create 2 lib (for example for CAN communication and ADC, for S32K118) with all peripheral functions available (for example CAN->MCR=.....). I can't do that and I have another difficult all libs created, are created with the name mylibrary.c/.h it is possible change the name? How use the #include if all of them have the same name?
In resume, my difficult are in create libraries for one particular processor with all the function/register previously defined and import them for my project.
I want to create my libs with the syntax previously developed and import for my projects.
Thanks for your help.
Best regards,
Ricardo Velho
Hi,
So, first of all - you need to select library project - if you like to build library:
Output will be library archive libYourProjectName.a . You can use your library in other projects just by adding it in project settings:
Also don't forget add include path for your library header files.
Jiri
Hello Jiri,
Thanks for your reply.
Ok, and what about the syntax, that is, if I create one lib for CAN communication. I don't have defined for example CAN0->MCR. How can I import/add this into my library?
Thanks again for your collaboration.
Best regards,
Ricardo
Hi,
register names and other definitions are in Cpu.h for particular MCU. Just include this header file in your project.
Easiest way how to setup all stuff is start with New S32DS Application project and switch it from executable target to library target:
Jiri
Hi Jiri,
Thank you for your help.
Best regards,
Ricardo