nRF Connect for VSCode - How to make jlink the default runner for flashing a device

Hello,

I've been trying to bind a custom task to an action so that flashing a device defaults to using "jlink" runner whenever I flash from "Action > Flash" in nRF for VSCode.

I've followed the instructions at  https://nrfconnect.github.io/vscode-nrf-connect/guides/build_bind_tasks.html but without any success. 


Below is the nRF Connect Workspace Tasks file relevant to the action.

I've added a task "jlink flash" and made an entry in "nrf-connect.taskbindings" for it.

I have verified that the script  "${workspaceFolder}/jlink_flash.sh" executes correctly from a macOS Terminal window.

It appears that the taskName "jlink flash" is recognized but the flashing still uses "pyocd"

What am I doing incorrectly? Please review the changes in the Workspace ".  Thank you.

I understand that tasks/actions is a great feature but for ease of use and less confusion, it would be very useful to have an option in the nRF extension settings to select a flash "runner" type (e.g. pyocd, jlink).



Parents Reply
  • Hi Ravi,
    The "tasks" entry should be an array. Also there does not seem to be any proof that his script is actually called or what the content of that script is.


    Instead of calling a custom script in the task, it is simpler to call west flash, like:
    "command": "west", "args": ["flash", "--runner", ...] .


    In order to confirm that the task is called correctly. please share the output of the terminal window that executed the flash task.


    -Priyanka

Children
Related