Electronic – Problems building project with .c and .s

atmel

I'm using Atmel Studio to program my board

I have a solution open with 2 projects as ".c" I have created the proper dependencies for the projects but one of the include files is a ".h" and uses a ".s" to define its functions… how can I make this build work?

The .S and .h files are inside the include folder.

The error I get is:

undefined reference to "function_foo"

which is in declared in .h but the .s is defined… they aren't linked somehow.

Best Answer

You might need to rename the .s file to .S to get it to compile in a GCC project. It sounds like the build system is ignoring it and thus not generating any code for the function.