Frequently Asked Questions (FAQ)
General Questions
Q: Do I need to install tools manually?
A: No. The Workspace and Tools Setup panel can download and install all required tools automatically. The extension has a default set of tools it installs based on the project type (Zephyr or CMake). If your repository/SDK contains a tools.json file, the extension will install the tools specified in that file instead.
Q: Can I work with multiple projects simultaneously?
A: Yes. Use VS Code’s multi-root workspace feature. Each project maintains independent settings in its .vscode/settings.json.
Q: How do I switch between debug and release builds?
A: Define multiple build configurations in onsemi.build.configurations and switch using the “Select Active Configuration” command or via the Application Explorer.
Debugging
Q: How do I start debugging my application?
A: Build your project first, then use onsemi: Project: Debug command. The extension will automatically select the generated ELF file.
Q: Can I have multiple debug configurations?
A: Yes. Use the Debug Configuration panel to create multiple configurations.
Q: How do I configure J-Link debugging?
A: Open the Debug Configuration panel, select or create a GDB configuration, and configure:
Target → GDB server path (JLinkGDBServerCL)
J-Link settings (device, interface, speed)
Connection details (host, port)
Q: What if I have multiple ELF files?
A: Use onsemi: Project: Select Active ELF to choose which ELF file to debug. The selected file appears in the status bar.
Q: How do I view peripheral registers during debugging?
A: Configure the SVD file path in the Debug Configuration panel under the “Peripheral Inspector” tab. The Peripheral Inspector view will then show registers during debug sessions.
Zephyr-Specific
Q: How do I add custom Kconfig options?
A: Create a prj.conf file in your project root and add to build configuration:
{
"envs": [
{
"name": "CONF_FILE",
"value": "prj.conf"
}
]
}
Q: How do I use devicetree overlays?
A: Create overlay files (.overlay) and reference them in build configuration:
{
"envs": [
{
"name": "DTC_OVERLAY_FILE",
"value": "boards/my_board.overlay"
}
]
}
Q: How do I enable sysbuild?
A: Set sysbuild: true in your build configuration:
{
"name": "my-config",
"sysbuild": true
}
CMake-Specific
Q: How do I set CMake variables?
A: Use cacheVars in build configuration:
{
"cacheVars": [
{
"name": "MY_VARIABLE",
"value": "my_value"
}
]
}
Q: Can I use CMake presets?
A: Yes. Specify preset names in build configuration:
{
"configurationPreset": "my-configure-preset",
"buildPreset": "my-build-preset"
}
Q: How do I build specific targets?
A: The extension will prompt for targets during build. You can also specify in tasks.json:
{
"type": "onsemi.cmake",
"command": "build",
"targets": ["my_target", "another_target"]
}
Note
This extension is under active development. Features and APIs may change in future releases. Please check the changelog for breaking changes when updating.