This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF connect with VS code integration problem

HI All

Im having endless trouble with nRf Connect and Vs code. @Ovind was kind enough to assist from the first time I failed to get this working, but it was short lived and I dont understand why im having these issues. I may be missing something.

VS studio not building samples - Nordic Q&A - Nordic DevZone - Nordic DevZone (nordicsemi.com)  - Spent a week, uninstalling, re-installing, it then started working (manage to build and flash about 15 times)

Suddenly after creating a new application, the "application window" disappeared as well as the "connected devices". No matter how many times I added new examples it would not go further after  "create new application from example". The example files can be seen under the explorer but no application window would open for me to add a  build.

After a few uninstall's and re-install's   the "application" window and "connected device " returned after "create new application from example". This time however only Build worked but not the Flash. Error was Ninja: Nothing to do. It would just stop after the build.

I though this can now only be a corrupt windows installation or windows itself. I decided to do a clean windows install on my laptop from scratch not keeping any user files or programs. I redownloaded Vscode, nRF Connect as well as toolchain v1.8,.v1.9, .v1.9.1.  I installed all the extensions (through nRF_Conenct) and open Vs_studio through nRF Connect. 

When I run the Generate support information I can see the "tools" have not been installed.

What am I doing wrong. I reloaded windows twice and installed all the above from scratch at least 5 times to no avail.

Thank you 

