Skip to content

Instantly share code, notes, and snippets.

@nickyonge
Last active December 19, 2024 02:03
Show Gist options
  • Save nickyonge/8f136717a3718c85de9f4d7e401999ca to your computer and use it in GitHub Desktop.
Save nickyonge/8f136717a3718c85de9f4d7e401999ca to your computer and use it in GitHub Desktop.
PlatformIO IDE VSCode toolbar buttons for "Set Fuses", "Upload, Build, and Set Fuses", and "Upload w/o Build, and Set Fuses"
[ see: https://community.platformio.org/t/made-set-fuses-and-upload-and-set-fuses-toolbar-commands/44795 ]
[ ... the rest of settings.json above ... ]
"platformio-ide.toolbar": [
[ ... other toolbar commands ... ]
{
"text": "$(flame)",
"tooltip": "PlatformIO: Set Fuses",
"commands": [
{
"id": "platformio-ide.runPIOCoreCommand",
"args": "pio run -t fuses -e ${command:platformio-ide.activeEnvironment}"
}
]
},
{
"text": "$(rocket)",
"tooltip": "PlatformIO: Upload, Build, and Set Fuses",
"commands": [
{
"id": "platformio-ide.runPIOCoreCommand",
"args": "pio run -t upload -e ${command:platformio-ide.activeEnvironment}; Write-Host ''; Write-Host -ForegroundColor Yellow ' > > > PROJECT BUILT AND UPLOADED, SETTING FUSES, PLEASE WAIT... < < < '; Write-Host ''; pio run -t fuses -e ${command:platformio-ide.activeEnvironment}"
}
]
},
{
"text": "$(zap)",
"tooltip": "PlatformIO: Upload w/o Build, and Set Fuses",
"commands": [
{
"id": "platformio-ide.runPIOCoreCommand",
"args": "pio run -t nobuild -t upload -e ${command:platformio-ide.activeEnvironment}; Write-Host ''; Write-Host -ForegroundColor Yellow ' > > > PROJECT BUILT AND UPLOADED, SETTING FUSES, PLEASE WAIT... < < < '; Write-Host ''; pio run -t fuses -e ${command:platformio-ide.activeEnvironment}"
}
]
},
[ ... other toolbar commands ... ]
],
[ ... the rest of settings.json below ... ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment