Gustavo Gonnet
Published © MIT

Use Visual Studio Code for your Particle Development Needs

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

BeginnerProtip1 hour8,093
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 Gonnet

Gustavo Gonnet

30 projects • 267 followers
If you need professional help with a project, contact me at gusgonnet@gmail.com

Comments

Add projectSign up / Login