Я написал код, который использовал функцию arm_cfft_f32 из библиотеки CMSIS DSP. Как добавить библиотеку CMSIS DSP в Makefile моего проекта?
Makefile, сгенерированный STM32CubeMX для микросхем STM32F407. Я скопировал .c и .h из CMSIS папки со статистикой, функциями преобразования и фильтрации в файл моего проекта в \ Src and \ Inc.
В Makefile под C_SOURCES, сгенерированным STM32CubeMX, я добавил:
Src/arm_cfft_f32.c \
Src/arm_bitreversal.c \
Src/arm_max_f32.c \
Src/arm_cmplx_mag_f32.c \
Добавив arm_max_f32.c и arm_cmplx_mag_f32.c в Makefile, он без проблем скомпилировался. Однако, когда я добавляю arm_cfft_f32 в моем проекте. Я получаю эту ошибку компиляции,
PS C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO> make
arm-none-eabi-gcc build/main.o build/gpio.o build/adc.o build/dac.o build/dma.o build/rtc.o build/tim.o build/usart.o build/usb_device.o build/usbd_conf.o build/usbd_desc.o build/usbd_cdc_if.o build/stm32f4xx_it.o build/stm32f4xx_hal_msp.o build/arm_cfft_f32.o build/arm_bitreversal.o build/arm_max_f32.o build/arm_cmplx_mag_f32.o build/stm32f4xx_hal_pcd.o build/stm32f4xx_hal_pcd_ex.o build/stm32f4xx_ll_usb.o build/stm32f4xx_hal_adc.o build/stm32f4xx_hal_adc_ex.o build/stm32f4xx_hal_dac.o build/stm32f4xx_hal_dac_ex.o build/stm32f4xx_hal_rtc.o build/stm32f4xx_hal_rtc_ex.o build/stm32f4xx_hal_tim.o build/stm32f4xx_hal_tim_ex.o build/stm32f4xx_hal_uart.o build/stm32f4xx_hal_rcc.o build/stm32f4xx_hal_rcc_ex.o build/stm32f4xx_hal_flash.o build/stm32f4xx_hal_flash_ex.o build/stm32f4xx_hal_flash_ramfunc.o build/stm32f4xx_hal_gpio.o build/stm32f4xx_hal_dma_ex.o build/stm32f4xx_hal_dma.o build/stm32f4xx_hal_pwr.o build/stm32f4xx_hal_pwr_ex.o build/stm32f4xx_hal_cortex.o build/stm32f4xx_hal.o build/stm32f4xx_hal_exti.o build/system_stm32f4xx.o build/usbd_core.o build/usbd_ctlreq.o build/usbd_ioreq.o build/usbd_cdc.o build/startup_stm32f407xx.o build/arm_bitreversal2.o -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -specs=nano.specs -TSTM32F407VETx_FLASH.ld -lc -lm -lnosys -Wl,-Map=build/GPIO.map,--cref -Wl,--gc-sections -o build/GPIO.elf
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: build/main.o: in function `main':
C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/main.c:187: undefined reference to `arm_cfft_sR_f32_len1024'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: build/arm_cfft_f32.o: in function `arm_cfft_radix8by2_f32':
C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:302: undefined reference to `arm_radix8_butterfly_f32'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:304: undefined reference to `arm_radix8_butterfly_f32'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: build/arm_cfft_f32.o: in function `arm_cfft_radix8by4_f32':
C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:538: undefined reference to `arm_radix8_butterfly_f32'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:540: undefined reference to `arm_radix8_butterfly_f32'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:542: undefined reference to `arm_radix8_butterfly_f32'
c:/program files (x86)/gnu tools arm embedded/8 2019-q3-update/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: build/arm_cfft_f32.o:C:\Radar\Interrupts\Perfect\ADC Interrupts 19\GPIO/Src/arm_cfft_f32.c:544: more undefined references to `arm_radix8_butterfly_f32' follow
collect2.exe: error: ld returned 1 exit status
make: *** [build/GPIO.elf] Error 1