User Interface

The CMSIS Solution extension provides the Keil Studio GUI for project management and build tools with the CMSIS-Toolbox. Combined with other Arm and third-party extensions, it implements a powerful embedded development environment.

CMSIS view

The GUI consists of these views:

View Description
Explorer view Explorer view lists all local files.
Search view Search view enables search/replace across all files.
Source Control view Source Control view allows you to work with git.
Extensions view Extensions view lets you work with VS Code extensions.
Run and Debug view Run and Debug view switches the GUI to a dedicated debug view.
CMSIS view CMSIS view is the main view for working with CMSIS solution-based projects.
Trace and live view Trace and Live view shows trace and live data during debugging.

Note

The ordering of the icons may be different in your VS Code environment.

CMSIS view

The CMSIS view CMSIS icon shows the content of the active projects included in the solution. Each project contains configuration settings, source code files, build settings, and other project-specific information. The main area of the CMSIS view shows:

  • Board and device information and related documentation.
  • Groups and files: Groups and user files that you add to the project and that you can edit
  • constructed-files: Contains generated files such as the RTE_Components.h header file for each context
  • linker: Contains a linker script file and a <regions>.h file (or other user-defined header files)
  • Components: Shows the software components selected for the project with their source files, user code templates, and APIs. Click the files to open them in the editor. Click the book icon of a component to open the related documentation. If you are using a generator to configure your device or board, then a Run Configuration Generator option is available to start a generator session.
  • Layer Type (if available): The software layers in the project with their source files, preconfigured software components, and configuration files

No solution loaded

If no CMSIS solution is active in VS Code, the view shows the following:

CMSIS view without a solution loaded

This allows you to:

The links below the buttons take you to the documentation and the overview of the VS Code extension.

Actions available through the CMSIS view

Once a CMSIS solution is loaded, the following action buttons are available:

Action Description
Build solution Build solution calls the compiler toolchain and builds the solution.
Load and Run Application Load & Run application flashes the binary onto the target and starts the application.
Load & Debug application Load & Debug application flashes the binary onto the target and starts a debug session.
Open csolution.yml file Open csolution.yml file opens the CMSIS solution YML file for editing.
Manage Solution Settings Open the Manage Solution view to configure project and debug settings.
Views and more actions Show further commands.

Main area icons

Depending on the file and the context, various icons may appear:

Action Description
clangd information active IntelliSense is active for this cproject file.
Open file Open the file.
Manage software components Manage the software components of the cproject file.
Add groups or files Add groups or files to the cproject file.

Configure IntelliSense with clangd

The CMSIS Solution extension configures the clangd language server for the active project. Running cbuild setup generates a compile_commands.json compilation database and compiler macro headers in the project output directory. When Generate Clang Setup is enabled in the CMSIS Solution settings, the extension creates or updates the project .clangd file to use this generated build information.

For solutions containing multiple projects, click Activate Clangd Information next to the required *.cproject.yml file. The Clangd Information Active icon identifies the project that currently provides IntelliSense information.

Select the active project for clangd

Compiler predefined macros

CMSIS-Toolbox generates separate predefined macro headers for C and C++ in the project output directory:

  • compile_macros_c.h for C source and header files.
  • compile_macros_cxx.h for C++ source and header files.

For non-CLANG toolchains, the generated .clangd configuration includes the appropriate header according to the source file extension. Keeping the C and C++ macro sets separate prevents C++-only compiler macros from affecting C files. A native CLANG toolchain does not require these compatibility headers.

With the correct project active, clangd resolves compiler-specific conditional code and provides completion, navigation, hover information, and diagnostics that match the selected build context.

Compiler-specific conditional code in the editor

Note

The extension regenerates the project .clangd file when the solution context changes or when the VS Code window is reloaded. This configuration applies only to source and header files in the directory tree below the .clangd file. Files outside this tree do not use the project configuration and may therefore show different diagnostics. The file can contain absolute paths to generated build information and is not intended for persistent manual customization.

Troubleshoot IntelliSense

If editor diagnostics or completion do not match a successful build:

  1. Check that Generate Clang Setup is enabled in the CMSIS Solution extension settings.
  2. Run Refresh (reload packs, update RTE) and wait for solution conversion to complete.
  3. Check that compile_commands.json, compile_macros_c.h, and compile_macros_cxx.h exist in the active context output directory.
  4. Click Activate Clangd Information next to the project that contains the source file.
  5. Open a C or C++ source or header file, then check the clangd status in the VS Code status bar. If indexing remains stale after regenerating the build information, run the clangd: Restart language server command from the Command Palette. If the problem persists, reload the VS Code window to regenerate .clangd and restart the extensions.

Configuration Wizard

Configuration Wizard annotations enable GUI-like elements in IDEs for configuration source files. This graphical approach makes it easier for users to review and edit configuration settings as required by the application.

For files containing configuration wizard annotations, open the graphical view by pressing the Open Preview button Open Preview in the top right corner of the file window.

The view will be opened next to the original source file. You can switch back pressing the Show Source button Open source file view.

RTE_Device.h file in configuration wizard view

Status bar

The VS Code status bar displays information about the status of your development environment and the project:

Status bar

Status bar item Description
clangd status Displays the status message of the clangd extension that provides IntelliSense.
Solution target You can inspect errors and warnings for the active csolution project when you move the cursor over the Solution target in the status bar. The indicator is red for errors and yellow for warnings. Click the indicator to open the Output - CMSIS Solution panel and the Manage Solution view.
cbuild setup message Building compilation database... displays while the compile_commands.json file is created (during cbuild setup).
Tool installation information The Arm Tools Environment Manager extension downloads, installs, and manages software development tools. Move your mouse over Arm Tools to review the current list of installed tools. Click on Arm Tools to get more options.
Active tool license If you are using licensed Arm tools, the active license displays. Click it to manage the active license.
clangd indexing message Shows the clangd indexing progress once a C, C++, or header file is opened in the editor.

Run and Debug view

Refer to the Debugger user interface section for more information.

Available commands

You can access commands to manage your solution and the related projects in the following ways:

  • From the CMSIS view.
  • With right-click to the *.csolution.yml file in the Explorer view.
  • With the Command Palette that opens with Ctrl+Shift+P (Windows and Linux) or Cmd+Shift+P (macOS).
Command Description
Open Solution in Workspace... If your workspace contains several solutions, select the active solution to work with.
Create Solution... Create a new csolution project.
Convert a µVision project to CMSIS solution... Convert uvprojx files to csolution project format.
Close Solution Close the current active solution.
Manage Solution Settings Configure the target set (active target, projects, images, and debug adapter) for the solution.
Configure Solution Set a compiler and add software layers.
Manage Software Components Review, add, or remove software components.
Build solution Build the solution with the current target set.
Rebuild solution Rebuild the solution with the current target set.
Clean all out and tmp directories Clean all out and tmp directories for the active solution.
Refresh (reload packs, update RTE) Reload information from all installed packs and run cbuild setup update-rte.
Load & Run application Load the application to target and run it with active GDB server (Debugger can be attached).
Load & Debug application Load the application to target and start the debugger.
Erase target device Erase the target device.
Load application to target Load the application to target.
Run application on target Run the current application in the target with active GDB server (Debugger can be attached).
Target Information Show information about debug adapter and target.
Focus on Solution View Open the CMSIS view.