Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!
gusgonnet
Published © MIT

Use Visual Studio Code for your Particle Development Needs

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

BeginnerProtip1 hour9,460
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

gusgonnet
37 projects • 306 followers
With a decade of Software Engineering experience in IoT, I focus on creating Particle IoT solutions coupled with mobile and web applications

Comments