llms.txt: machine-readable documentation index. Markdown version of this page is also available.

CLion 2026.3 Help

QNX

QNX 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.

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 Ctrl+Alt+S to open settings and then select Plugins.

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

This article uses a sample project 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.

Before you start

Make sure that you have the following:

Prepare the QNX environment

Install the QNX SDP

  1. Log in to your account at qnx.com and download the QNX Software Center for Linux.

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

    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.
  4. To check the installation, load the SDP environment in a terminal and list the available compiler targets:

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

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

    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.

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:

    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:

    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:

    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:

    sudo virsh net-start default sudo virsh net-autostart default

Create and boot a QNX target in QEMU

  1. Open the Terminal tool window (Alt+F12). Load the SDP environment, create a directory for the image, check the host network setup, and then build and boot the image:

    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.
  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:

    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.

Open a QNX project

Open the project and connect it to the SDP

  1. Clone the sample project: 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.
  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.

  3. Press Ctrl+Alt+S 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:

    • 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.
  5. Click OK. CLion reloads the Makefile project and analyzes the code with qcc and the QNX headers from the SDP.

Build and run a QNX project

Build the project

  1. In the run/debug configuration 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 Build (Ctrl+F9) 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.

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 Run (Shift+F10).

    CLion uploads the binary to the upload path on the target and runs it there. The program output appears in the Run tool window.

    /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

Debug a QNX project

To debug on a QNX target, you need a debug profile 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.

Create a QNX OS debug profile

  1. Press Ctrl+Alt+S to open settings and select Build, Execution, Deployment | Debugger | Debug Profiles.

  2. Click the Add button 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.
  4. Click OK.

Start a debug session

  1. In the debug profile switcher on the main toolbar, select the QNX OS profile.

  2. Set breakpoints 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 Debug (Shift+F9).

    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 and examine the program state.

    CLion stopped at a breakpoint in argstats.c on the strlen line, with the Debug tool window showing the call stack and local variables.

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.

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.

Configure a hardware target

  1. Open the Serial Connections tool window: press Shift Shift 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.
  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.
  4. Specify this address in the Target SSH configuration in the QNX OS settings.

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

01 December 2026