nRF Connect for VS Code unable to connect to device

Hi!

I'm trying out the nRF Connect for VS Code on a M1 Mac, and have a nRF9160-DK connected.

The VS Code stuff works fine, I'm able to build sample programs fine, but the nRF9160-DK does not show up as "Connected Devices".
I'm able to flash the nRF9160-DK with the newly built .hex-file via the SEGGER Jlink program from the command line (JLinkExe), but not able to flash via "Actions" in the VSCode extension ("No devices connected").

Also the Programmer (from the Desktop manager) does not connect to the device.

I've read other posts stating some issues with the M1 Mac versions, so have (also) tried installed x86-versions of the tools, but still no change.

This is output of the system report (if it might help):

# nRFConnect System Report - 2022-01-02T17-57-31.753Z

- System:     Apple Inc. MacBookPro17,1
- BIOS:       Apple Inc. null
- CPU:        1 x Apple M1 2.4 GHz 8 cores (8 physical)
- Memory:     39.6 MB free of 16 GB total
- Filesystem: /dev/disk3s1s1 (APFS) 460.4 GB 5.8% used

- OS:         macOS (11.6.1) darwin x64

- Versions
    - kernel: 20.6.0
    - git: 2.30.1
    - node: 14.16.0
    - python: 2.7.16
    - python3: 3.8.9

- Connected devices:
    - /dev/tty.usbmodem0009600048861: 000960004886 PCA10090

Any hints of how to solve this?

