4

I installed QNX on the machine. The question is, the embedded system must also have access to the hardware, port management, and so on. How is this implemented in QNX? In what direction to study? So far I've found this the organization of files, directories, users, groups, etc. Or I do not understand the operating principle of the system

John
  • 468
  • 3
  • 16
  • 1
    Probably useful: http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.pci_server/topic/server.html – xmojmr Oct 12 '17 at 12:13

2 Answers2

7

NOTE: I PUT A LINK ON CODE SAMPLES at THE BOTTOM.

Ill try to explain it in terms of difference between Linux and QNX.

QNX is a RTOS and its kernel can be referred as Neutrino Kernel. Kernel is just a bare bones which interacts with H/W and it is the core of any operating system, But OS consists of application software and Kernel which works in unison to achieve the purpose of a computer system.

Linux on its own is just a Kernel, the GNU/Linux is a complete OS.

Linux is based on monolithic architecture whereas QNX is Micro Kernel.

Monolithic kernel: all the OS service run along with the kernel main thread thus residing in the same memory. Monolithic kernels are easier to implement but a bug in some part like the driver can bring down the total system.

MORE RANT:

QNX is a complete microkernel based on realtime OS, vs Linux which is a monolithic kernel. QNX can run on many Embedded platforms, such as on mini computers in cars which have satnav or music controls.(Jeep Cherokee), SCADA systems. The application building framework is much different than X11, or Wayland you get on Linux. As shown in QNX GUI it is much closer to to the bone and metal.

Example: In Linux if you want to draw a circle on the screen, this will go through many layers of abstraction like the X11, in QNX things take a more direct route which makes it faster on a small chip, this results in loosing most of the networky stuff which X11 makes possible on to Linux.

QNX is somewhat out of the box, supported framework for making embedded systems, vs GNU/LINUX is a bit more opposite of this.

Real Time side of things is about both timely responses and accuracy of the response.

Look here to understand QNX and different parts that you need for coding.

QNX Sample Code can be found here.

BlooB
  • 955
  • 10
  • 23
2

The documentation for QNX SDP 7 is at http://www.qnx.com/download/group.html?programid=29184 - you'll need to log in to access it (create an account if you don't have one already).

The QNX Neutrino System Architecture guide is a must read.

By and large, hardware access will be needed for system startup (see Building Embedded Systems) and processes providing system services (Writing a Resource Manager). Primarily you'll be looking at having sufficient privilege to access ports, attach interrupt handlers, and map hardware resources into the address space of your program, then creating initialization routines, interrupt handlers (QNX Neutrino RTOS Programmers Guide), and various forms of event responders that operate in threads within resource manager processes when unblocked by interrupt handlers. The QNX Neutrino Cookbook gives some examples. Look for functions like mmap* in* out* shm* in the library reference and when searching for examples.

But, study and really learn the System Architecture first, it will be hard to find your way around the rest of the documentation and make sense of it without understanding the architecture and the associated terminology.

Have fun!

v836
  • 111
  • 2