cancel
Showing results for 
Search instead for 
Did you mean: 

Query on PDM filter coming with STM32F4-Discovery firmware package (stsw-stm32068.zip)

raghavendra23
Associate II
Posted on July 30, 2013 at 11:05

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 link

error: ../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 need

libPDMFilter_GCC.a

library built with -mfloat-abi=hard.  Please let me know, how to get this library.

#stm32f4-discovery-pdm-filter
13 REPLIES 13
Posted on July 30, 2013 at 17:36

When I built the DSP library I used

-mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=softfp
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raghavendra23
Associate II
Posted on July 31, 2013 at 10:46

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 the

libPDMFilter_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 get

libPDMFilter_GCC.a

built with -mfloat-abi=hard.

Thanks,

Raghavendra

Posted on July 31, 2013 at 14:29

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

.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raghavendra23
Associate II
Posted on July 31, 2013 at 15:42

Hi,

Thanks again for the link. I posted a query regarding this but still i haven't got any reply from them.

Posted on July 31, 2013 at 16:47

May be Mayla or ST-One can address this on-board, or provide me with the source to build off-board.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Nickname12657_O
Associate III
Posted on August 01, 2013 at 17:20

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-

p

dm_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) >> 😎 | \

(((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=false
Posted on August 01, 2013 at 17:28

Thanks

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
raghavendra23
Associate II
Posted on August 02, 2013 at 09:35

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.

Posted on December 06, 2016 at 10:59

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 answers

best regards 

  Ing. Jan Slavotínek

  URC systems