Welcome to the preview of nRF Connect for Visual Studio Code (VS Code). The nRF Connect extension lets you develop, build, and debug applications based on the nRF Connect SDK using the VS Code Integrated Development Environment (IDE). In this article, we introduce the preview version of nRF Connect for VS Code and its features, and show you how to get started with it.
nRF Connect for VS Code Interface
VS Code is a fast, cross-platform, and popular IDE. Nordic Semiconductor’s nRF Connect extension turns VS Code into a complete IDE for developing applications for nRF91, nRF53 and nRF52 Series devices on Windows, MacOS or Linux. This includes an interface to the compiler and linker, an RTOS-aware debugger, a seamless interface to the nRF Connect SDK, and a serial terminal.
The provided support for VS Code comes as a bundle of extensions contained in one zip file in this preview release. The bundle consists of:
Please note that these extensions are in beta.
The bundle helps with setting up new nRF-based applications based on a set of examples from the nRF Connect SDK and Zephyr. You can then configure them using the guiconfig feature available from the Zephyr Project. You can also define your own boards within the Zephyr rule set. The DeviceTree viewer displays the configured hardware and helps you navigate the DeviceTree source.
This bundle is based entirely on Zephyr tools, so you can continue your project from the command line at any point. You can also split the development between people with different OS preferences using your company’s internal revision control system. Even more features are still in development. With additional extensions from Microsoft for C/C++, or others for Git, you can spend your complete development life inside this environment.
In addition to the previously mentioned extensions, we strongly recommend installing the Microsoft C/C++ extension. This gives you IntelliSense and mouse-over documentation and APIs.
We’ve made a series of videos you can access through links within the extension itself showing how to use the extension. These are under continuous development and will change as the extension is improved. You can view all videos from this playlist:
As explained in the first video, to install the bundle, download the appended zip from here (Download Link) and extract it to a chosen destination folder. Then, open the Extensions menu from the VS Code toolbar and click the three small dots in the upper right corner. Select Install from VSIX.
Navigate to the extracted files, select all four items, and press install. Note that the file names may be different than those below:
Then, search the Marketplace for C/C++ and install the Microsoft extension:
Open the extension by clicking the icon in the red square shown in the figure below and set up the basic configuration (green). You’re now ready to build an application. Open the walk-through (yellow) for the built-in training and links to the walk-through videos.
The nRF Connect for VS Code extension is undergoing continuous updates. Written documentation is available in the readme file published as part of the extension bundle. You can find it by clicking nRF Connect for VS Code (in the screen shot below, red) in the Extensions menu in the VS Code toolbar (green). During the beta testing, please check the Known Issues chapter if you encounter issues.
A few weeks after this blog post and limited release, the extension bundle will be available in the Microsoft Marketplace at Visual Studio Marketplace, and from then on will be managed from inside VS Code directly without the need for manual download. After the general release, the preview download zip file link will stop working.
If you have any issues related to this preview bundle, contact us on DevZone.
Very nice to see this development, looking forward to try
This is an awesome tool. Read the full walkthrough tutorial and first impressions here.
Perfect. Looking forward to it. It's a huge leap for development with Zephyr + nRF devices.
In this beta version, you could go to File->Preferences-> Settings->Extensions -nRF Connect and edit the 'Board Roots' setting to include a path to the directory that includes your 'boards' folder. Please note the extension also includes a wizard that helps in creating new boards.
We are continuously working on improving the extension. I think this beta version was actively tested on nRF Connect SDK v 1.5.0 onward. However, it might work on earlier versions.
Great work! Looking forward for your feedback on the next version of nRF Connect for VS Code when it is ready.
Ah! I really want this too, I've got custom board files in a /board/ directory in my project repo which I need to tie it to. It may be possible to manually edit the configuration files?