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-filter2013-07-30 08:36 AM
When I built the DSP library I used
-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp2013-07-31 01:46 AM
Hi,
Thanks for your feedback. In my application, I am using CMSIS 3.20. The DSP library is built with -mfloat-abi=hard. Hence, in my application I am using -mfloat-abi=hard. Now, when I try to use thelibPDMFilter_GCC.a
, I am facing the linking error as described in my previous mail. I am able to successfully link if CMSIS libraries are not used and with -mfloat-abi=softfp. If CMSIS 3.20, -mfloat-abi=hard is required. So, how can I getlibPDMFilter_GCC.a
built with -mfloat-abi=hard. Thanks, Raghavendra2013-07-31 05:29 AM
So, how can I get
libPDMFilter_GCC.a
built with -mfloat-abi=hard. You'd need to find the guy that compiled the library, or obtain the source and rebuild it yourself. I would suggest you push a support request via you local ST rep or FAE, or via the/onlinesupport/app?page=onlineSupport
.2013-07-31 06:42 AM
Hi,
Thanks again for the link. I posted a query regarding this but still i haven't got any reply from them.2013-07-31 07:47 AM
May be Mayla or ST-One can address this on-board, or provide me with the source to build off-board.
2013-08-01 08:20 AM
Hi Kandur, Clive,
Here you go , a premium gift for you. Waiting official release on our web site to support most of our STM32 Series. [ see attached :libPDMFilter_CM4F_GCC.a
] and keep me posted if it helps
Cheers, STOne- pdm_filter.h :
/* Define to prevent recursive inclusion -------------------------------------*/ #ifndef __PDM_FILTER_H #define __PDM_FILTER_H #ifdef __cplusplus extern ''C'' { #endif /* Includes ------------------------------------------------------------------*/ #include <stdint.h> /* Exported types ------------------------------------------------------------*/ typedef struct { uint16_t Fs; float LP_HZ; float HP_HZ; uint16_t In_MicChannels; uint16_t Out_MicChannels; char InternalFilter[34]; } PDMFilter_InitStruct; /* Exported constants --------------------------------------------------------*/ /* Exported macros -----------------------------------------------------------*/ #define HTONS(A) ((((u16)(A) & 0xff00) >> 8) | \ (((u16)(A) & 0x00ff) << 8)) /* Exported functions ------------------------------------------------------- */ void PDM_Filter_Init(PDMFilter_InitStruct * Filter); int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); int32_t PDM_Filter_80_MSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); int32_t PDM_Filter_80_LSB(uint8_t* data, uint16_t* dataOut, uint16_t MicGain, PDMFilter_InitStruct * Filter); #ifdef __cplusplus } #endif #endif /* __PDM_FILTER_H */ ________________ Attachments : libPDMFilter_CM4F_GCC.a : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006I125&d=%2Fa%2F0X0000000bhB%2F._kCPS7XrJmibbbGR9gmvCfJe7Tu2bUtGBZ4whsGhb0&asPdf=false2013-08-01 08:28 AM
Thanks
2013-08-02 12:35 AM
Hi STOne-32,
Thanks for the attachment. The archive library is working. Can please let me know, when can I see the latest STM32F4-Discovery firmware package. This is very important to me. Regards, Raghavendra.2016-12-06 01:59 AM
Hi community!
Jan here. Its 6.12.2016 and i am still facing problem with software float build, when i try to use your pdm library in my project (that is built with hardware float). Does that mean you guys from stm still didnt published in your software package for f4 discovery this pdm lib?
Another question for STM officials: Why you don't publish .c file for pdm lib? Is it really such an asset so you cant share it with us - your customers? Thanks for your answersbest regards
Ing. Jan SlavotÃnek URC systems