# QNX

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/clion/llms.txt).

> **TL;DR**
> OS: Linux
>
>
>
> Required tools: QNX® Software Development Platform (SDP) 8.0
>
>
>
> Project format: Makefile

[QNX](https://www.qnx.com) is a Unix-like real-time operating system for embedded systems, such as digital cockpits, medical devices, and robots. In CLion, you can build QNX applications, run them on a QNX target, and debug them there over SSH, including across shared library boundaries. When you point CLion to your QNX SDP, code completion and navigation also cover the QNX Neutrino APIs.

The integration works only for [Makefile projects](https://www.jetbrains.com/help/clion/makefiles-support.html.md).

> **Note:**
> QNX support is available in CLion 2026.3.0.3 and later. The [QNX OS for CLion](https://plugins.jetbrains.com/plugin/36618-qnx-os-for-clion) plugin does not include or distribute QNX licenses: it works with the QNX SDP that you already have.

Procedure: Enable the QNX OS for CLion plugin

This functionality relies on the  QNX OS for CLion plugin, which  is bundled and enabled in CLion   by default. If the relevant features are not available, make sure that you did not disable the plugin.

1. Press [Settings… shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "ShowSettings") to open settings and then select `Plugins`.

2. Find the QNX OS for CLion plugin and click Enable.

This article uses a [sample project](https://github.com/JetBrains/qnx-sample-blog) and a QNX image running in QEMU on an Ubuntu host. For other Linux distributions, use the equivalent commands of your package manager. To use a hardware target, refer to [Use a hardware target](#hardware-target).

<a id="prerequisites"></a>

## Before you start

Make sure that you have the following:

* A commercial or non-commercial QNX license added to your account at [qnx.com](https://www.qnx.com).

* QNX SDP 8.0 installed through the QNX Software Center. Refer to [Install the QNX SDP](#install-sdp).

* A QNX target that is reachable over SSH: a QEMU virtual machine or a board, such as Raspberry Pi 5. Refer to [Create and boot a QNX target in QEMU](#qemu-target).

<a id="prepare-environment"></a>

## Prepare the QNX environment

<a id="install-sdp"></a>

Procedure: Install the QNX SDP

1. Log in to your account at [qnx.com](https://www.qnx.com) and download the QNX Software Center for Linux.

2. Run the installer from the directory that you downloaded it to:

```SHELL
cd ~/Downloads
chmod +x qnx-setup-*-linux.run
./qnx-setup-*-linux.run
```

3. In the QNX Software Center, select Add Installation and install QNX Software Development Platform 8.0. The default installation directory is `~/qnx800`.

![QNX New Installation Wizard installing QNX Software Development Platform 8.0 into the qnx800 folder in the home directory.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_install_sdp.png)

4. To check the installation, load the SDP environment in a terminal and list the available compiler targets:

```SHELL
source ~/qnx800/qnxsdp-env.sh
qcc -V
```

The output lists the GCC-based targets for x86_64 and AArch64, for example:

```PLAINTEXT
cc: targets available in /home/<user>/qnx800/host/linux/x86_64/etc/qcc:
    12.2.0,gcc_ntox86_64_gpp
    12.2.0,gcc_ntox86_64_cxx
    12.2.0,gcc_ntoaarch64le
    12.2.0,gcc_ntox86_64 (default)
    12.2.0,gcc_ntoaarch64le_gpp
    12.2.0,gcc_ntoaarch64le_cxx
```

The `qnxsdp-env.sh` script adds the QNX tools to `PATH` and sets the `QNX_HOST` and `QNX_TARGET` variables, which point to the host binaries and to the QNX headers and libraries. The script affects only the current terminal session, so run it again in every new terminal. CLion runs the same script to set up the toolchain, so you do not need to run it for the IDE.

> **Tip:**
> To load the SDP environment in every new terminal, add the script to `~/.bashrc`:
>
>
>
>
> ```SHELL
> echo 'source ~/qnx800/qnxsdp-env.sh > /dev/null' >> ~/.bashrc
> ```

<a id="install-qemu"></a>

Procedure: Set up QEMU

The `mkqnximage` tool from the SDP builds a QNX image for QEMU. The image uses the virtual network of libvirt to connect the target to your computer.

1. Install QEMU and the networking packages:

```SHELL
sudo apt update
sudo apt install qemu-system-x86 qemu-utils libvirt-clients libvirt-daemon-system net-tools bridge-utils dnsmasq
```

To build an AArch64 image, also install `qemu-system-arm`.

2. Add your user to the `kvm` and `libvirt` groups so that QEMU can use hardware virtualization:

```SHELL
sudo usermod -aG kvm,libvirt "$USER"
```

3. Restart your computer to apply the group membership.

4. Check that the `default` network of libvirt is active:

```SHELL
virsh --connect qemu:///system net-list --all
```

If `virsh` reports `Permission denied`, run `id -nG` and check that the output lists `kvm` and `libvirt`.

If the `default` network is inactive, start it and enable it on boot:

```SHELL
sudo virsh net-start default
sudo virsh net-autostart default
```

<a id="qemu-target"></a>

Procedure: Create and boot a QNX target in QEMU

1. Open the [Terminal](https://www.jetbrains.com/help/clion/terminal-emulator.html.md) tool window ([ActivateTerminalToolWindow shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "ActivateTerminalToolWindow")). Load the SDP environment, create a directory for the image, check the host network setup, and then build and boot the image:

```SHELL
source ~/qnx800/qnxsdp-env.sh
mkdir -p ~/qnx-target && cd ~/qnx-target
~/qnx800/host/common/mkqnximage/qemu/check-net
mkqnximage --type=qemu --arch=x86_64
mkqnximage --run
```

The target boots in the Terminal tool window, and its console replaces the local shell. When the output shows `Startup complete`, the target is running, and its SSH server is started. The console opens a shell without a login prompt.

2. In the target shell, run `ifconfig` and copy the `inet` address of the `vtnet0` interface. On the `default` network of libvirt, the address is in the `192.168.122.x` range.

![ifconfig output in the CLion Terminal tool window, with the inet address 192.168.122.202 of the vtnet0 interface highlighted.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_qemu_target_ip.png)

3. Check the SSH connection from your computer. The default image has several users whose passwords match their names, for example, `root` with the password `root`:

```SHELL
ssh root@192.168.122.202
```

To shut down the target, press `Ctrl+A` and then `X` in its console. Alternatively, open a new tab in the Terminal tool window, load the SDP environment, and run `mkqnximage --stop` from `~/qnx-target`. To start the target again, run `mkqnximage --run` from `~/qnx-target` in a Terminal tab where you loaded the SDP environment.

<a id="open-project"></a>

## Open a QNX project

<a id="configure-sdp"></a>

Procedure: Open the project and connect it to the SDP

1. Clone the [sample project](https://github.com/JetBrains/qnx-sample-blog): click Clone Repository on the Welcome screen, or select `File | New | Get from Version Control` in the main menu.

CLion detects the Makefile and opens the Load Project dialog with the Clean project checkbox selected.

![Load Project dialog with the Clean project checkbox selected and clean as the Make target to run before CLion loads the Makefile project.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_make_clean.png)

2. Keep the checkbox selected and click OK. Make builds incrementally, so loading an uncleaned project skips the source files whose targets are up to date.

At this point, CLion does not have the SDP configured. The first load reports `No compilation commands found`, and the editor shows that the files do not belong to any project target.

> **Tip:**
> If CLion does not load the folder as a Makefile project, right-click `Makefile` in the Project tool window and select Load Makefile Project.

3. Press [Settings… shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "ShowSettings") to open settings and select `Build, Execution, Deployment | Embedded Development | QNX OS`.

4. Make sure that the Enable QNX OS integration checkbox is selected, and configure the following settings:

SDP path
: The directory with the installed SDP. CLion detects it automatically. To use another directory, make sure that it contains the `qnxsdp-env.sh` script.

Target
: The SSH connection to the target. Select <create configuration> and create an [SSH configuration](https://www.jetbrains.com/help/clion/create-ssh-configurations.html.md):
:
:
:
: * Host: the IP address of the target.
:
: * Port: `22`.
:
: * Username: `root`.
:
: * Authentication type: Password.
:
: * Password: `root`. Optionally, select Save password.
:
: * Keep the Legacy session backend selected.
:
:
:
: Click Test Connection to check that CLion can reach the target.

Upload path
: The directory on the target where CLion uploads the built binary. The program also runs there unless the run configuration sets a working directory. The default value is `/tmp`.

![QNX OS settings with integration enabled, a detected SDP path, an SSH target for root on port 22, and the default /tmp upload path.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_settings.png)

> **Note:**
> For building and code insight, the SDP path setting is enough. The Target and Upload path settings are required to run and debug on the target.

5. Click OK. CLion reloads the Makefile project and analyzes the code with `qcc` and the QNX headers from the SDP.

<a id="build-run"></a>

## Build and run a QNX project

<a id="build"></a>

Procedure: Build the project

1. In the [run/debug configuration](https://www.jetbrains.com/help/clion/run-debug-configuration.html.md) switcher, select all. The other configurations come from the QNX build system, and you can ignore or delete them.

2. (Optional) Limit the build to the architectures and variants that you need. By default, the sample project builds for x86_64 and AArch64. In `Settings | Build, Execution, Deployment | Makefile`, set Build options, for example, to `--jobs=8 CPULIST=x86_64 VARIANTLIST=g` to build only an x86_64 debug binary.

`CPULIST` and `VARIANTLIST` are standard variables of the QNX recursive build. The value of the field replaces the default `--jobs` option of CLion, so add this option yourself.

3. Click ![the Build button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.build.build.svg) Build ([CompileDirty shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "CompileDirty")) on the main toolbar.

![Main toolbar with all selected in the run/debug configuration switcher and the pointer on the Build button, which shows the Build 'all' tooltip.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_build.png)

<a id="run"></a>

Procedure: Run the program on the target

1. Select `Run | Edit Configurations` from the main menu and select the all configuration.

2. In the Executable field, specify the path to the built binary on your computer. For the sample project, it is `~/CLionProjects/qnx-sample-blog/nto/x86_64/o-g/qnx-sample-blog_g`.

3. (Optional) Specify Program arguments, for example, `a b c`.

4. Click OK, and then click ![the Run button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.run.svg) Run ([Run shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "Run")).

CLion uploads the binary to the [upload path](#upload-path) on the target and runs it there. The program output appears in the Run tool window.

```PLAINTEXT
/bin/sh -l -c "cd -- \"$1\" && shift && exec \"$@\"" sh /tmp /tmp/qnx-sample-blog_g a b c
=============================================
QNX sample application
configure / build / run / debug from CLion
=============================================
Executable:
/tmp/qnx-sample-blog_g
Working directory:
/data/var/tmp
Arguments (4):
argv[0] = /tmp/qnx-sample-blog_g
argv[1] = a
argv[2] = b
argv[3] = c
Argument statistics:
length[0] = 22
length[1] = 1
length[2] = 1
length[3] = 1
arguments : 4
total : 25 bytes
longest : "/tmp/qnx-sample-blog_g"
Environment:
(omitted - rebuild with SHOW_ENV=1 to include it)
Process finished with exit code 0
```

<a id="debug"></a>

## Debug a QNX project

To debug on a QNX target, you need a [debug profile](https://www.jetbrains.com/help/clion/debug-profiles.html.md) of the QNX OS type. The profile defines the GDB from the SDP, and the target and the upload path come from the [QNX OS settings](#configure-sdp).

<a id="create-debug-profile"></a>

Procedure: Create a QNX OS debug profile

1. Press [Settings… shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "ShowSettings") to open settings and select `Build, Execution, Deployment | Debugger | Debug Profiles`.

2. Click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) Add and select QNX OS.

3. Configure the profile:

* Name: a name for the profile.

* Debugger: the GDB from the SDP for your target architecture. For an x86_64 target, it is `~/qnx800/host/linux/x86_64/usr/bin/ntox86_64-gdb`. For an AArch64 target, select `ntoaarch64-gdb` from the same directory.

The Available for all projects checkbox is selected by default, so you can use the profile in other QNX projects.

![Debug Profiles settings with a QNX OS profile using the x86_64 ntox86_64-gdb debugger from the SDP and Available for all projects selected.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_debug_profile.png)

4. Click OK.

<a id="start-debug"></a>

Procedure: Start a debug session

1. In the [debug profile switcher](https://www.jetbrains.com/help/clion/debug-profiles.html.md#select-profile) on the main toolbar, select the QNX OS profile.

2. Set [breakpoints](https://www.jetbrains.com/help/clion/using-breakpoints.html.md) in your code. In the sample project, for example, open `argstats.c` and set a breakpoint at `size_t len = strlen(argv[i]);`.

3. Click ![the Debug button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.run.debug.svg) Debug ([Debug shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "Debug")).

CLion uploads the binary to the target and starts a debug session. When the program stops at the breakpoint, you can [step through the code](https://www.jetbrains.com/help/clion/stepping-through-the-program.html.md) and [examine the program state](https://www.jetbrains.com/help/clion/examining-suspended-program.html.md).

![CLion stopped at a breakpoint in argstats.c on the strlen line, with the Debug tool window showing the call stack and local variables.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_debugging.png)

You can also let an AI agent debug the program on the target. For example, the sample project crashes with `SIGSEGV` when you pass more than three arguments, such as `a b c d`. When you ask an agent to find the cause, the agent can run a debug session by using the MCP tools of CLion. For more information, refer to [Agentic debugging](https://www.jetbrains.com/help/clion/agentic-debugging.html.md).

<a id="hardware-target"></a>

## Use a hardware target

Running and debugging on a board, such as Raspberry Pi 5, works the same way as on a QEMU target. The differences are how you get the IP address of the target and which binaries and debugger you select.

The following procedure assumes that you have installed the QNX SDP, connected the board to your computer, and booted a QNX image on it. For Raspberry Pi 5, you can get the image from the SDP 8.0 BSP for Raspberry Pi 5 package in the QNX Software Center. This example uses the UART serial port to get the IP address and the LAN port for the SSH connection.

<a id="configure-hardware-target"></a>

Procedure: Configure a hardware target

1. Open the Serial Connections tool window: press [Search Everywhere shortcut](https://www.jetbrains.com/help/clion/llms-keymap-index.md "SearchEverywhere") and search for it.

2. Select the port of your board, for example, `/dev/ttyACM0`, and click Connect.

![Serial Connections tool window with the /dev/ttyACM0 debug probe port selected at 115200 baud and the pointer on the Connect button.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_hw_connect.png)

3. In the console, run `ifconfig` and copy the `inet` address of the board.

![Serial Connections console connected to /dev/ttyACM0 on a Raspberry Pi 5 board, with the ifconfig command entered after uname -m.](https://resources.jetbrains.com/help/img/idea/2026.3/cl_qnx_hw_ip.png)

4. Specify this address in the [Target](#target) SSH configuration in the QNX OS settings.

5. For an AArch64 board, select the AArch64 binaries:

* In the Executable field of the [run configuration](#run), specify the AArch64 binary.

* In the Debugger field of the [debug profile](#create-debug-profile), select `ntoaarch64-gdb`.

## See also

### Related

[Debug profiles](https://www.jetbrains.com/help/clion/debug-profiles.html.md) [Live watches](https://www.jetbrains.com/help/clion/live-watches.html.md) [Multi-threaded RTOS debug](https://www.jetbrains.com/help/clion/rtos-debug.html.md)