Parents
  • Hi Marte, and thanks for your fast reply!

    I have installed 10.14.0 of the command line tools, and JLink is on version 7.52d.

    And, looks like you're into something:

    aeh-mbp:v1.8.0 alfe$ nrfjprog --version --log
    ERROR: [SeggerBackend] - Dll failed to open.
    ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please
    ERROR: reinstall latest JLinkARM from Segger webpage.

    aeh-mbp:v1.8.0 alfe$ nrfjprog --com
    ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please
    ERROR: reinstall latest JLinkARM from Segger webpage.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    aeh-mbp:v1.8.0 alfe$

    Support info from VSCode:

    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:38 PDT 2021; root:xnu-7195.141.8~1/RELEASE_ARM64_T8101",
        "osKernel": "20.6.0",
        "vscode": "1.63.2",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2022-01-03T15:50:33.381Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "22:49:07",
        "osUptime": "1131:41:51",
        "cpu": {
          "model": "Apple M1",
          "speed": "24 MHz",
          "count": 4
        },
        "memory": {
          "total": "16.00 GB",
          "free": "0.02 GB"
        }
      },
      "workspace": {
        "name": "workspace (Workspace)",
        "workspaceFile": "/Users/alfe/Documents/NRF/azure_iot_hub/workspace.code-workspace",
        "folders": [
          "/Users/alfe/Documents/NRF",
          "/Users/alfe/Documents/NRF/blinky2",
          "/Users/alfe/Documents/NRF/hello_world3",
          "/Users/alfe/Documents/NRF/azure_iot_hub"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.12.137",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-connect-2021.12.137",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "atlassian.atlascode": "2.10.1",
          "cschlosser.doxdocgen": "1.3.2",
          "janjoerke.jenkins-pipeline-linter-connector": "1.2.0",
          "jeff-hykin.better-cpp-syntax": "1.15.10",
          "ms-azuretools.vscode-azureappservice": "0.23.0",
          "ms-azuretools.vscode-azurefunctions": "1.6.0",
          "ms-azuretools.vscode-azureresourcegroups": "0.4.0",
          "ms-python.python": "2021.12.1559732655",
          "ms-python.vscode-pylance": "2021.12.2",
          "ms-toolsai.jupyter": "2021.11.1001550889",
          "ms-toolsai.jupyter-keymap": "1.0.0",
          "ms-toolsai.jupyter-renderers": "1.0.4",
          "ms-vscode-remote.remote-containers": "0.209.6",
          "ms-vscode-remote.remote-ssh": "0.70.0",
          "ms-vscode-remote.remote-wsl": "0.63.13",
          "ms-vscode.azure-account": "0.9.11",
          "ms-vscode.cmake-tools": "1.9.2",
          "ms-vscode.cpptools-extension-pack": "1.1.0",
          "ms-vscode.cpptools-themes": "1.0.0",
          "redhat.java": "1.2.0",
          "redhat.vscode-yaml": "1.2.2",
          "siegebell.incremental-search": "0.2.1",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17",
          "VisualStudioExptTeam.vscodeintellicode": "1.2.15",
          "vscjava.vscode-java-debug": "0.37.0",
          "vscjava.vscode-java-dependency": "0.18.9",
          "vscjava.vscode-java-pack": "0.20.0",
          "vscjava.vscode-java-test": "0.33.1",
          "vscjava.vscode-maven": "0.34.2"
        }
      },
      "tools": {
        "/Applications/SEGGER/JLink/JLinkExe": "7.52d",
        "/usr/local/bin/nrfjprog": null,
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/cmake": "3.21.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/west": "0.12.0",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/python3": "3.9.6",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gperf": "3.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gn": "1959",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/git": "2.32.0"
      },
      "connectedDevices": [],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.8.0}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.8.0}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}/blinky2",
            "${workspaceFolder}/hello_world3",
            "${workspaceFolder}/azure_iot_hub"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          },
          "python": ""
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null
        }
      },
      "environment": {
        "westExe": "/opt/nordic/ncs/v1.8.0/toolchain/bin/west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/alfe",
          "PATH": "/opt/nordic/ncs/v1.8.0/toolchain/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin/",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v1.8.0/zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.8.0/toolchain",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "alfe"
        },
        "toolchainPath": "/opt/nordic/ncs/v1.8.0/toolchain",
        "toolchainBinPath": "/opt/nordic/ncs/v1.8.0/toolchain/bin",
        "toolchainVersion": "1.8.0"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    
    

    BR

    -Alf

  • Hi Alf,

    Where did you install nRF Command Line Tools, and is it added to PATH? The default location on macOS is /Applications/Nordic Semiconductor/.

    From the support information it looks like VS Code is looking for nrfjprog in /usr/local/bin/nrfjprog, but it does not seem to find anything there, since the version is "null".

    Best regards,

    Marte

  • Hi Alf,

    Great to hear that nrfjprog runs now. That solves one issue at least.

    What version of nRF Connect for Desktop do you have installed? Version 3.9.2 was released yesterday. Can you try installing it and see if anything changes? The installation is not available on our download page yet, but there should be a pop up asking you to install 3.9.2 when opening nRF Connect for Desktop if you have not already. If not, you can try going to settings -> check for updates, or you can download it from here: https://github.com/NordicSemiconductor/pc-nrfconnect-launcher/releases.

    Best regards,

    Marte

  • Actually, I also installed the newest version of VSCode (Apple Silicon, NOT the Universal), and now it works a little better!

    I can see the nRF9169 board under "Connected Devices", and I'm abel to e.g. debug a program on the board via Actions->Debug.

    However, flashing the device still fails (via Actions->Flash), this is the error message:

    > Executing task: nRF Connect: Flash blinky2/build (active) <
    
    Flashing build to undefined
    west flash -d /Users/alfe/Documents/NRF/blinky2/build --skip-rebuild -r nrfjprog --snr 960004886
    
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: /Users/alfe/Documents/NRF/blinky2/build/zephyr/merged.hex
    ERROR: JLinkARM DLL load failed. Try again. If it keeps failing, please
    ERROR: reinstall latest JLinkARM from Segger webpage.
    NOTE: For additional output, try running again with logging enabled (--log).
    NOTE: Any generated log error messages will be displayed.
    FATAL ERROR: command exited with status 32: nrfjprog --program /Users/alfe/Documents/NRF/blinky2/build/zephyr/merged.hex --sectorerase -f NRF91 --snr 960004886
    The terminal process terminated with exit code: 32.

    However, flashing the device via the command line directly with nrfjprog works fine:

    aeh-mbp:hello_world3 alfe$ nrfjprog -f NRF91 --program build/zephyr/merged.hex 
    Parsing image file.
    Verified OK.
    

    But running the "west flash"-command fetched from VSCode on the same command line fails (with the same DLL error message).

    BR

    -Alf

  • Ok, still progress...

    I've installed 3.9.2 of the desktop (Settings->Check for updates).
    No visible change (other than the version no), I guess the Programmer has the same version (2.0.1), and that still fails on startup: "Failed to get the library versions: JLINKARM_DLL_COULD_NOT_BE_OPENED (Origin: "Failed to get module versions.")"

    And, as stated above, "west flash" fails, but calling nrfjprog directly works.

    -Alf

  • Hi Alf,

    ArmNewbie said:
    I guess the Programmer has the same version (2.0.1)

    The Programmer version is the same, but there were some updates in the underlying libraries, and I was hoping these updates might fix the problem.

    I will report this to our developers, and I will also ask if there are any workarounds. Could you please generate the support information from VS Code again, to have the updated information now that you have updated some of the tools?

    Best regards,

    Marte

  • Hi and thanks for your effort so far!

    Here is the updated support info from VSCode:

    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:38 PDT 2021; root:xnu-7195.141.8~1/RELEASE_ARM64_T8101",
        "osKernel": "20.6.0",
        "vscode": "1.63.2",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2022-01-04T19:55:03.854Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "06:15:29",
        "osUptime": "1159:46:22",
        "cpu": {
          "model": "Apple M1",
          "speed": "24 MHz",
          "count": 4
        },
        "memory": {
          "total": "16.00 GB",
          "free": "0.16 GB"
        }
      },
      "workspace": {
        "name": "NRF",
        "workspaceFile": null,
        "folders": [
          "/Users/alfe/Documents/NRF"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.12.137",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-connect-2021.12.137",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "atlassian.atlascode": "2.10.1",
          "cschlosser.doxdocgen": "1.3.2",
          "janjoerke.jenkins-pipeline-linter-connector": "1.2.0",
          "jeff-hykin.better-cpp-syntax": "1.15.10",
          "ms-azuretools.vscode-azureappservice": "0.23.0",
          "ms-azuretools.vscode-azurefunctions": "1.6.0",
          "ms-azuretools.vscode-azureresourcegroups": "0.4.0",
          "ms-python.python": "2021.12.1559732655",
          "ms-python.vscode-pylance": "2021.12.2",
          "ms-toolsai.jupyter": "2021.11.1001550889",
          "ms-toolsai.jupyter-keymap": "1.0.0",
          "ms-toolsai.jupyter-renderers": "1.0.4",
          "ms-vscode-remote.remote-containers": "0.209.6",
          "ms-vscode-remote.remote-ssh": "0.70.0",
          "ms-vscode-remote.remote-wsl": "0.63.13",
          "ms-vscode.azure-account": "0.9.11",
          "ms-vscode.cmake-tools": "1.9.2",
          "ms-vscode.cpptools-extension-pack": "1.1.0",
          "ms-vscode.cpptools-themes": "1.0.0",
          "redhat.java": "1.2.0",
          "redhat.vscode-yaml": "1.2.2",
          "siegebell.incremental-search": "0.2.1",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17",
          "VisualStudioExptTeam.vscodeintellicode": "1.2.15",
          "vscjava.vscode-java-debug": "0.37.0",
          "vscjava.vscode-java-dependency": "0.18.9",
          "vscjava.vscode-java-pack": "0.20.0",
          "vscjava.vscode-java-test": "0.33.1",
          "vscjava.vscode-maven": "0.34.2"
        }
      },
      "tools": {
        "/Applications/SEGGER/JLink/JLinkExe": "7.58b",
        "/Applications/Nordic Semiconductor/bin//nrfjprog": "10.15.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/cmake": "3.21.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/west": "0.12.0",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/python3": "3.9.6",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gperf": "3.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gn": "1959",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/git": "2.32.0"
      },
      "connectedDevices": [
        {
          "id": "960004886"
        }
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.8.0}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.8.0}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}/blinky2",
            "${workspaceFolder}/hello_world3",
            "${workspaceFolder}/azure_iot_hub"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          },
          "python": ""
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null
        }
      },
      "environment": {
        "westExe": "/opt/nordic/ncs/v1.8.0/toolchain/bin/west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/alfe",
          "PATH": "/opt/nordic/ncs/v1.8.0/toolchain/bin:/Applications/SEGGER/JLink:/Applications/Nordic Semiconductor/bin/:/opt/nordic/ncs/v1.8.0/toolchain/bin/:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin/",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v1.8.0/zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.8.0/toolchain",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "alfe"
        },
        "toolchainPath": "/opt/nordic/ncs/v1.8.0/toolchain",
        "toolchainBinPath": "/opt/nordic/ncs/v1.8.0/toolchain/bin",
        "toolchainVersion": "1.8.0"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    

    -Alf

