Hello I created a library that includes a function.
#include "AT91SAM7x256.H" void ASD(void) { AT91C_BASE_PMC->PMC_PCER=1<<2; } int main() { }
I added the lib file to an executable project, and when I use ASD(); , I take two errors:
Rebuild target 'Target 1' assembling SAM7.s... compiling Main_Exec.c... Main_Exec.c(6): warning: #223-D: function "ASD" declared implicitly ASD(); Main_Exec.c: 1 warning, 0 errors linking... .\Executable_P.axf: Error: L6200E: Symbol __ARM_use_no_argv multiply defined (by main_lib.o and main_exec.o). .\Executable_P.axf: Error: L6200E: Symbol main multiply defined (by main_lib.o and main_exec.o). Not enough information to list image symbols. Not enough information to list the image map. Finished: 2 information, 0 warning and 2 error messages. ".\Executable_P.axf" - 2 Error(s), 1 Warning(s). Target not created
What's wrong with the procedure? :( I forgot something? or what configurations should I apply?
Thanks