Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the correct posture for the RT-Thread project to add package library files?

2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you what is the correct attitude of adding software package library files to the RT-Thread project. The article is rich in content and analyzes and describes for you from a professional point of view. I hope you can get something after reading this article.

1. Right-click on the project folder to open the env tool

Input: menuconfig

To use the aht10 package, you need to select it in the package management of RT-Thread, as follows:

RT-Thread online packages-- > peripheral libraries and drivers-> sensors drivers-> aht10: digital humidity and temperature sensor aht10 driver library. [] Enable average filter by software Version (latest)-- >

two。 Enable I2C (don't forget this step or the compilation will report an error)

RT-Thread Components-> Device Drivers-> [*] Using I2C device drivers

3. Enable I2C BUS

Hardware Drivers Config-> On-chip Peripheral Drivers-> [*] Enable I2C BUS

Press ESC continuously, and type ENTER to save at the last step.

2. Download the source file

Enter: pkgs-- update to download the source file

3. Regenerate the MDK5 project file

Enter: scons-- target=mdk5 regenerate the MDK5 project file

4. Reopen the project and you can see that the aht10 library has been loaded successfully

RT-Thread project is different from previous mdk5 projects, if you still introduce header files and source files in the previous way, you will find that the configuration is not a problem, but no matter how to compile, you can not find the function definition, so you need to keep pace with the times and keep learning.

5. Update the later software package pkgs-update6, upgrade the local software package, and this command will also upgrade the script command pkgs-upgrade inside env.

7. Env configuration options

Enter: menuconfig-s

8. Requirements for using menuconfig

Version requirements: RT-Thread3.0+

There is a Kconfig file under the root path of the project. If you don't know, it is recommended to take a look at the document.

9. Use env in 3. 0 projects

Copy Kconfig exampl

Modify Kconfig (just modify the source code path in it)

10. Migrate from the old version to 3.0

Scons-what the genconfig command does: invert a .config file used by menuconfig based on the current rtconfig.h file

The above is the correct attitude for the editor to add package library files to the shared RT-Thread project. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report