I have been having a problem in developer studio where it is not finding the function prototype in plug-in H files when building. The first time was when I upgraded my location plug-in from Version 1.0.1 to version 1.1.0, and all the GPS functions came up with the error “undefined reference to XXX” where XXX is the function name. The only way I got around it was creating a new project using the location plugin version 1.1.0 at the start, and then copying all my code across.
Now I have tried including the SMS-PDU plug-in (using Properties->Open AT Application->Plug-in, then apply, OK, clean, build), and the functions referenced in the “sms_pdu_encode.h” and “sms_pdu_decode.h” files are giving the same error (“undefined reference to XXX”). The H files are #included, and if I ctrl+click on the function name, it takes me to the prototype in the H file, but it will not compile! I created a new application using the sample, and this worked fine, so it only seems to be a problem if you add a plug-in after the application has been created.
This is very frustrating, and I’m guessing its a Developer Studio problem as it happened with 2 plug-ins. Any ideas?
Seems that there is something to check with the toolchain choice.
It appears that SMS-PDU plug-in only supports build with ARM ELF GCC toolchain.
The explanation should be:
When you create a blank project without the dependency on SMS-PDU, DS automatically selects the ARM EABI GCC toolchain by default (and only it). When you add the SMS-PDU dependency, it can’t be built with ARM EABI GCC (the library is not provided) and the link fails.
From there, you should add an ARM ELF GCC build configuration (menu File > New > Open AT Configuration when the project is selected) to be able to build the project with the SMS-PDU dependency.
When you create the project including the SMS-PDU dependency from the beginning, DS restricts the toolchain choice to propose (and select) only ARM ELF GCC one. The project is then immediately created with the right configuration and can be built with success.
Please note that I can’t reproduce the issue with Location plug-in… At least to have the opposite use case: Location plug-in doesn’t provide libraries for ARM ELF GCC toolchain, and can’t be linked in this configuration.
Looks like you’re correct about SMS-PDU only being compatible with ELF. This is unfortunate, as I am using the Location plug-in 1.1.0, which as you said is only compatible with EABI. Looks like I’ll have to wait until SMS-PDU supports EABI