Welcome to the September 2022 release of the nRF Connect extension for Visual Studio Code.
- Patched release version: v2022.10.30
- Original release version: v2022.9.179
This release, we worked on improving the following areas:
- New default debugger: nRF Debug
- Memory report viewer
- Updated Status Bar Item
- Trusted Firmware-M images
- Connected Devices View
- Building improvements
- Other improvements
- Bug fixes
We rely on feedback from our users to make the VS Code extensions as useful and stable as possible. Each release includes several features and bug fixes suggested by our users. Starting from this release, we will try to highlight these changes with a dedicated tag in the release notes:
If you have any suggestions for new features or bugs that need fixing, you can submit them through the extension's built-in feedback form or the Nordic DevZone.
Fixes in v2022.10.30¶
- Command Palette invocation: A couple of commands, including toolchain selection and the Kconfig menu commands, would fail if invoked from the Command Palette as they were expecting additional context. All commands in the Command Palette have been assigned a fallback context to prevent this type of crash.
- Memory report: The Memory report's root path node would fail to account for the memory size of all its child nodes in some scenarios. Additionally, multiple root nodes would be listed on Windows, even if they were subpaths of other root nodes.
- Attach debugging: When attaching to a running target device, the debugger would flash the device, unless this was disabled in the settings.
New default debugger: nRF Debug¶
As announced in the July release, we are introducing a new debugging experience for VS Code to replace Cortex-Debug. The new debugger has been named "nRF Debug" and is based on Microsoft's debug adapter. nRF Debug is bundled with the extension and offers a custom made debugging experience for the nRF Connect SDK.
In this release, we switched the default setting for the debugger backend to nRF Debug, as we believe it offers a better debugging experience for most users. We added features to nRF Debug that are typically found in other embedded systems' debuggers, and worked on improving its stability and performance throughout.
If you still prefer the old Cortex-Debug experience, you can go back by setting the
nrf-connect.debugger.backend setting back to
Cortex-Debug. It will still be offered as an alternative debugging experience, just like SEGGER Ozone. If you encounter any issues with the new nRF Debug that prevents you from using it, we would like to hear from you either through the Nordic DevZone or through the extension's Give Feedback form option in the Welcome View.
Generally, all features from Cortex-Debug are available in nRF Debug, but they are located and behave differently. The debug console now outputs the GDB output in addition to output from the J-Link GDB Server, which no longer opens in a dedicated terminal window. GDB Commands can be passed to the debugger in the debug console by prefixing them with
-exec. For instance, the command
-exec info threads shows GDB's thread list.
The program execution commands, such as
continue, are not supported in the debug console for now as they bypass the debug adapter, thus desynchronizing VS Code from GDB.
New debugging features¶
In this release, we added several new debugging features to nRF Debug.
nRF Debug Panel View¶
When the debugger starts, a new nRF Debug Panel View appears in the Panel area.
The nRF Debug Panel View currently contains two Panel Views, a Thread Viewer and a Memory Viewer.
The Thread Viewer shows information about specific threads in your application, when applicable, arranged in rows by Address. The threads are listed in the order that they were started, and their state is only updated when the debugger is stopped. While the device is running, the view is frozen and any state in the table is stale until execution is stopped again.
You can hover over the items in the State or User Options column to reveal a tooltip that describes the indicated binary value.
Note that information about threads is only provided by the Zephyr Kernel when debugging options are enabled. See the debugging documentation for details.
The Memory Viewer shows the memory content on your device. You can review different Regions of memory data by clicking on the different buttons in the top row. Just like the Thread Viewer, the Memory Viewer is only available when the device is stopped.
In addition to the nRF Debug Panel View, we added a Peripherals View in the Sidebar when debugging. The Peripherals View is only visible when debugging with nRF Debug and it is collapsed at the bottom of the sidebar by default. The Peripherals View shows a list of all peripherals on your device and their register values. The register values are only available while execution is halted, but the tree can be explored without live data while the device is running.
Since the previous release in July, we addressed some of the instabilities and shortcomings that were experienced with nRF Debug.
Pass toolchain environment to debug adapter¶
In some cases, the debugger would fail to locate the
python38.dll file on Windows machines, and so fail to launch. We now explicitly pass the toolchain environment to the debugger which resolves this issue.
J-Link Zephyr plugin¶
We bundled our own distribution of the RTOS plugin with the extension on Windows and Linux. (For macOS, the extension will still use the nRF Command Line Tools version of the plugin.) The bundled version changes the thread names to remove its current state. It also fixes a few cases where the VS Code debugger and J-Link did not cooperate properly.
This changes was needed because the thread awareness in the debugger is created through J-Link's RTOS plugin for Zephyr. The plugin is normally distributed with the nRF Command Line Tools and is designed to work with GDB on the command line. For VS Code, this means that we can not control which version of the plugin runs with the debugger. Additionally, the way that the threads are presented to the user is not well suited for the visual representation in the VS Code user-interface.
Resolve child image builds ¶
We fixed a bug where child images could not be debugged independently of their parent image. Now the extension recursively searches the project storage for all builds, including their child images, so that they can be selected for debugging.
Memory report viewer¶
In the previous release, we added an interactive memory report view tool. For this release, we added a couple of new features and improved the existing tree representation with sorting and an improved search mechanism.
We added a visual representation of the memory report using an interactive sunburst chart. When you generate a report, a sunburst chart appears to the right of the treeview. You can navigate the sunburst chart using the treeview or use the treeview to locate the memory areas on the chart. Hover your mouse over the different sections of the sunburst to reveal the path and how much memory the selected identifier uses.
Click on any section of the chart to jump to its symbol, and the chart will display a new sunburst chart of its memory components. Click on the Reset button at any time to go back to the overview representation of the Memory report.
Partition report tab¶
We added a useful tab for Partitions within the Memory report. The Partitions tab displays the contents from your application's Partition Manager report in a table, when applicable. This table is loosely based on the ASCII output of the command,
west build -t partition_manager_report which produces a similar output.
Updated Status Bar Item¶
We updated the selected application's Status Bar Item, so that it now contains informative messages. It also includes the nRF Connect icon to the left to better help you locate it in the Status Bar.
Certain warning messages are now moved to the selected application's Status Bar Item, such as environment warnings for Linux machines. When applicable, the Status Bar Item for your application will appear in a different color. Hover your mouse over the Status Bar Item to view the warning message.
Trusted Firmware-M images¶
Based on input from the Trusted Firmware-M (TF-M) maintainers, we made some changes to the user-interface for TF-M images.
Hiding all actions for TF-M images¶
The actions provided in the Actions View are not relevant for TF-M images. The Actions View will now be hidden when a TF-M image is selected.
Hiding irrelevant files in TF-M's details view¶
Irrelevant Input files and Output files from the Details View for TF-M images will also be hidden.
Custom application list rendering for TF-M¶
We added an icon for TF-M images found within your application's build folder in the Application View. Now the TF-M version number will render next to the TF-M build instead of a board name. Tooltips are also removed for TF-M images as they were not relevant.
Connected Devices View¶
We made some improvements to the Connected Devices View.
Helpful text for missing nRF Command Line Tools¶
Previously, if the nRF Command Line Tools were not installed, a message would appear in the Connected Devices View to inform about this. The message has been changed to include helpful text about where to download the nRF Command Line Tools and how to proceed afterwards.
Sort connected devices alphabetically ¶
Based on a suggestion from a user, the Connected Devices View now sorts devices in alphabetical order, with the named devices at the top to avoid the list being shuffled when devices are connected or disconnected.
We made several improvements to the overall building an application process in the extension.
Prevent concurrent build tasks to run on the same build configuration ¶
We addressed an issue where pressing the Build and Pristine build buttons in close succession would cause two builds to launch in parallel, leading both of them to break. We made changes to the extension to prevent this from happening.
Propagate soft reset and recover from
tasks.json file ¶
We fixed a bug where the "recover" and "soft reset" options were not included in the task parameters passed from the provider to the invocation in the
task.json file. Now they are included.
Filter out empty CMake variables from CMake presets¶
We fixed a bug where where passing
-DSHIELDS="" to a CMake variable would be invalid, but would still be added to the CMake preset. This was an issue because the CMake preset would start looking for a shield that had no name. Now, empty CMake variables without values will not be added to the CMake preset.
Here are some of the other improvements we made to the extension.
Interpret sample browser query spaces as
OR for filenames ¶
We fixed a user-reported issue, where the Create a new application > Browse Sample search would interpret spaces in the query as an
AND operator. This was not always intended nor helpful. Now, the spaces in the Browse Sample search interpret spaces as an
OR operator to include more related results.
Improved terminal output link for Flash notification¶
We improved the Flash notification that appears when flashing an application to a device. The link to show the terminal output has been moved to the title of the notification, similar to how the link is presented in the build notification.
Zephyr SDK 0.15.x: GDB is
-no-py by default¶
The Zephyr software development kit v0.15.0 changes GDB to emit the
-no-py binary without the suffix, and adds a
-py suffix to the Python version. We added fallback code, so that the correct binary will be chosen.
Disabled nRF Connect SDK selector upon "cannot change" message¶
We show a message informing that the SDK can't be changed when the workspace folder is part of an nRF Connect SDK instance, but the dropdown menu was still active in the Quick Setup. Now it is always disabled when such a message is shown.
Stopped using the active build's linked device in debug¶
When starting debugging with a
launch.json configuration, the debugger would always start on the device that was linked to the active build if nothing else was specified. In cases where the active build is different from the debugged build, this would start debugging on the wrong board. This has been fixed.
Updated UI terms¶
To be more in line with Visual Studio Code's UX guidelines, we changed how we refer to certain menu-actions to Toolbar, where applicable. Toolbars are located at the top right corner of a View and in the Panel. (Not all Views will have a Toolbar.)
Search in files: added the workspace folder prefix for all workspaces¶
Search in files would break in single-folder multi-root workspaces, as the name of the workspace folder wasn't prefixed in the file list. We fixed this by having the extension always prepend the list of files with the workspace folder name whenever in a multi-root workspace, and never when the workspace is only a single folder.
Provided absolute path for Zephyr compiler and debuggers¶
We fixed a bug where the C/C++ VS Code extension would report that "
arm-zephyr-eabi-gcc is not a path to a valid executable". This would allow the debugger to properly set the GDB
PATH, without relying on the debugger having it in its
PATH environment variable. Now, the found Zephyr toolchain should override the compiler and debugger paths, which is the executable name in the normal
PATH based toolchain.