【发布时间】: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的类型?