2

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.

John
  • 171
  • 4
  • 4
    Erm, no. The .s file needs to be compiled as a separate module and then linked into the rest. – Ignacio Vazquez-Abrams Jun 05 '14 at 06:54
  • I crashed atmel... brb restarted program I still couldn't get it to work... I have to build a solution that uses .C and .S (assembly) and I think the solution doesn't compile because its using to different type of files... yep basically the above^. how can I include it as part of the solution? – John Jun 05 '14 at 06:56
  • pls respond! How do I add .S file into AtmelStudio6 solutions so it compiles – John Jun 05 '14 at 22:31
  • Dunno. Never used it. – Ignacio Vazquez-Abrams Jun 05 '14 at 22:39

1 Answers1

1

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.

user
  • 1,881
  • 11
  • 21
  • It's already called ffft.S – John Jun 05 '14 at 09:10
  • 1
    In your question you use a lowercase 's'. It needs to be uppercase. Try posting your project files somewhere so we can take a look. – user Jun 05 '14 at 13:09
  • IDK how to upload it to github. So I'm not sure how to let you see it... OR I should say. It's on the window's app. I've committed and push but Idk how to view it online and get a link – John Jun 05 '14 at 20:18
  • Just upload an archive to MEGA or something. – user Jun 06 '14 at 07:49