Select runner for Flash Command in nRF Connect

Hi!

In nRF Connect Extension for VSCode, how can I set a (non-default) runner for the Flash Action in the Actions View?

Specifically, I've got my Adafruit Feather nrf52840 connected via USB and SEGGER JLink and would like to use jlink as a flasher. Clicking on "Flash" in the Action View will however hard code "nrfprog" as flasher to the command line (althout I configured the correct flasher via CMakeLists.txt, i.e. "board_set_flasher(jlink)".

  • The original links seem to be dead - found the docs here: nrfconnect.github.io/.../build_bind_tasks.html

    These docs are much better than my own explanation.

  •   
    Hello Florian,

    Thank you!. It's much appreciated!

    The two items I was missing were

    1. "options" key to set ZEPHYR_BASE so that VSCode sees the west command in its environment. I was expecting this to be handled automatically as the action is from within VSCode.

    2. Build directory as part of the "command" in "tasks". Also, specify the Segger Edu Mini device-id.

    The action execution is a bit slow but at least it works now.

    What I really would like is to have the "Flash" action run the jlink as runner for all the projects in my workspace, so that I don't have to specify  "<YOUR-APP-FOLDER>"  in the path "${workspaceFolder}/<YOUR-APP-FOLDER>/build".

    Is there a way to use the currently selected build path to avoid specifying "<YOUR-APP-FOLDER>" explicitly? I don't want to have separate flash actions for all my projects in the workspace.

    Of course, a "nRF Connect for VSCode" enhancement to add an option to select a "runner" of choice in the nRF Connect extension would be the easiest and best option. 

    Once again, Thank you for the very quick response.

  • You're welcome. Unfortunately, I don't have an answer to your last question, although I'd be interested myself. That's probably something one of the Nordic engineers present on the network could/should answer.

Related