VS-Code to BLE-Sniffer nrf52840-dk flash-program-debug incompatibility Bug

For those developers using the same PC/laptop to develop/debug

zephyr nrf52840 BLE software with VS Code and run the BLE Sniffer,

there is a big Bug which damages the usability of the tools many times a day.

There appearsto be no way to tell VS Code permanently which connected device

is to be programmed with the .hex/.bin.

Thus when Debug button is clicked, VS Code tries to display all 3 devices 

(custom BLE PCB through Segger, nrf52840-DK-BLE-partner, and BLE Sniffer nrf52840 ),

for the user to choose which one.

However, usually, this display flashes briefly on the screen then disappears (The Bug)

and thus the user is unable to direct the flash programming and debug of the .hex/.bin

to the intended device.

The only way to perform the flash programming is to disconnect the USB cables

which connect the other devices to the pc/laptop.

That is unworkable in many debug situations.

I do hope there is a workaround and ultimately a fix to this Bug.

Parents
  • Hi,

    It is possible to link devices to build configurations in the extension:

    Linking the device and the build configuration will make VS Code always program the linked device. This also works for debugging.

    I have seen someone else with the same issue and believe it to be a bug.
    Please provide support information from the VS Code extension:

    1. Open the command palette (Ctrl + Shift + P or View > Command Palette).
    2. Write "nRF Connect: Generate support information" and press enter.
    3. Copy the entire support information output.
    4. Upload it here using Insert > Code or upload a .txt file with Insert > Image/video/file.

    Make sure to remove confidential information you do not want to be shared in a public case.

    Best regards,

    Marte

  • Good, that link config/device workaround works.

    The content of that support information generation reminds me that setting

    NRF terminal Scrollback does not work.

    IMPORTANT: The data below could contain sensitive or confidential information about your environment.
    If you do not wish this to be seen by others, please make sure to remove it before sharing.
    
    For help and support, visit the Nordic DevZone at https://devzone.nordicsemi.com/.
    
    {
      "platform": {
        "os": "win32",
        "osVersion": "Windows 10 Home",
        "osKernel": "10.0.22621",
        "vscode": "1.75.1",
        "electron": "19.1.9",
        "node": "v16.14.2"
      },
      "system": {
        "date": "2023-02-20T15:49:39.874Z",
        "vscodeRoot": "c:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
        "nrfConnectForDesktopInstalled": true,
        "vscodeUptime": "30:12:46",
        "osUptime": "72:24:34",
        "cpu": {
          "model": "AMD Ryzen 7 5800H with Radeon Graphics",
          "speed": "3194 MHz",
          "count": 8
        },
        "memory": {
          "total": "63.35 GB",
          "free": "47.55 GB"
        }
      },
      "workspace": {
        "name": "[Aeneas]labs-firmwarepropatch-c737968ab8d4",
        "workspaceFile": null,
        "folders": [
          "c:\\nordicsemi\\myapps\\[Aeneas]labs-firmwarepropatch-c737968ab8d4"
        ]
      },
      "extensions": {
        "internal": {
          "nordic-semiconductor.nrf-connect": {
            "version": "2023.1.44",
            "path": "c:\\Users\\[Aeneas]\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2023.1.44-win32-x64",
            "isActive": true
          },
          "nordic-semiconductor.nrf-terminal": {
            "version": "2022.11.29",
            "path": "c:\\Users\\[Aeneas]\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.11.29",
            "isActive": true
          },
          "nordic-semiconductor.nrf-devicetree": {
            "version": "2022.11.153",
            "path": "c:\\Users\\[Aeneas]\\.vscode\\extensions\\nordic-semiconductor.nrf-devicetree-2022.11.153",
            "isActive": true
          },
          "nordic-semiconductor.nrf-kconfig": {
            "version": "2022.11.50",
            "path": "c:\\Users\\[Aeneas]\\.vscode\\extensions\\nordic-semiconductor.nrf-kconfig-2022.11.50",
            "isActive": true
          }
        },
        "external": {
          "marus25.cortex-debug": null,
          "ms-vscode.cpptools": "1.14.3",
          "ms-vscode-remote.remote-wsl-recommender": "0.0.18",
          "ms-vscode.js-debug": "1.75.1",
          "ms-vscode.js-debug-companion": "1.0.18",
          "ms-vscode.vscode-js-profile-table": "1.0.3",
          "atlassian.atlascode": "3.0.2",
          "ms-vscode.cmake-tools": "1.13.45",
          "ms-vscode.cpptools-extension-pack": "1.3.0",
          "ms-vscode.cpptools-themes": "2.0.0",
          "ms-vscode.hexeditor": "1.9.11",
          "redhat.vscode-yaml": "1.11.0",
          "trond-snekvik.gnu-mapfiles": "1.1.0",
          "twxs.cmake": "0.0.17"
        }
      },
      "tools": {
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gcc.exe": "0.15.1",
        "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.82",
        "C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.19.0",
        "nrfutil": "Not found",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\cmake.exe": "3.20.5",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\Scripts\\west.exe": "0.14.0",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\python.exe": "3.8.2",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\ninja.exe": "1.9.0",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\gperf.exe": "3.1",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\dtc.exe": "1.4.7",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\gn.exe": "2073",
        "c:\\nordicsemi\\toolchains\\v2.2.0\\mingw64\\bin\\git.exe": "2.37.3.windows.1",
        "gdbPath": "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin\\arm-zephyr-eabi-gdb.exe"
      },
      "sdks": [
        {
          "version": "2.1.2",
          "path": "c:\\nordicsemi\\v2.1.2"
        },
        {
          "version": "2.2.0",
          "path": "c:\\nordicsemi\\v2.2.0"
        }
      ],
      "toolchains": [
        {
          "version": "2.1.2",
          "path": "c:\\nordicsemi\\toolchains\\v2.1.2"
        },
        {
          "version": "2.2.0",
          "path": "c:\\nordicsemi\\toolchains\\v2.2.0"
        }
      ],
      "connectedDevices": [
        {
          "serialNumber": "5102[Aeneas]"
        }
      ],
      "deviceProviders": [
        "nrfjprog"
      ],
      "config": {
        "nordic-semiconductor.nrf-connect": {
          "topdir": "${nrf-connect.sdk:2.2.0}",
          "toolchain": {
            "path": "${nrf-connect.toolchain:2.2.0}"
          },
          "ozonePath": "",
          "applications": [
            "${workspaceFolder}"
          ],
          "applicationOptions": {},
          "kconfig": {
            "interface": "kconfig",
            "executeInDefaultShell": false
          },
          "welcome": {
            "showOnStartup": true
          },
          "west": {
            "env": {
              "$base": "terminal"
            }
          },
          "boardRoots": [],
          "enableTelemetry": false,
          "taskBindings": {},
          "debugging": {
            "backend": "nRF Debug",
            "flash": true,
            "bindings": {
              "${workspaceFolder}/build": "Launch build"
            }
          },
          "activeAppFollowActiveEditor": true
        },
        "nordic-semiconductor.nrf-terminal": {
          "terminalMode": "character",
          "scrollBack": 90000
        }
      },
      "environment": {
        "westExe": "west",
        "westEnv": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "C:\\Users\\[Aeneas]",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\[Aeneas]",
          "Path": "c:\\nordicsemi\\toolchains\\v2.2.0\\mingw64\\bin;c:\\nordicsemi\\toolchains\\v2.2.0\\mingw64\\libexec\\git-core;c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin;c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin;c:\\nordicsemi\\toolchains\\v2.2.0\\arm-zephyr-eabi\\bin;c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\Scripts;C:\\Program Files\\SlickEdit Pro 27.0.0\\win\\;C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2016a\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "ZEPHYR_BASE": "c:\\nordicsemi\\v2.2.0\\zephyr",
          "ZEPHYR_TOOLCHAIN_VARIANT": "zephyr",
          "ZEPHYR_SDK_INSTALL_DIR": "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\zephyr-sdk",
          "PYTHONPATH": "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin;c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\Lib;c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin\\Lib\\site-packages",
          "Python3_ROOT": "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\bin"
        },
        "inherited": {
          "ELECTRON_RUN_AS_NODE": "1",
          "HOME": "C:\\Users\\[Aeneas]",
          "HOMEDRIVE": "C:",
          "HOMEPATH": "\\Users\\[Aeneas]",
          "Path": "C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2016a\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Microsoft VS Code\\bin",
          "PATH": "C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\;C:\\WINDOWS\\System32\\OpenSSH\\;C:\\Program Files\\MATLAB\\R2016a\\bin;C:\\Program Files\\Git\\cmd;C:\\Program Files\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\Scripts\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Python\\Python311\\;C:\\Users\\[Aeneas]\\AppData\\Local\\Microsoft\\WindowsApps;;C:\\Users\\[Aeneas]\\AppData\\Local\\Programs\\Microsoft VS Code\\bin"
        },
        "toolchainPath": "c:\\nordicsemi\\toolchains\\v2.2.0",
        "toolchainBinPath": "c:\\nordicsemi\\toolchains\\v2.2.0\\opt\\zephyr-sdk\\arm-zephyr-eabi\\bin",
        "toolchainVersion": "2.2.0"
      },
      "terminal": {
        "shell": null,
        "defaultProfile": null
      }
    }
    

  • Hi,

    I am glad to hear that the workaround works. I have reported the bug to the developers and forwarded your log.

    Best regards,
    Marte

  • Hi,

    The developers are looking into the issue. Until there is a fix, the recommended workaround is to link the build configs and devices, as I mentioned previously.

    Best regards,
    Marte

  • Hi,

    This has been fixed in v2023.2.56, which is available now.

    Best regards,
    Marte

Reply Children
No Data
Related