{
  "platform": {
    "os": "win32",
    "osVersion": "Windows 10 Pro",
    "osKernel": "10.0.19044",
    "vscode": "1.65.0",
    "electron": "13.5.2",
    "node": "v14.16.0"
  },
  "system": {
    "date": "2022-03-07T08:47:46.976Z",
    "vscodeRoot": "c:\\Users\\meltb\\AppData\\Local\\Programs\\Microsoft VS Code\\resources\\app",
    "nrfConnectForDesktopInstalled": true,
    "vscodeUptime": "00:21:34",
    "osUptime": "22:57:25",
    "cpu": {
      "model": "Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz",
      "speed": "1800 MHz",
      "count": 4
    },
    "memory": {
      "total": "7.89 GB",
      "free": "1.53 GB"
    }
  },
  "workspace": {
    "name": null,
    "workspaceFile": null,
    "folders": []
  },
  "extensions": {
    "internal": {
      "nordic-semiconductor.nrf-connect": {
        "version": "2022.1.192",
        "path": "c:\\Users\\meltb\\.vscode\\extensions\\nordic-semiconductor.nrf-connect-2022.1.192",
        "isActive": true
      },
      "nordic-semiconductor.nrf-terminal": {
        "version": "2022.1.30",
        "path": "c:\\Users\\meltb\\.vscode\\extensions\\nordic-semiconductor.nrf-terminal-2022.1.30",
        "isActive": true
      },
      "nordic-semiconductor.devicetree": null,
      "nordic-semiconductor.kconfig": null
    },
    "external": {
      "marus25.cortex-debug": "1.2.2",
      "ms-vscode.cpptools": "1.8.4",
      "ms-vscode-remote.remote-wsl-recommender": "0.0.14",
      "ms-vscode.js-debug": "1.65.0",
      "ms-vscode.js-debug-companion": "1.0.15",
      "ms-vscode.references-view": "0.0.85",
      "ms-vscode.vscode-js-profile-table": "0.0.18",
      "trond-snekvik.gnu-mapfiles": "1.1.0",
      "twxs.cmake": "0.0.17"
    }
  },
  "tools": {
    "C:\\Program Files\\SEGGER\\JLink\\JLink.exe": "7.62a",
    "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\nrfjprog.exe": "10.15.4",
    "cmake": "Not found",
    "west": "Not found",
    "C:\\Users\\meltb\\AppData\\Local\\Microsoft\\WindowsApps\\python.exe": null,
    "ninja": "Not found",
    "gperf": "Not found",
    "dtc": "Not found",
    "gnuarmemb": "Not found",
    "gn": "Not found",
    "git": "Not found"
  },
  "connectedDevices": [
    {
      "id": "683015900"
    }
  ],
  "config": {
    "nordic-semiconductor.nrf-connect": {
      "topdir": "",
      "toolchain": {
        "path": ""
      },
      "ozonePath": "",
      "applications": [],
      "jlink": {
        "rtosPlugin": ""
      },
      "kconfig": {
        "interface": "kconfig"
      },
      "welcome": {
        "showOnStartup": false
      },
      "west": {
        "env": {
          "$base": "terminal"
        }
      },
      "boardRoots": [],
      "enableTelemetry": true
    },
    "nordic-semiconductor.nrf-terminal": {
      "terminalMode": "character"
    },
    "nordic-semiconductor.devicetree": {
      "modules": [
        "${zephyrBase}",
        "${zephyrBase}/../nrf",
        "."
      ],
      "zephyr": "C:\\Users\\meltb\\ncs\\v1.9.1\\zephyr",
      "ctxFile": "",
      "defaultBoard": ""
    },
    "nordic-semiconductor.kconfig": {
      "root": "",
      "env": {},
      "cfiles": true,
      "disable": false,
      "zephyr": {
        "base": ""
      },
      "python": "",
      "liveValue": true
    },
    "marus25.cortex-debug": {
      "armToolchainPath": null,
      "armToolchainPrefix": "arm-none-eabi",
      "gdbPath": null,
      "objdumpPath": 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,
      "showDevDebugOutput": "none"
    }
  },
  "environment": {
    "westExe": "west",
    "westEnv": {
      "ELECTRON_RUN_AS_NODE": "1",
      "HOME": "C:\\Users\\meltb",
      "HOMEDRIVE": "C:",
      "HOMEPATH": "\\Users\\meltb"
    }
  },
  "terminal": {
    "shell": null,
    "defaultProfile": null
  }
}


  • Hi,

    Can you share the output that you get after executing "Flash" command from the VS Code? Are you getting any errors?

    Best regards,
    Dejan

  • No errors it just builds and stops

    this happens with flash and erase and flash. It does not seem to go into the next step of the process after build.

    Building HID_device
    west build --build-dir d:\my_vscode_apps\HID_RGB_gambling\HID_device\build d:\my_vscode_apps\HID_RGB_gambling\HID_device

    [1/11] Building C object CMakeFiles/app.dir/src/main.c.obj
    [2/11] Linking C static library app\libapp.a
    [3/11] Linking C executable zephyr\zephyr_pre0.elf

    [4/11] Generating dev_handles.c
    [5/11] Building C object zephyr/CMakeFiles/zephyr_pre1.dir/dev_handles.c.obj
    [6/11] Linking C executable zephyr\zephyr_pre1.elf

    [7/11] Generating linker.cmd
    [8/11] Generating isr_tables.c, isrList.bin
    [9/11] Building C object zephyr/CMakeFiles/zephyr_final.dir/isr_tables.c.obj
    [10/11] Building C object zephyr/CMakeFiles/zephyr_final.dir/dev_handles.c.obj
    [11/11] Linking C executable zephyr\zephyr.elf
    Memory region Used Size Region Size %age Used
    FLASH: 178580 B 1 MB 17.03%
    SRAM: 38225 B 256 KB 14.58%
    IDT_LIST: 0 GB 2 KB 0.00%

    Terminal will be reused by tasks, press any key to close it.

  • Hi,

    Try to remove current build configuration and build folder, restart the VS Code, add build configuration for your board, and do pristine build. If everything is successful, press flash button. Ensure that the board is connected and that you are flashing the right board. 
    Instead of using west, please use buttons from VS Code for building the application.
    If there are some errors, please provide the output and specify where the errors appear.

    Best regards,
    Dejan

  • Removed the current build , folder also removed. Prestine build from action center in vscode works and then stops. no flashing.

    I only have the one 52840dk board which is linked to the board. under connected devices I can reset the board, recover it and connect it to RTT.

  • Hi,

    melt said:
    Prestine build from action center in vscode works and then stops. no flashing.

    I am not quite sure that I understand what you are trying to say with "works and then stops". What exactly happens? What is working and at which point it stops?

    My understanding of your problem is that the build process runs and completes successfully, but when you try to flash nothing happens. Is this correct?

    Best regards,
    Dejan

Related