当前位置:网站首页>Development of IOT device end - establishment of development environment

Development of IOT device end - establishment of development environment

2022-06-24 07:09:00 fancyxu

In order to better learn the relevant knowledge and practice of the IOT device side , Based on the previous iot hub c sdk Reorganized and rewritten iot-hub-device-c-sdk

The following is for this warehouse , Describe how to build the corresponding development environment .

summary

Tools

explain

wsl

windows On linux Subsystem , In the windows Carry out simple linux Development

vscode

Code editor , Cooperate with plug-ins to write code

WSL The following software needs to be installed :

  • cmake: The compilation framework of the project is built based on cmake
  • gcc:linux Upper compiler
  • g++: Provide googletest Unit test support
  • googletest: Provide the unit test framework of the project
  • gcovr: Provide unit test coverage statistics
  • git: Code version control
  • doxygen: Provide code annotation formatting and annotation visualization support
  • graphviz: coordination doxygen Use , Provide header file dependency view

vscode The following plug-ins need to be installed :

  • C/C++: Provide C/C++ Language development support
  • Doxygen Documentation Generator: Provide doxygen Style annotation generation
  • markdownlint:markdown Format check , Improve document quality
  • Code Spell Checker: Word spelling check , Improve code quality
  • GitLens:git Information and diff Support

WSL install

  1. Control panel -> Procedures and functions -> Enable or close Windows function -> Check Apply to Linux Of Windows Subsystem
  2. stay Microsoft Store Download Ubuntu
  3. Software installation
apt-get update

#  Install the required software 
apt-get install git cmake gcc g++ doxygen graphviz

#  install googletest
apt-get install googletest gcovr
cd /usr/src/googletest
mkdir -p build
cd build
cmake .. && make && make install

VSCode install

  1. vscode install , See https://code.visualstudio.com/
  2. find Extensions, Search and install the corresponding plug-ins in turn
Extensions
Install the corresponding plug-ins

Development Notes

The IOT device end mainly uses C Language development , In order to improve the project quality , It needs to be developed according to the unified specification , It needs to be read carefully :

meanwhile , Need to follow Doxygen Specification , And based on googletest Write corresponding unit tests , Ensure unit test coverage .

原网站

版权声明
本文为[fancyxu]所创,转载请带上原文链接,感谢
https://yzsam.com/2021/07/20210706220512663n.html