When you are manually adding and customizing tasks, you can use several parameters in the tasks.json file you are editing. The following table lists parameters added by the extension for nrf-connect-build and nrf-connect-flash task types, in addition to the parameters provided by Visual Studio Code (see VS Code tasks documentation).
| Parameter | Task type | Description |
|---|---|---|
config |
nrf-connect-build and nrf-connect-flash |
Path of the configuration to build, or ${activeConfig}. Leave blank to select the configuration from a list. |
clean |
nrf-connect-build |
A boolean that cleans the build artifacts (equivalent of west build --clean). Set to false by default. |
runCmake |
nrf-connect-build |
A boolean that triggers CMake to run before building (equivalent of west build --pristine). Set to true by default. |
erase |
nrf-connect-flash |
A boolean that triggers erasing of the entire flash before flashing. Set to true by default. |
snr |
nrf-connect-flash |
If provided with a string number value, it selects the device with the provided serial number for flashing. In case more than one match the provided number, a list of matching devices is displayed. Accepts * wildcards. |
recover |
nrf-connect-flash |
A boolean that triggers using --recover when flashing, which erases user available non-volatile memory and disables the read back protection mechanism, if enabled. Set to false by default. |
runner |
nrf-connect-flash |
If provided with a string word value, it overrides the default SDK runner used for flashing a board. Among the available Zephyr west runners, the recommended runner for Nordic Semiconductor devices are nrfutil and jlink (and before the nRF Connect SDK v3.0.0 release, also nrfjprog). See also the section about west runner in the nRF Connect SDK documentation. |
softreset |
nrf-connect-flash |
A boolean that triggers using soft reset instead of the full reset when flashing, if available. Set to false by default. |
extraArgs |
nrf-connect-flash |
An array of strings containing extra arguments to pass to the flash runner. These arguments are appended to the flash command after all other standard arguments. Empty by default. |