Development

QNX and the QNX Build System

chanbae 2024. 11. 23. 11:57

QNX is a Real-Time Operating System (RTOS), based on a microkernel architecture and used primarily in embedded systems. QNX was developed by QNX Software Systems in Canada in the 1980s and is characterized by high reliability, real-time processing power, and small memory usage.

Source: https://www.linkedin.com/pulse/future-automotive-innovation-blackberry-qnx-ces-2024-wvtkc/

 

Acquired by Blackberry in 2010, the QNX hypervisor is ASIL D certified and has many production references, making it a popular choice for automotive OSs despite the high cost of licensing. 

QNX SDP (Software Development Platform)

The QNX Software Development Platform (SDP) is a comprehensive collection of tools and libraries for developing applications on the QNX operating system. QNX is a real-time operating system (RTOS), which is widely used for applications that require high reliability and performance, especially in embedded systems. The SDP facilitates software development in this QNX environment and provides a number of tools to support various development tasks.

Key components of the QNX SDP

  • QNX Neutrino RTOS: A highly modularized real-time operating system kernel that supports multi-core processors and various hardware platforms. It provides high reliability and real-time performance.
  • QNX Momentics Tool Suite: An integrated development environment (IDE), it is an Eclipse-based development tool. It includes a code editor, debugger, profiler, performance analysis tools, and more.
  • QNX Libraries and APIs: Provides a variety of standard libraries and APIs, enabling easy use of various functions such as file system, networking, graphics, multimedia, etc.
  • Board Support Packages (BSPs): Support packages for various hardware platforms, enabling you to run and develop the QNX Neutrino RTOS on specific boards.
  • Middleware: Includes middleware solutions to support functions such as multimedia, networking, user interface, and more.

QNX SDP Download

Source: https ://www.fsi-embedded.jp/product_detail/5842/

 

QNX is commercially licensed, so once you have a company contract, you can download it by logging in to https://blackberry.qnx.com/en and adding an account. Alternatively, you can get a trial license from Blackberry to try it out temporarily. At the time of writing, QNX SDP 8.0 is the latest version.

How to build QNX

QNX builds are organized based on a Makefile and include mk files defined by QNX in it. For larger projects, it is wrapped once more with a build system such as Bazel or CMake, and cached using the Bazel cache mechanism or ccache to support incremental builds.

 

QNX can be used by using the QCC compiler and downloading and installing the SDP. However, if you do not proceed with the procedure to register the license, a license check error will occur when executing the qcc command after configuration.

Source: https://stackoverflow.com/questions/55914017/how-do-i-run-a-simple-hello-world-program-under-qnx

 

The license registration process is done by getting QNX Software Center, and in my case, I set up a license server using a floating license, and the address must be exported before running QCC to work properly.

 

After that, the usage of QCC is not much different from GCC, so you can easily use it by looking at https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html.

Summary

Despite its high price, QNX has safety certifications and a lot of production references, which makes it a popular RTOS operating system for automotive software (ADAS, Infotainment, etc.). There were many comments that the customer support was not satisfactory, and I felt that way too, but recently I have noticed a lot of changes in customer service and responsiveness, maybe because of the crisis.

 

As for the build system, you should set it up according to your project, but I personally recommend using Bazel. I'm a little hesitant because it's a Google build system and they stopped supporting Android, but I don't think there are many alternatives. I've also thought about trying Yocto, but I'm a bit half-hearted about it now.