2

我正在尝试在我的粒子光子应用程序代码中使用 fft 函数。我设法将我的库链接到 Cortex M3 的 cmsis 预建库。但是,当我调用实际的 fft 函数时:

arm_rfft_q31( &rfftStruct, buffer, buffer); // in-place fft 

构建失败,引用未定义:

/u/susom/cmsis-integ/CMSIS/Lib/libarm_cortexM3l_math.a(arm_cfft_q31.o): In function `arm_cfft_q31':
/u/susom/cmsis-integ/CMSIS/DSP_Lib/TransformFunctions/arm_cfft_q31.c:139: undefined reference to `arm_bitreversal_32'

arm_bitreversal_32 恰好是在此处输入链接描述中在汇编中实现的例程

关于如何克服这个问题的任何想法。

4

1 回答 1

0

There are two library entries in the project modal windows (only available if you have the project selected in eclipse then you can it it from properties of menu project).

One of them seems to be cosmetic. You need the one under build in the linker section.

Eclipse seems to randomly remove this entry sometimes, which to put it mildly is extremely unhelpful.

open project properties -> C/C++ Build -> Settings -> MCU GCC Linker -> Libraries:

Add a library (the top one) "arm_cortexM4lf_math"

do not put ".a" at the end or a "lib" in the start (you'd have thought they would have regex guarded that but no) The the path: something like this "${workspace_loc:/${ProjName}/Middlewares/ST/ARM/DSP/Lib}"

BTW: use CUBEMX to load in the DSP libraries and remeber to tick the ever so useful "enable" box or it wont work.

于 2021-10-26T13:38:15.620 回答