# Working with Zephyr® RTOS projects using West

In CLion, you can open, build, and run/debug Zephyr projects with a built-in [West](https://docs.zephyrproject.org/latest/develop/west/index.html) plugin. Compared to CLion’s CMake integration, the West integration provides an easier way to set up and build Zephyr projects. Although you can still use CMake, we recommend using CLion’s native West integration.

This guide explains how to build, run, and debug a Zephyr application.

Procedure: Install Zephyr and Python dependencies

1. Install [Zephyr, West, and Python dependencies](https://docs.zephyrproject.org/latest/develop/getting_started/index.html#get-zephyr-and-install-python-dependencies) on your system.

2. Install [Zephyr SDK](https://docs.zephyrproject.org/latest/develop/getting_started/index.html#install-the-zephyr-sdk) on your system.

Procedure: Open your West project

1. Click Open on the Welcome screen or select `File | Open` from the main menu.

2. Select a directory with a Zephyr project that contains the `CMakeLists.txt` file.

3. Open your project settings via `Settings | Build, Execution, Deployment | Embedded Development | West`.

> **Tip:**
> You may see the following CMake error message in the West tool window when opening a Zephyr West directory for the first time:
>
>
>
>
> ```
> BOARD is not being defined on the CMake command-line, in the environment or by the app. Fix...
> ```
>
>
>
> This means you have not yet configured your board in the West project settings. Click Fix…, and the West dialog with your project settings will open.

![West project settings](https://resources.jetbrains.com/help/img/idea/2026.2/cl_west_project_settings.png)

4. CLion will automatically fill in the `Toolchain`, `West executable`, and `Build directory` fields with default values in the West dialogue. You can change them if necessary.

5. Select your board name in the corresponding field if it has not already been selected automatically.

6. Click OK. CLion will load the project and display the results in the `West` tool window:

![West project loading](https://resources.jetbrains.com/help/img/idea/2026.2/cl_west_project_load.png)

Procedure: Set up a run/debug configuration

CLion detects the project build targets and creates the native West configurations for them. To set up additional parameters:

1. Select `Run / Debug Configurations | Edit Configurations…` from the main toolbar or `Run | Edit Configurations…` from the main menu. The `West Run/Debug Configurations` dialog will open.

![West run/debug configuration](https://resources.jetbrains.com/help/img/idea/2026.2/cl_west_run_debug_configuration.png)

2. Copy the command line arguments you use to run the `west flash` and `west debug` commands in the Terminal. Paste them into the `Flash options` and `Debug options` fields, respectively. If you select the `Launch Run and Debug on the QEMU emulator` option, the `Flash options` and `Debug options` fields will become unavailable.

3. Click OK, and your program will be ready to run and debug.

Procedure: Run and debug your program

To run or debug your program, you can use the configuration widget (click ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.run.svg) or ![](https://resources.jetbrains.com/help/img/idea/2026.2/app.expui.run.debug.svg)), the `Run` menu, or the gutter icons next to the program’s entry point.

Here is an example of debugging a Zephyr program:

![Zephyr West debugging](https://resources.jetbrains.com/help/img/idea/2026.2/cl_west_debug.png)

> **Note:**
> CLion supports multi-threaded RTOS debugging, which allows you to view each thread separately. To do this:
>
> 1. [Enable the RTOS integration](rtos-debug.html#enable-rtos) in `Settings | Build, Execution, Deployment | Embedded Development | RTOS Integration`.
>
> 2. [Set](rtos-debug.html#tasks-view) `CONFIG_THREAD_MONITOR` and `CONFIG_THREAD_NAME` in your `prj.conf` files.

## Convert an existing CMake project to West and vice versa

If you have an existing Zephyr project that you run as a CMake one, you can convert it to a West project. To do this, right-click a `CMakeLists.txt` file in your project directory and select `Convert to West Project` from the context menu.

![Convert CMake project to West](https://resources.jetbrains.com/help/img/idea/2026.2/cl_west_convert.png)

You can also convert a West project back to CMake. Right-click a `CMakeLists.txt` file in your project directory and select `Convert to CMake Project` from the context menu.

## See also

### Concepts

[Project formats](project-models.html) [Run/debug configurations](run-debug-configuration.html)

### How tos

[Editor basics](using-code-editor.html) [File structure](file-structure.html) [Build actions](build-actions.html) [Run applications](running-applications.html) [Debug](debugging-code.html)

