AnsweredAssumed Answered

Compile nfcDemoApp as a "shared object" (*.so)

Question asked by on Jun 18, 2018

Hello dear NXP community


We are working on a project that includes the NXP NFC OM5578/PN7150S controller.

We have successfully compiled the demo app with the alternative driver, and it works just like expected.


However, our project involves Python, which doesn't seem to have a working library that operates this controller at the moment. As a workaround we would like to compile the nfcDemoApp as a shared object instead of an executable, and further make our tests extending the compiled C code into our Python project.


This just seems to work fine if we work with the main.c and the tools.c sources (I mean we compile and access the shared object without any problems), but the main issue here is that we can't make it up to compile the nfcDemoApp as

a shared object, which compiled already includes all it's dependency libraries, drivers and etc. necessary to operate the PN7150.


Our approach at this point is to modify the Makefile and compile an additional shared object of the nfcDemoApp too, but we can't seem to accomplish this successfully. I found multiple parts of the Makefile where we could add an instruction to the GCC compiler to output the shared object too, but it doesn't seem to work in any way for me.


It will be greatly appreciated if someone can give a hand with this, and also provide a workaround for Python developers until we have a working Python module for this controller (if there is going to be any).


Your help will be greatly appreciated

Thanks in advance.