Upload without recompile

When I select Upload from Project tasks, the IDE always compiles and links first even if the Build command just has run.
How can I upload only without the compilation and linking?

Open a new pio terminal and use the following command:
pio run -t nobuild -t upload

You can also edit the toolbar and add this as an extra icon.

  • Click the VS Code Gear Icon
  • Choose “Settings”
  • Navigate to “Extensions / PlatformIO IDE”
  • Toolbar → choose "Edit in settings

Edit the toolbar like so:

...
   "platformio-ide.toolbar": [
        {
            "text": "$(debug-step-out)",
            "tooltip": "PlatformIO: Upload without build",
            "commands": [
                {
                    "id": "platformio-ide.runPIOCoreCommand",
                    "args": "pio run -t nobuild -t upload"
                }
            ]
        },
...
1 Like

Fantastic! Finally working! Thank You!

1 Like

How can I add the menu item at the bottom as a keyboard shortcut?

Sorry, I don’t know…

great solution, but can you explan how to “edit the toolbar” I did not get it !?

As written above:

  • Click the VS Code Gear Icon:
  • Choose “Settings”

image

  • Navigate to “Extensions / PlatformIO IDE”
  • Toolbar → choose "Edit in settings

image

1 Like

Yes, you get an icon at the bottom left of VS Code window by editing the settings.json file.
The question is how do I map such an icon to a keyboard shortcut?

I don’t think you can bind this “Icon” to a keyboard shortcut.

One solution could be to create a new Task (Terminal / Configure Task / Create …)

Then enter the command to be executed:

{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "Buld without upload",
            "type": "shell",
            "command": "pio run -t nobuild -t upload"
        }
    ]
}

Note: The PATH must include the location of the pio.exe.

This task can be bound to a keyboard shortcut by editing the keybindings.json.

But this is stuff for a VS Code forum, not PlatformIO.