Workbench for Zephyr (VS Code)Workbench for Zephyr is a VS Code extension that adds support of Zephyr development to Visual Studio Code, including SDK management, Project wizard, build and debugging features. Features
DocumentationFind the complete documentation on: https://z-workbench.com/ RequirementsTo build your project on Workbench for Zephyr, No external tools is required. Host tools are installed by the extension itself. To flash and to debug the application on your target, external tools are required. Depending on needs, your might have to install some of the following software tools on your workstation:
Additionally a driver software might be required to connect to your JTAG probe. On MacOSX, due to many dependencies, Homebrew is required to install external tools and python. UsageWorkbench for Zephyr provides a dedicated panel, to access it, click on the "Workbench for Zephyr" logo on the left Install Host tools
Note: Some tools needs administration right to be installed on your system. Initialize West Workspace
This process creates then parse the west manifest file to set up your west workspace and the subset of projects. More information about West Workspaces. Import Zephyr SDK
With Destination: Global, the SDK is installed once in a standard location (your home folder by default) and every Zephyr project finds it automatically: no per-project SDK path to configure. Global SDKs already present on the machine, including ones installed outside the extension, appear in the Toolchains view with a [global] badge, and applications can simply select Global Zephyr SDK as their toolchain.
This process imports to toolchains to build and to debug your Zephyr applications. More information about Zephyr SDK. Create a new Application projectThe previous steps ("Import West Workspace" and "Import Zephyr SDK") are mandatory before creating an application.
Build your project
Configure your debug session(Warning) The debug server tool for your board must be installed on your system.
The newly debug configuration is named "Workbench for Zephyr Debug" If the launch configuration was already created, you don't need to open the Debug Manager again. Run your debug session as usually with VSC.
Debug your applicationAfter starting the debug session, the code should breaks on main or early (depends on optimization on your project).
The "Debug Toolbar" allows you to Continue/Pause, Step Over, Step Into, Step Out, Restart or , Stop
Inspect variables and CPU registers on the left panel
If the SVD file was set in the debug configuration, the peripherals are displayed in the "xperipherals" view.
To debug in disassembly, right-click on the code then select "Open Disassembly View"
More information about Debugging on VSCODE Install RunnersOpenOCD and STM32CubeProgrammer installers are provided.
Known IssuesError message in "Output" tab with new application project is created. Uninstall tools not supported yet, please manually delete the ${USERDIR}/.zinstaller directory. For some JTAG probes, you might need to install its driver in order to run the debug session. How to rebuild the extension
Then |