vscode开发esp8266环境配置
一、安装VSCODE
二、安装VScode-arduino插件

三、配置arduino环境
在设置中搜索arduino,将Arduino:Path的值改成自己的arduino安装目录。

四、创建工程
1.创建一个文件夹
2.创建.ino文件
3.修改配置
在自己的目录下创建.ino文件或打开例程一般会自动创建.vscode文件夹,里面包括三个文件,分别是arduino.json、c_cpp_properties.json、setting.json。其中c_cpp_properties.json主要用来配置程序的引用,.ino文件中的include的头文件必须在c_cpp_properties.json中的includepath属性中配置

**注:**引用头文件后还可能报错,可以在setting中进行如下设置


4.编译上传
在窗口右下角 点击选择板子类型和选择串口

注: arduino插件0.4.6版本有bug进入后无法选择板子,改下载0.4.5版本重启后正常。

根据自己的板子类型选择即可。
点击上传。

注: 默认情况上传代吗的输出会显示乱码。

将文件C:\Users\ZXD.vscode\extensions\vsciot-vscode.vscode-arduino-0.4.5\out\src\common\util.js中的codepage行注释掉即可。

重启vscode后输出正常。

至此就可以正常使用vscode进行esp8266进行开发工作
PS: 关闭360能够显著提高编译速度
|