2013-07-30 02:05 AM
I am working on developing audio blocks for STM32F4-Discovery board. In my application I am using CMSIS (Version: 3.20) math library CMSIS\Lib\GCC\libarm_cortexM4lf_math.a. To compile my application i am using compiler flag -mfloat-abi=hard with GNU toolchain.
Due to this, i am unable to link my application with ''STM32F4-Discovery_FW_V1.1.0\Utilities\STM32F4-Discovery\libPDMFilter_GCC.a''. The following error is occuring when trying to linkerror: ../audio_example.elf uses VFP register arguments, STM32F4-Discovery_FW_V1.1.0/Utilities/STM32F4-Discovery/libPDMFilter_GCC.a(pdm_filter.o) does not
I needlibPDMFilter_GCC.a
library built with -mfloat-abi=hard. Please let me know, how to get this library. #stm32f4-discovery-pdm-filter2016-12-06 06:50 AM
Hello,
In the cube package is present a libPDMFilter_CM4F_GCC.a version compiled for hardware floating point.
As addition to use the hardware floating point the floating point co-processor must be enabled in CortexM4 core register CPACR(disabled by default). It will cause hardfault error, when the floating point instruction is executed.
Last part is related to the PDM library, where the library is checking if is on STM32 hardware by using CRC periphery. For this purpose the CRC clocks must be enabled before the PDM library is used.
Best regards
Radek
2016-12-06 08:15 AM
Hi radek.
You are talking about fp coprocessor. I believe it is enabled by CubeMX by default. Is that correct? Because when i used the old PDM lib in my current project (created by cubeMX, my IDE throw an error on me saying that my project is using hardware float and the lib is compiled with soft fp option ...Thanks for clarification.Jan2016-12-06 08:28 AM
The FPU is typically enabled in the SystemInit() code called prior to main() in the CMSIS model. I've also seen it done in startup code.
Are we sure the library was built with the Hard ABI or the Soft?
2016-12-07 01:49 AM
The 'new library' proided by STOne-32 upper in this thread is definitely build with hardware fp option - so it seems to be working for me. The 'old one' i found for example in fw example package for stm32f4 discovery is build with software fp.