在Atollic TrueStudio,STM32CubeMX中导入C库 [英] Import C Library in Atollic TrueStudio, STM32CubeMX

查看:146
本文介绍了在Atollic TrueStudio,STM32CubeMX中导入C库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究STM32F767ZI-Nucleo板和一个小的安全芯片(微芯片atecc508a),该芯片通过i2c连接进行连接.对于此芯片,我想在我的项目中使用一个 CryptoAuthLib 可用的库.我还使用STM32CubeMX生成C文件,并使用Atollic TrueStudio编写实现.

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编程语言对我来说还比较陌生,所以我不知道如何将我的库文件夹包含到我的项目中(无论是在cubemx中还是在trustudio中?)才能使它正常工作.

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.

我认为include语句#include "cryptoauthlib.h"应该在main.c的include部分中,但是以某种方式,我必须告诉IDE使用此库.

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.

推荐答案

在项目内部创建一个文件夹.您必须向IDE声明该文件夹内有头文件(.h)和源文件(.c).为此,请在C/C ++常规>路径和符号中打开项目的属性.在包括选项卡中添加包含头文件的文件夹.在源位置"选项卡中,添加包含源代码文件的文件夹.然后再确定.清理并重建项目.然后,您可以将其包含在main.c中. 希望这可以帮助.最好的问候.

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.

这篇关于在Atollic TrueStudio,STM32CubeMX中导入C库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