1 Reply Latest reply on Jan 23, 2016 4:52 AM by user_246598725

    undefined reference to assembly

    user_246598725

      Hi,

         

       

         

      I installed CMSIS, and I want to make a FFT. The FFT bin example is working, now I want to use the FFT with real values. I have exactly the same problem described by another user here

         

      I fact, I added the arm_bitreversal2.S file to my project, but GCC still complains about an undefined reference. The 'workaround' in the other topic was to simply use the precompiled CMSIS library instead of the single source files. However, I don't want to use the workaround, I want to know the solution for this problem.

         

      Anyone can help here?

         


      Regards,

         

       

         

      Ralf

        • 1. Re: undefined reference to assembly
          user_246598725

          Update:

             

          In general, when adding a .S file, you've to set the filetype to GNU assembler file. In my case it was automatically set to RealView assembler file. Since I don't have RV, the .S simply was not used, and PSoC Creator didn't give a warning (took me half a day to figure out).

             

          For the arm_bitreversal2.S file itself, setting the filetype to GNU assembler file won't work either, because it contains C preprocessor instructions (#ifdef, etc) and the file is directly passed to the assembler, which interprets those instructions as comments. So, the 'workaround' here is to set the filetype to C file. This will pass the .S file to GCC.exe, which does the preprocessing and then uses the assembler.

             

          I informed Cypress about this behaviour and I'll post their feedback here.

             

           

             

          Regards,

             

           

             

          Ralf