无法在Atollic中使用CMSIS库 [英] Unable to use CMSIS library in Atollic

查看:160
本文介绍了无法在Atollic中使用CMSIS库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为Atollic TrueStudio中的STM32微控制器使用CFFT函数.但是我无法使用任何DSP功能.我得到了错误- 未定义对"arm_cfft_f32"的引用和未定义对"arm_cfft_sR_f32_len16"的引用.我不知道问题出在哪里,因为它可以在Keil上运行.我在做什么错了?

I am trying to use CFFT function for my STM32 microcontroller in Atollic TrueStudio. But I am unable to use any of the DSP functions. I get the error - undefined reference to `arm_cfft_f32' and undefined reference to 'arm_cfft_sR_f32_len16'. I don't know what the problem is because it works on Keil. What am I doing wrong?

    #include "stm32f4xx.h"
    #include "arm_math.h"
    #include "arm_const_structs.h"
    #include "core_cm4.h"
    #include "math.h"
    #define TEST_LENGTH_SAMPLES 32
    float32_t ffttestip[TEST_LENGTH_SAMPLES]={0};
    static float32_t ffttestop[TEST_LENGTH_SAMPLES/2];
    /* Private macro */
    /* Private variables */
    /* Private function prototypes */
    /* Private functions */
    uint32_t fftSize = 16;
    uint8_t ifftFlag = 0;
    uint8_t doBitReverse = 1;

     int main(void)
    {
    int i = 0;
      i=15;
      i=pow(i,2);
      /**
      *  IMPORTANT NOTE!
      *  The symbol VECT_TAB_SRAM needs to be defined when building the project
      *  if code has been located to RAM and interrupts are used. 
      *  Otherwise the interrupt table located in flash will be used.
      *  See also the <system_*.c> file and how the SystemInit() function updates 
      *  SCB->VTOR register.  
      *  E.g.  SCB->VTOR = 0x20000000;  
      */

      /* TODO - Add your application code here */
      arm_cfft_f32(&arm_cfft_sR_f32_len16, ffttestip, ifftFlag, doBitReverse);
      /* Infinite loop */
    while(1);
}

编辑-另外,出现以下错误-

EDIT - additionally,I get the following error -

Info: Internal Builder is used for build
arm-atollic-eabi-g++ -o fftreal.elf Libraries\STM32F4xx_StdPeriph_Driver\src\misc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_adc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_can.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_crc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_cryp.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_cryp_aes.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_cryp_des.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_cryp_tdes.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_dac.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_dbgmcu.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_dcmi.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_dma.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_exti.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_flash.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_fsmc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_gpio.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_hash.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_hash_md5.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_hash_sha1.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_i2c.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_iwdg.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_pwr.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_rcc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_rng.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_rtc.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_sdio.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_spi.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_syscfg.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_tim.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_usart.o Libraries\STM32F4xx_StdPeriph_Driver\src\stm32f4xx_wwdg.o src\main.o src\startup_stm32f40xx.o src\stm32f4xx_it.o src\system_stm32f4xx.o src\tiny_printf.o -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T../stm32f4_flash.ld -specs=nosys.specs -static -Wl,-cref,-u,Reset_Handler -Wl,-Map=fftreal.map -Wl,--gc-sections -Wl,--defsym=malloc_getpagesize_P=0x1000 -Wl,--start-group -lc -lm -lstdc++ -lsupc++ -Wl,--end-group -specs=nano.specs 
src\main.o: In function `main':
E:\truestudio workspace\fftreal\Debug/..\src/main.cpp:70: undefined reference to `arm_rfft_f32'
collect2.exe: error: ld returned 1 exit status

推荐答案

首先删除该不受支持的旧SPL.

First of all drop this old unsupported SPL.

第二,您需要将包含CMSIS DSP功能的 .c 文件添加到您的项目中.

Secondly you need to add the .c files containing the CMSIS DSP functions to your project.

最后-正如我所见,您的程序与C ++没有任何共同之处,那么为什么要将您的项目设置为C ++?

Finally - your program as I see does not have anything in common with the C++ so why your project is set as C++?

这篇关于无法在Atollic中使用CMSIS库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