Gustavo
Published © MIT

Use Visual Studio Code for your Particle Development Needs

Use this lightweight, cross-platform editor while developing Particle software.

BeginnerProtip1 hour9,421
Use Visual Studio Code for your Particle Development Needs

Things used in this project

Story

Read more

Code

tasks.json

JSON
updated in 2018
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Build Particle firmware",
            "type": "shell",
            "command": "particle",
            "windows": {
                "command": "particle"
            },
            "args": [
                "compile",

                // choose here your hardware
                // "duo",
                "photon",
                // "electron",
                // "bluz",

                "${workspaceRoot}",
                "--saveTo",
                "${workspaceRoot}/firmware.bin"
            ],
            "group": "build",
            "presentation": {
                "reveal": "always",
                "panel": "new"
            },
            "problemMatcher": {
                "owner": "cpp",
                "fileLocation": ["relative", "${workspaceRoot}"],
                "pattern": {
                    "regexp": "^(.*?):(\\d+):(\\d+):\\s+(warning|error|fatal error):\\s+(.*)$",
                    "file": 1,
                    "line": 2,
                    "column": 3,
                    "severity": 4,
                    "message": 5
                },
                "severity":"error"
            }
        },
        {
            "label": "Flash Particle firmware",
            "type": "shell",
            "command": "particle",
            "windows": {
                "command": "flash"
            },
            "args": [
                "flash",

                // use hardware name for cloud flashing 
                // use --usb for usb flashing
                "particle_name",
                // "--usb",

                "firmware.bin"
            ],
            "group": "test",
            "presentation": {
                "reveal": "always",
                "panel": "new"
            }
        }
    ]
}

Credits

Gustavo

Gustavo

33 projects • 302 followers
I focus on creating Particle IoT solutions coupled with mobile and web applications. Available for contract work at gusgonnet@gmail.com.

Comments