Reply
  • Hi and thanks for your effort so far!

    Here is the updated support info from VSCode:

    {
      "platform": {
        "os": "darwin",
        "osVersion": "Darwin Kernel Version 20.6.0: Tue Oct 12 18:33:38 PDT 2021; root:xnu-7195.141.8~1/RELEASE_ARM64_T8101",
        "osKernel": "20.6.0",
        "vscode": "1.63.2",
        "electron": "13.5.2",
        "node": "v14.16.0"
      },
      "system": {
        "date": "2022-01-04T19:55:03.854Z",
        "vscodeRoot": "/Applications/Visual Studio Code.app/Contents/Resources/app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "06:15:29",
        "osUptime": "1159:46:22",
        "cpu": {
          "model": "Apple M1",
          "speed": "24 MHz",
          "count": 4
        },
        "memory": {
          "total": "16.00 GB",
          "free": "0.16 GB"
        }
      },
      "workspace": {
        "name": "NRF",
        "workspaceFile": null,
        "folders": [
          "/Users/alfe/Documents/NRF"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2021.12.137",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-connect-2021.12.137",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2021.11.7",
            "path": "/Users/alfe/.vscode/extensions/nordic-semiconductor.nrf-terminal-2021.11.7",
            "isActive": true
          },
          "nordic-semiconductor.devicetree": null,
          "nordic-semiconductor.kconfig": null
        },
        "external": {
          "marus25.cortex-debug": "0.4.10",
          "ms-vscode.cpptools": "1.7.1",
          "ms-vscode.js-debug": "1.62.0",
          "ms-vscode.js-debug-companion": "1.0.15",
          "ms-vscode.references-view": "0.0.81",
          "ms-vscode.vscode-js-profile-table": "0.0.18",
          "atlassian.atlascode": "2.10.1",
          "cschlosser.doxdocgen": "1.3.2",
          "janjoerke.jenkins-pipeline-linter-connector": "1.2.0",
          "jeff-hykin.better-cpp-syntax": "1.15.10",
          "ms-azuretools.vscode-azureappservice": "0.23.0",
          "ms-azuretools.vscode-azurefunctions": "1.6.0",
          "ms-azuretools.vscode-azureresourcegroups": "0.4.0",
          "ms-python.python": "2021.12.1559732655",
          "ms-python.vscode-pylance": "2021.12.2",
          "ms-toolsai.jupyter": "2021.11.1001550889",
          "ms-toolsai.jupyter-keymap": "1.0.0",
          "ms-toolsai.jupyter-renderers": "1.0.4",
          "ms-vscode-remote.remote-containers": "0.209.6",
          "ms-vscode-remote.remote-ssh": "0.70.0",
          "ms-vscode-remote.remote-wsl": "0.63.13",
          "ms-vscode.azure-account": "0.9.11",
          "ms-vscode.cmake-tools": "1.9.2",
          "ms-vscode.cpptools-extension-pack": "1.1.0",
          "ms-vscode.cpptools-themes": "1.0.0",
          "redhat.java": "1.2.0",
          "redhat.vscode-yaml": "1.2.2",
          "siegebell.incremental-search": "0.2.1",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17",
          "VisualStudioExptTeam.vscodeintellicode": "1.2.15",
          "vscjava.vscode-java-debug": "0.37.0",
          "vscjava.vscode-java-dependency": "0.18.9",
          "vscjava.vscode-java-pack": "0.20.0",
          "vscjava.vscode-java-test": "0.33.1",
          "vscjava.vscode-maven": "0.34.2"
        }
      },
      "tools": {
        "/Applications/SEGGER/JLink/JLinkExe": "7.58b",
        "/Applications/Nordic Semiconductor/bin//nrfjprog": "10.15.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/cmake": "3.21.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/west": "0.12.0",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/python3": "3.9.6",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/ninja": "1.10.2",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gperf": "3.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/dtc": "1.6.1",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/arm-none-eabi-gcc": "9-2019-q4-major",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/gn": "1959",
        "/opt/nordic/ncs/v1.8.0/toolchain/bin/git": "2.32.0"
      },
      "connectedDevices": [
        {
          "id": "960004886"
        }
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:1.8.0}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:1.8.0}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}/blinky2",
            "${workspaceFolder}/hello_world3",
            "${workspaceFolder}/azure_iot_hub"
          ],
          "jlink": {
            "rtosPlugin": ""
          },
          "kconfig": {
            "interface": "kconfig"
          },
          "welcome": {
            "showOnStartup": false
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character"
        },
        "nordic-semiconductor.devicetree": {
          "modules": [
            "${zephyrBase}",
            "${zephyrBase}/../nrf",
            "."
          ],
          "zephyr": "",
          "ctxFile": "",
          "defaultBoard": ""
        },
        "nordic-semiconductor.kconfig": {
          "root": "",
          "env": {},
          "cfiles": true,
          "disable": false,
          "zephyr": {
            "base": ""
          },
          "python": ""
        },
        "marus25.cortex-debug": {
          "armToolchainPath": null,
          "armToolchainPrefix": "arm-none-eabi",
          "gdbPath": null,
          "JLinkGDBServerPath": null,
          "openocdPath": null,
          "pyocdPath": null,
          "PEGDBServerPath": null,
          "stutilPath": null,
          "stlinkPath": null,
          "stm32cubeprogrammer": null,
          "enableTelemetry": true,
          "flattenAnonymous": false,
          "registerUseNaturalFormat": true,
          "variableUseNaturalFormat": true,
          "dbgServerLogfile": null
        }
      },
      "environment": {
        "westExe": "/opt/nordic/ncs/v1.8.0/toolchain/bin/west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "GIT_EXEC_PATH": "/opt/nordic/ncs/v1.8.0/toolchain/Cellar/git/2.32.0_1/libexec/git-core",
          "HOME": "/Users/alfe",
          "PATH": "/opt/nordic/ncs/v1.8.0/toolchain/bin:/Applications/SEGGER/JLink:/Applications/Nordic Semiconductor/bin/:/opt/nordic/ncs/v1.8.0/toolchain/bin/:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin/",
          "ZEPHYR_BASE": "/opt/nordic/ncs/v1.8.0/zephyr",
          "GNUARMEMB_TOOLCHAIN_PATH": "/opt/nordic/ncs/v1.8.0/toolchain",
          "ZEPHYR_TOOLCHAIN_VARIANT": "gnuarmemb",
          "USER": "alfe"
        },
        "toolchainPath": "/opt/nordic/ncs/v1.8.0/toolchain",
        "toolchainBinPath": "/opt/nordic/ncs/v1.8.0/toolchain/bin",
        "toolchainVersion": "1.8.0"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    

    -Alf

