【问题标题】:Compilation of CMSIS-DSP application, .a library not recognizedCMSIS-DSP 应用程序的编译,.a 库无法识别
【发布时间】:2019-12-21 01:43:41
【问题描述】:

我正在使用 GNU MCU ECLIPSE 和 ARM 工具链来定位 CortexM MCU,并且我想使用 CMSIS DSP 库中的函数。 我已经从https://github.com/ARM-software/CMSIS_5 的存储库中下载了库,将包含的路径添加到编译器设置中,并在链接器选项中添加了文件夹 C:/workspace/CMSIS/DSP/Lib/GCC 作为搜索路径用于库,并将“arm_cortexM3l_math”添加到库中。 当我尝试构建时,我得到了错误

arm-none-eabi-g++ -mcpu=cortex-m3 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -Xlinker --gc-sections -L"C:\workspace\eclipse_tools\CMSIS_5-develop\CMSIS\DSP\Lib\GCC" -Wl,-Map,"hello6.map" --specs=rdimon.specs -Wl,--start-group -lgcc -lc -lc -lm -lrdimon -Wl,--end-group -o "hello6.elf"  ./src/main.o   -larm_cortexM3l_math
c:/workspace/eclipse_tools/arm embedded gcc/8.2.1-1.7-20190524-0603/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe:C:\workspace\eclipse_tools\CMSIS_5-develop\CMSIS\DSP\Lib\GCC\libarm_cortexM3l_math.a: file format not recognized; treating as linker script
c:/workspace/eclipse_tools/arm embedded gcc/8.2.1-1.7-20190524-0603/bin/../lib/gcc/arm-none-eabi/8.2.1/../../../../arm-none-eabi/bin/ld.exe:C:\workspace\eclipse_tools\CMSIS_5-develop\CMSIS\DSP\Lib\GCC\libarm_cortexM3l_math.a:1: syntax error

我不明白为什么链接器不能以 .a 格式读取库。我已经尝试在 Windows 和 linux 以及 GNU MCU Eclipse ARM Embedded GCC 和 GNU ARM Embedded Toolchain 上安装干净的 Eclipse。 Windows 的构建工具也已正确安装。

【问题讨论】:

  • “file”命令说什么是libarm_cortexM31_math.a的类型?

标签: c++ eclipse gcc arm cmsis


【解决方案1】:

我意识到,尽管这些文件看起来像库,但它们是一种占位符,因为它们只有几个字节。然后我从这里下载并解压了 CMSIS 包: https://developer.arm.com/tools-and-software/embedded/cmsis/cmsis-packs (子菜单 ARM->CMSIS) 并且现在可以使用相同的文件。

所以我猜他们还没有编译?但是存储库中没有makefile,我应该如何构建它们?

@andy mango,谢谢,file 命令确实只返回了“ASCII 文本文件”

【讨论】:

    猜你喜欢
    • 2020-04-11
    • 2014-01-28
    • 2018-10-04
    • 1970-01-01
    • 2017-09-29
    • 1970-01-01
    • 1970-01-01
    • 2017-07-28
    • 2021-04-07
    相关资源
    最近更新 更多