添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hello,

I have recently bought an evaluation board. The manufacturer provides a library and a Keil sample project, but I would like to integrate the library in a STM32 Cube project.

I found on the internet how to add a .lib file ( www.eclipse.org/.../) , but I am still getting the following errors:

<Project Folder>/<lib-name>.lib: error adding symbols: bad value

<Project Folder>/<lib-name>.lib:(pqlib_math_cmsis.o): .symtab local symbol at index 356 (>= sh_info of 178)

make: *** [makefile:75: <filename>.elf] Error 1

Hello @Inigo​

under Project > Properties > C/C++ Build > Settings > Tool Settings > MCU GCC Linker > Libraries add the .a library name and the path to that file.

Note that you don't enter the "lib" prefix and the extension .a, e.g. when the filename is libmylib.a, enter mylib

Besides, under MCU GCC Compiler > Include paths add the path to the header files to make the compiler happy.

You may keep copies of the .a and .h files within the project folder tree or "out-of-tree" in a separate folder as you prefer.

Note that .a files may exist for different MCU/CPU architectures and ABIs like floating point. Make sure that you get the correct library linked in.

I hope my answer has helped you. When your question is answered please close this topic by marking as Best the reply that answered you, it will help others find that answer faster. Thanks for your contribution.

Foued

IntelliSense is not working in dual-core environment in STM32 VSCode extension (MCUs) STM32L496G-Disco Pin Configuration question in STM32CubeIDE (MCUs) How to solve the GDB issue for Linux Mint in STM32CubeIDE (MCUs)