Solved
ARM CMSIS DSP undefined reference error
Hey I am trying to use CMSIS DSP library to perform FFT of i2s data from a mic but it is showing error after using the FFT functions but is compling if only library is added is there any thing I have missed
this is the code:
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "main.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "arm_math.h"
#include "arm_const_structs.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
/* USER CODE BEGIN PTD */
/* USER CODE END PTD */
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN PD */
/* USER CODE END PD */
/* Private macro -------------------------------------------------------------*/
/* USER CODE BEGIN PM */
/* USER CODE END PM */
/* Private variables ---------------------------------------------------------*/
I2S_HandleTypeDef hi2s1;
/* USER CODE BEGIN PV */
#define FFT_size 256
q15_t buf[FFT_size];
q15_t input_signal[FFT_size];
q15_t Complex[2*FFT_size];
q15_t Real[FFT_size];
/* USER CODE END PV */
/* Private function prototypes -----------------------------------------------*/
void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_I2S1_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
/* Private user code ---------------------------------------------------------*/
/* USER CODE BEGIN 0 */
void FFT_compute(){
arm_cfft_q15(&arm_cfft_sR_q15_len256, buf, 0, 1);
arm_cmplx_mag_q15(buf,Real,FFT_size);
}
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*
*/
int main(void)
{
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
/* MCU Configuration--------------------------------------------------------*/
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* USER CODE BEGIN Init */
/* USER CODE END Init */
/* Configure the system clock */
SystemClock_Config();
/* USER CODE BEGIN SysInit */
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_I2S1_Init();
/* USER CODE BEGIN 2 */
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
while (1)
{
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
HAL_I2S_Receive(&hi2s1, buf, FFT_size, 1);
FFT_compute();
}
/* USER CODE END 3 */
}
