Hi,
I am unable to add a static library (i.e already compiled for ARM) to my user application. It is part of a proprietary SDK, so only have the header files. I tried specifying LIB_DEP and LIB_DIRS in my custom make file but the library file never gets included in the make print out. I took a look at examples in the firmware (e.g. the firmware/hal/src/photon/lib/FreeRTOS/) where this seems to be done, but without any success. The whole build system is still a bit of a mystery for me…
@tlangmo, I need to do exactly the same as you did, but it,s not working for me. Did you change anything else?
How do you compile your application? After doing the same change you did, I’m calling:
make APP=myapp PLATFORM=photon
It looks like the library was include, that was extracted from the make print:
The compiler ends with an error saying: "undefined reference to "functionOnMyLibrary()"
The error didn’t change after I made the changes to the make file
/modules/photon/user-part/makefile
Any idea? Could be a problem with the library and not with the make files?
@tlangmo, great tutorial! Thanks a lot for explaining all the steps! I’m missing to include the (extern “C”) call, probably the reason it still not working. I’ll sure it will work now.
Before you reply, I got it compiling right, but a hard fault happens every time a library function is called.
An additional information is that, it’s not compiling using the repository on it’s system 0.6.0. When I changed to system 0.5.3 it compiled right, but with the problem I described before.
I’m already using a test library like you said, it was created exacly like your example. I’ll follow up after I give one more try. Thanks again.
@bacichetti. Thanks for trying. Sorry, the hard-fault is caused because the compiler flags did not match. If you use the ones from build/arm-tools.mk, it works. I have edited my original post. Btw, I always use only the develop branch.