物联网 / 嵌入式设备开发平台 PlatformIO 现已支持 Visual Studio Code!一个比 Arduino IDE 好用的开发工具

1,809 阅读1分钟

PlatformIO

Integrate PlatformIO into Visual Studio Code on top of PlatformIO Core.

Features

Prerequisites

Setup

  • Use existing project

    If you have an existing PlatformIO project, open the project folder directly in VS Code

  • Create new project

    In terminal, run platformio init --board <your_board_identifier> to initialize a new PlatformIO project, then open the project folder in VS Code. Refer to User Guide for platformio init command. For how to find Board Identifier, you could refer to this.

Usage

  • Build PlatformIO project: use shortcut Ctrl+Alt+B, or press F1 and then select/type PlatformIO: Build, or right click the Text Editor and then click PlatformIO: Build in context menu

build

  • Upload firmware to devices: use shortcut Ctrl+Alt+U, or press F1 and then select/type PlatformIO: Upload, or right click the Text Editor and then click PlatformIO: Upload in context menu

upload

  • Open Serial Monitor: use shortcut Ctrl+Alt+S, or press F1 and then select/type PlatformIO: Open Serial Monitor, or right click the Text Editor and then click PlatformIO: Open Serial Monitor in context menu

openSerialMonitor

  • Search for library: Click the Library item in the Status Bar at the bottom, or press F1 and then select/type PlatformIO: Search Library, then type the query to search for library. Refer to the User Guide for the query syntax.

searchLibrary

Telemetry data

By default, anonymous telemetry data collection is turned on to understand user behavior to improve this extension. To disable it, update the settings.json as below:

{
    "platformio.enableTelemetry": false
}

Change Log

See Change Log here

Issues

Currently, the extension is in the very initial phase. If you find any bug or have any suggestion/feature request, please join the chat on Gitter or submit the issues to the GitHub Repo.