In the BSP I added a function to the startfilesystem.c and created a startfilesystem.h file to have all of the function declarations. Making the BSP is fine. When I try to make an application that includes a call to the function in startfilesystem, I receive this error: "undefined reference to ". I’m assuming that it is not linking in the new function. Is there something I must do to the makefile to include the startfilesytem.o for the app to link correctly?
What is the lcoation of your new startfilesystem.h file?
Have you included this new header file in the source code of your application (or, optionally, extern’ed it)?
If it is not in the c:
etos60_gnu\h or your application’s home directory you may have to modify your Makefile.
In the application Makefile there will be a line reading something as follows:
At the end of this line add a space followed by the path to your header file, as an example:
APP_INCDIRS= -I… -I$(NETOS_DIR)/src/platforms/$(PLATFORM)
The addition, above, states that make should look in the …/…/…/…/src/platforms/connectme directory for required header files (this example assumes that you are working with the connectme platform).
Hopefully this helps.
Thanks for the quick reply. This didn’t fix my problem.
If I remove any reference to the startfilesystem.h I receive a different error stating that it is undeclared. I believe it is finding the .h and compiling, but having trouble linking the function in from the bsp into the app.
I haven’t done much work with makefiles, so I think I’m just overlooking how to do this.
Where within startfilesystem.c did you define this new function? Have you set the #define for BSP_INLCUDE_FILESYSTEM_CLIB_SUPPORT to TRUE (this is in bsp.h)?
Within the startfilesystem.c source file there is a preprocessor check to determine if the aforementioned #define is set, if it is not, all functions, variables, etc. within this #ifdef check are omitted from the compilation and linker process.
Thanks for the help Cameron. I was able to fix my problem. I had a linkage problem with a C function calling a C++ function which was calling a C function.