New VS Code extension #74005
Replies: 15 comments 11 replies
-
Other Zephyr-related extensions:
|
Beta Was this translation helpful? Give feedback.
-
As a Zephyr contributor, what I am look for in such an extension is (on top of my head)
The above points is something I've solved locally with a few VSCode tasks, but they are somewhat limited From a Intellisense and linting perspective
As a Zehyr contributor I don't really care for / need support for autodownloading the SDK nor creating new projects. |
Beta Was this translation helpful? Give feedback.
-
The debugger should use the SVD files so that cortex-debug can watch and fiddle with peripherals directly. This is already working, but people don't necessarily know about it. It should also load the Zephyr RTOS JLink plugin (if applicable) so that there is nice thread view. We always create cortex debug targets for bootloader + app so that we can debug either. As well as targets for on target unit tests so that you can step through those from VSCode. |
Beta Was this translation helpful? Give feedback.
-
FWIW I just had a quick look at "Zephyr IDE" VS Code extension by @rijesha and it seems pretty promising -- hopefully there can be some common ground between what's been done there already and any future "official" Zephyr extensions :) |
Beta Was this translation helpful? Give feedback.
-
It would be great to have an official extension. Zephyr IDE could have a lot of improvements to make it a more polished and full featured experience. There are some changes in west that would help in app development. An example of this would be the ability to report back what KConfig and overlay files would be used in a build. So having the Zephyr Project backing/developing an extension would be great. |
Beta Was this translation helpful? Give feedback.
-
I also see that the lack of a "universal IDE" for Zephyr is an important setback. From our experience in developing the previous IDE, SW4STM32, we see that the most important thing is simplicity and making everything work with a few clicks. The IDE should target users are not familiar with the sophisticated and complex setup environment that Zephyr requires. The IDE should be able to:
Other interesting features can be added later once we have a robust tool.
|
Beta Was this translation helpful? Give feedback.
-
From my experience we need "one click setup". Specifically if someone gets a URL to a repo there should one install they do to build/debug code. The best thing would be to have some way in the readme.md of a project where there is a button (one click) they click on and it will install all the tools, dependencies and IDEs needed to build the project. I do not care if this one click is done locally on a machine, or in the cloud. The point is to have some way another person can get up and running with an existing zephyr project quickly and easy. |
Beta Was this translation helpful? Give feedback.
-
I've also created my own Zephyr vs code workspace configuration (see my repos, take it, since it is Apache 2.0) which works well for stm32. |
Beta Was this translation helpful? Give feedback.
-
I've been using Nordic's nRF connect extension for a while when working on ZMK, and my biggest issue with it is that I cannot configure it to tell it where to find things. For example, ZMK uses devicetree files to define keyboard layouts, and whenever I open one of these files using nRF Connect, the whole file lights up in errors because it didn't find all the necessary headers, and it didn't recognize the file as an overlay instead of a root board file. My one recommendation for an official Zephyr VS Code extension would be to have defaults that match a conventional project layout, but to also support settings or other customization points to tell the extension how to work with your project. |
Beta Was this translation helpful? Give feedback.
-
Please look at the MCUx VSCode extension: https://github.com/nxp-mcuxpresso/vscode-for-mcux/wiki/Working-with-Zephyr |
Beta Was this translation helpful? Give feedback.
-
Cc @fpistm |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, We have released the first (beta) version of the VSCode extension: Zephyr Workbench. We've addressed several points mentioned in this discussion. Our main goal was to create a powerful tool that remains user-friendly, for both hardcore developers and beginners.
This is still in beta, and many aspects can and will be improved. The code will soon be released on our GitHub. |
Beta Was this translation helpful? Give feedback.
-
I really like the original proposal in this discussion and the idea of an official Zephyr VS Code extension, or bundle, published and maintained by the Zephyr Project. Is that idea actively being pursued? |
Beta Was this translation helpful? Give feedback.
-
We've been working hard over the last couple of weeks and have added many new features to Zephyr Workbench. The most important one is the "Debug Manager," a feature that allows users to create a debug session integrated with the "west debugserver." It also provides links to install locations for different runners. Tested on STM32(OpenOCD, PyOCD, Jlink) and NXP (link server), other runners are coming soon. This is the closest we've come to achieving a "one-click and it works" solution, tailored specifically for Zephyr and west debug implementations while remaining flexible and generic. The tool is still in beta, and we're currently working on tutorials, documentation and supporting MacOS. We would love to hear your feedback or welcome any contributions! |
Beta Was this translation helpful? Give feedback.
-
I was wondering ST engineers thoughts on this topic and if the st teams are working on their own extension or are they going to support an open source approach? ST has one of the biggest communities here and has zephyr users. Hi @ajarmouni-st I can only see you here from the st, Will you be able to give some thoughts on this? |
Beta Was this translation helpful? Give feedback.
-
Introduction
IDE tooling is regularly brought up on the devenv Discord channel. Most of today's developers expect a code editor which embeds code navigation and linting, debug launch configurations and project management. Visual Studio Code is currently the most popular code editor supporting C. As such there already has been several attempts at configuring VS Code's C/CMake environment for Zephyr (See References bellow). Yet, those tools and documents are sparse and the Zephyr project as a whole doesn't provide streamlined answers to users who frequently seek help on the Zephyr Discord server to set up these extensions.
My company, Savoir-faire Linux, has developed the official VS Code extension for the Yocto Project, another very popular build system for embedded open source products. The Yocto project's community has been praising this addition to the ecosystem. It improved the ease of use for expert developers, while providing a shiny experience for new users. Since maintenance is another key aspect of such a project, we have also created CI/CD tools that allow us to ensure the tool will keep being relevant with updates. We'd like to organize an official VS Code support with the Zephyr community.
Problem Description
Setting up a Zephyr project in VS Code can be complex and is lacking an official guide. This complexity may deter IDE users from engaging with Zephyr development. Many features also remain out of reach except from the command line and users might be missing on them.
Proposed Solution
As a first and quick step, we would like to provide an official guide within the Zephyr documentation to set-up the basic functionalities through existing and well maintained extensions (C, CMake, Cortex debug). This is akin to the existing configuration guides like the one for CLion.
We'd then like to contribute the Zephyr extension's ecosystem in order to provide one extension, or a bundle of extensions that could become the officially published and maintained Zephyr VS Code experience. There already exist a dozen of Zephyr related extensions, with varying features. However most of them are isolated side projects from single developers. They may work well in some cases, but it's currently very unlikely that new users end up fully leveraging them, and it's hard to know if they'll still be maintained in a few years. Our aim would be to coordinate and build an official solution on top of these projects in the following states:
The resulting VS Code experience should cover the following features:
References
Existing GitHub issue: #21119
Existing extensions:
VS Code existing configuration example:
Zephyr VS Code Example : https://github.com/beriberikix/zephyr-vscode-example
Some Discord users who may be interested:
@jonathanberi
(zephyr-vscode-example)@trond_snekvik
(DeviceTree & Kconfig for the Zephyr Project)@royac6
Some Github users who may be interested:
Yocto Project Bitbake extension: https://marketplace.visualstudio.com/items?itemName=yocto-project.yocto-bitbake
Beta Was this translation helpful? Give feedback.
All reactions