Children
  • Hi Alf,

    Which variant did you chose when installing the J-Link drivers for nrfjprog v10.15.1?

    I see you write that you chose the x86 variants in your original post, but was this for earlier versions of the tools, or did you install the x86 variant for the latest version as well? On M1 based Mac machines you must install the Intel/x86 variant, see Vidar's comment here.

    Can you try uninstalling the Apple Silicon version of VS Code and install the Intel (x86) version of VS Code instead?

    Edit: Please make sure that you have the Intel variant of Python installed as well.

    Best regards,

    Marte

  • Thanks Marte,

    I guess you've finally nailed it!

    x86 versions of JLink drivers and VSCode did the trick!

    Connected devices shows up in VSCode, and debugging, flashing etc works from within VSCode.
    Also the Programmer works nicely, able to connect and read/write to the device through it.

    nrfjprog from the command line still fails, but forcing it to run as x86 works:
    aeh-mbp:hello_world3 alfe$ arch -arch x86_64 nrfjprog -r
    Applying system reset.
    Run.

    A mix of x86 and M1 version does not "communicate" at all!

    The M1 versions (of both JLink and VSCode) mostly works, except that it fails flashing from VSCode, and the Programmer does not connect properly to the device.
    Both fails complaining about the JLinkARM DLL load failing.

    Guess I'll continue using the x86-versions for now, and hope you're able to fix the DLL handling issues for M1 in a future release of your tools?

    -Alf

  • Hi Alf,

    I am glad to hear that the issue is fixed!

    The reason to use Intel is because of driver incompatibilities, as we do not have M1 versions of all components yet. We do have a goal of getting native M1 support, but I do not have any information about when this will happen, unfortunately.

    Best regards,

    Marte

Related