Any trick to make this FFT work?

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi to all!

I would like to know if there are any trick to make this FFT
( https://www.avrfreaks.net/index.p...
)

from the project section to work, because I could not even build it in AvrStudio 4(with GCC of course)...It says that it don't find the three main functions:

fft_input(capture, bfly_buff);
fft_execute(bfly_buff);
fft_output(bfly_buff, spektrum);

I DO included the main.h and the fft.h in the 'Header Files', but beside that, I don't know what else I have to do....

Thank you in advance! :shock:

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://elm-chan.org/docs/avrlib/...

Those functions look to be available in "ffft.h" in this archive.....

Just looked on the project's website. Not sure if that'll solve your problem, but hopefully it will.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking at both though, I don't think that archive will solve anything. I believe the function is actually in "fft.S", which is an assembly source file... the (f)fft.h headers only define prototypes for them, but don't actually define the functions themselves.

I'm not yet familiar enough with GCC and AVR's in general to guide you on how to get the assembly to compile with the C code. I notice the file is listed in the Makefile, though.... have you tried compiling it with AVR-GCC only using the makefile?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If using a Makefile you add the name of any .S files to the ASRC= line. If using Studio then simply right click the project tree, use "add existing source files" and add the .S file into the tree.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Done ! In avr studio I had already tried to include the .S using "add existing source files" with no success, but now I buid it directly in Programmers Notepad, and it worked! At least in Proteus it gave me an array with the values of the conversion. I need now just build the hardware, but is almost sure that it will work!
Thanks guys!

PS : It works too in CodeBlocks.