undefined reference to `HAL_DFSDM_ChannelInit'
I'm using the BSP audio functions in my application. All of this is unmodified and straight from github. My current problem is the linker being unable to find several of the HAL_DFSDM functions called from STM32F769i_discovery_audio.c. The really puzzling part is I've got a section of code....
if(HAL_OK != HAL_DFSDM_ChannelInit(&hAudioInTopLeftChannel))
{
return AUDIO_ERROR;
}
which the linker reports undefined reference. But... just twenty lines further on in the same function (static uint8_t DFSDMx_Init(uint32_t AudioFreq) this code....
if(HAL_OK != HAL_DFSDM_ChannelInit(&hAudioInTopRightChannel))
{
return AUDIO_ERROR;
}
doesn't report an error.
What's going on? How can the linker report an undefined reference but not then report a problem when the same call occurs later in the very same function?
My main.c is a c++ function but stm32f769i_discovery.h and stm32f769i_discovery_audio.h are included with
extern "c" {
#include "stm32f769i_discovery.h"
#include "stm32f769i_discovery_audio.h"
}
Any help gratfeully appreciated