Start programing on QNX

Hello Everybody ,

My Name is Indrit , and im happy to join This wonderful forum ,

I want to start learning and working on QNX for Automotive , Need to understandnformation getting from logs uart and how to work with this language

Is there any way where to start ? may be finding the right literature what to start reading ?

I appreciate everyone that will spent time reading this topic.

Thanks to all

Let’s start at QNX for Automotive. While I’ve been using QNX for about 35 years and I’ve heard of automotive targeted products from QNX, I know nothing about it.

A while back Blackberry created a pad and a phone that ran on QNX. QNX provided a development environment to build apps. The problem from my point of view was that this was all inside some kind of sandbox, so none of the lower level details I knew about QNX were relevant. For all I know, the same might be true about their automotive products. That is, you might not need to know anything about QNX, just about whatever API came with your automotive product.

With all that out of the way, how does one learn about QNX? The product used to come with a set of manuals. They are now available online or with the development environement. Personally, I like books which I can browse through. You might find a set of QNX 6 books around. Most of what you would read is still true, although there is more now and less. QNX dispensed with a GUI in favor of a generic video interface called screen which you can run other things on top of, e.g. OpenGl or Qt.

The real lower level stuff like message passing used to be described in the Systems manual. It was just an overview. From there you could look up specific API routines and look through the section on resource managers. If you want to do anything serious with QNX, you have to learn about resource managers. Robert Kyrten wrote a couple good books for QNX 6 which should be relevant to QNX 7. Here’s the first one you might look at:

I don’t understand what you are asking about UART logs.nor what “language” you are referring to. The primary languages used to program QNX with are C and C++.

Since QNX is mostly POSIX compatible, programming C or C++ for QNX is basically the same as programming C or C++ for Linux. The main differences I’ve noticed is thread handling (QNX do not support pthreads) and Inter Process Communication (IPC) APIs (if you want to make use of the RTOS part of the OS you need to use QNX own IPC).

When it comes to automotive I would believe that the main thing with QNX is that they are ASIL compliant. But you still need to make sure that the data you send between nodes are peer to peer protected.

I mostly develop everything for QNX on Linux and cross compile it with the q++ compiler. To be able to use the compiler you will need a QNX license and a installation of the QNX SDP for the QNX version you are developing for.

There are basically two licens models, academic and commercial. Academic is free, but you need to be connected to a educational faculty. The commercial one has a yearly subscription fee… no idea how much it is.

If you then want to try to run the stuff you done on QNX you will need to install the x86 version in a virtual machine or similar. But I would not recommend to do the actual development inside QNX

All available QNX development documentation can be found here.
https://www.qnx.com/developers/docs/index.html

If something is not specifically described in the documentation you can usually assume it works the same way as in Linux.


When it comes to other languages than C or C++ it gets a bit more complicated. Support for languages such as Python, Ruby, JavaScript and so on are nearly non existent. I’ve seen that there are efforts to port Node.js and Rust to QNX… But it is hard to find out what state they are in and how to try them out. They also seem to only be made for QNX 7.x

I’m at the moment trying to figure out if it is possible to use webassembly and Rust in QNX 7.x together with their new Blink based browser (only available in QNX 7.x and Car 3). But since I only have a QNX 4 license I can’t try it out myself. And the information about these things for QNX is almost zero.

A number of good points mattsson. A few others. If you are using QNX 4, you are correct that there is no pthread handling. Threads have existed since QNX 6. A commercial seat for 7.1 is very expensive, maybe $20K. In addition there is a yearly support fee. Rumor has is that if you decide against the support fee and you want to pick it up later, they charge you for the years you missed. You can’t do development on QNX 7+. They did away with this after QNX 6.5 along with their propietary GUI, Photon. Momentic/Eclipse never ran very well on QNX, but that may have had to do with the underpowered cpu’s of that era.

1 Like

There is a Python 3.8 interpreter delivered with SDP 7.1.
Adacore also has a Ada compiler for SDP7.x. Ada is a very interesting language.