I'm trying to make a task build code for ESPRESSIF IDF natively in VSCode on Linux (Ubuntu 10) but I'm running into some issue with the following task:
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "Build Firmware",
"group": "build",
"type": "shell",
"command": "idf.py",
"args": ["build"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
},
{
"label": "Flash Firmware",
"group": "build",
"type": "shell",
"command": "idf.py",
"args": ["-p","${input:setPort}","flash"],
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
}
}
],
"inputs": [
{
"id": "setPort",
"type" : "command",
"command": "ls /dev/tty* | grep USB" }
]
}
But I getting the following error:
input variable 'variable' can only be of type 'prompt String', 'pickString', or 'command'.
The expected behavior was to assign the parsed output of ls /dev/tty* | grep USB
like /dev/ttyUSB0
to setPort and in term pass a command like idf.py -p /dev/ttyUSB0 flash as part or the build process.
Any pointers will be greatly appreciated. (BTW, No, I don't what to use platfromIO :))