Import C Library in Atollic TrueStudio, STM32CubeMX

雨燕双飞 提交于 2019-12-13 00:14:32

问题


I am currently working on a STM32F767ZI-Nucleo board and a little security chip (microchip atecc508a), that is connected via i2c connection. For this chip is a library available CryptoAuthLib, that I want to use in my project. I'm also using STM32CubeMX to generate my C-Files and Atollic TrueStudio to write my implementations.

C programming language is relatively new to me, so I have no idea how to include my library folder to my project (either in cubemx or in trustudio?) to get it work.

I think the include statement #include "cryptoauthlib.h" should be in the main.c include section, but in a certain way I have to tell the IDE to use this library.

I appreciate any help, thank you very much.


回答1:


Create a folder inside your project. You have to declare to IDE have header files (.h) and souce files (.c) are inside that folder. To do this, open properties of project and in C/C++ general>Paths and Symbols. In the Include tab add the folder that contains the header files. In the Source Location Tab add folder that contains the source code file. Aplly then OK. Clean and Rebuild the project. Then you can include in the main.c. Hope this helps. Best Regards.



来源:https://stackoverflow.com/questions/53590070/import-c-library-in-atollic-truestudio-stm32cubemx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!