Undefined function when using the CMSIS replacement library

32 次查看(过去 30 天)
Hello,
I have a Simulink application that uses FFT/iFFT. I am using the C-Code generator to geneate code for a ARM compatible Cortex A.
If I use the ARM Cortex-A CMSIS replacement library, I get the following error during C-code generation:
Error:Undefined function 'BlockToCMSISCoeffReverseOrder' for input arguments of type 'double'.
If I do not use the CMSIS replacement library but instead use GNU C99 extension, everything works as expected. If I do not use the FFT/iFFT part, the other function of the CMSIS libraries are used and everything works.
Any idea where I should look?

回答(1 个)

shantanu
shantanu 2025-8-22,10:24
Hi!
I see you are attempting to make a Simulink application using FFT/iFFT blocks and using a C code generator with ‘ARM Compatible Cortex-A CMSIS’ Code replacement library.
The error:
Error:Undefined function 'BlockToCMSISCoeffReverseOrder' for input arguments of type 'double'.
And as you mentioned that when you do not use the FFT/iFFT parts, you do not get the error suggests some incompatibility between the usecase of your FFT/iFFT blocks and the CMSIS library here.
See this documentation: https://www.mathworks.com/help/ecoder/armcortexm/ug/supported-dsp-blocks-with-cmsis-library-for-armcortexm.html where it shows the DSP blocks and their corresponding Supported data types as input. Here for ‘FFT’ and ‘iFFT’ blocks, it expects ‘single’ as supported data type so that is the reason you got this error.
If in case you are unable to fix this error you can consider using this Embedded coder support package for ARM Cortex-A Processors on MATLAB File exchange: https://www.mathworks.com/matlabcentral/fileexchange/45083-embedded-coder-support-package-for-arm-cortex-a-processors?s_tid=answers_rc2-2_p5_MLT
Hope this helps!
  2 个评论
Pascal
Pascal 2025-8-22,10:35
Thanks for the answer. I did not mentionned that in the original post, but the strange thing is that I do not use double at all. My application is only single and I made sure all the signal are single before going to the FFT/iFFT blocks.
shantanu
shantanu 2025-8-22,10:46
I understand this. Try explicitly checking for signal data types in your model and try using some convertor blocks https://www.mathworks.com/help/simulink/slref/datatypeconversion.html which will convert the data type to what is expected.
You can try to build a small demo example model using FFT block and try to generate code to see if it gives the same error. This can help you identify if the issue is with the block input and output signal type or in the larger workflow (whatever model/system you are implementing) you have.
Hope it helps!

请先登录,再进行评论。

标签

产品


版本

R2025a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by