Reputation: 63
Currently I am trying to compile binaries for the AT91SAM7S256 using SEGGER, and I've been running into an issue at the linking phase (source files all compile fine) where any file that makes use of "lib_AT91SAM7S64.h" has multiple undefined references when attempting to link.
Here's a sample of some of the error messages:
Output/Executable_1 Debug/Obj/AdcInterface.o: In function `initializeADCInterface':
undefined reference to `AT91F_PIO_CfgInput'
undefined reference to `AT91F_PIO_InterruptEnable'
undefined reference to `AT91F_PIO_GetInterruptStatus'
The thing is that these functions that're "undefined" are defined within the "lib_AT91SAM7S64.h" file. I'm at a loss as to what to do, as I've never ran into errors during the linking phase before.
I am not using any makefiles or anything. This project was originally developed using Green Hills Software, but it compiles and builds without issue on that IDE. I do not have access to Green Hills Software, however, and have been trying to get SEGGER to compile this.
Upvotes: 0
Views: 2250
Reputation: 2689
Almost certainly you're not linking in the library that has the actual code to these functions. The .h only defines them so that other code can correctly call these functions.
You must (somehow) specify the .a
that includes these symbols. I'm not sure if that means you need to edit your makefile, or add some .a to the project, or specify in the IDE what hardware you're building to. Sorry, I don't use SEGGER, so I don't know those details. Hopefully this is enough to move your forward to find your solution.
Upvotes: 3