For those using the Arduino plugin rather than PlatformIO:
the output usually defaults to a folder in the OS’s temporary area (e.g.
%TEMP% on Windows), but you can explicitly specify an output folder by editing the
/.vscode/arduino.json file (which is usually autogenerated if you’re already tried to compile before).
That file has several settings:
board - Specifies the target board/CPU. Mine is typically set to
sketch - Specifies which
.ino file is the main
port - Specifies the upload port, e.g.
COM5 et cetera on Windows
output - This is the setting you can add to specify the output folder. If it’s a relative path it’ll be relative to the folder containing
arduino.json for Sliding Tiles consists of:
Hence combining that with a
tasks.json like this one:
"label": "Run Hex",
"command": "ProjectABE Build\\SlidingTiles.ino.hex",
should theoretically run ProjectABE when
Tasks: Run Test Task is selected from the ‘command palette’ (i.e. the F1 menu).
ProjectABE.exe is in one of the folders specified by
You can then set up a keybind to the task command.
(I’ve recently done a similar thing for Haskell.)
There’s probably a better solution, but like I say, VSCode’s documentation is pretty atrocious so figuring out what kind of things are possible is a nuissance.