-1

I am using GNU MCU ECLIPSE and the ARM toolchain to target CortexM MCUs, and I want to use functions from CMSIS DSP library. I have downloaded the library from the repository from https://github.com/ARM-software/CMSIS_5, added to the compiler settings the paths to the includes, and in the linker options I have added the folder C:/workspace/CMSIS/DSP/Lib/GCC as path to search for libraries, and added 'arm_cortexM3l_math' to the libraries. When I try to build I get the error

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

I don't understand why can't the linker read the library in .a format. I have tried with a clean eclipse installation both on windows and linux and with both the GNU MCU Eclipse ARM Embedded GCC and the GNU ARM Embedded Toolchain. Build tools for windows are also correctly installed.

4

1 回答 1

0

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

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

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

于 2019-08-15T07:11:07.043 回答