\\newpage # QNX Neutrino ## Thread priority QNX supports a total of 256 scheduling priority levels. A non-root thread can set its priority to a level from 1 to 63 (the highest priority). Using priorities higher than 63 is only possible if the allowed priority range is changed for non-root processes: ```console $ procnto -P priority ``` For more information on changing the priority range refer to the QNX documentation. #### ATTENTION Not changing the priority range leads to poor timing performance! ## Unbind Ethernet Driver instance The network interface must be unloaded if it is used by an operating system driver. Depending on the QNX version, a corresponding command must be executed in the QNX Shell or the QNX Build Script. QNX >= 6.5 : ```console $ ifconfig en1 destroy ``` QNX >= 7.1 : ```console $ umount /dev/io-sock/devs-em.so/em1 ``` ## IOMMU/SMMU support For systems that have to use an IOMMU/SMMU for security reasons, it is possible to create a predefined typed memory region that is used by the Real-time Ethernet Driver. The definition has to be done in the QNX BSP build file and the name must match following pattern: **smm_** *LinkLayerName* **-** *InstanceNumber(32Bit Hex)* Example: Real-time Ethernet Driver emllIntelGbe with instance number 1 : ```default smm_emllIntelGbe-0x00000001 ``` A separate typed memory region must be defined for each Real-time Ethernet Driver instance. The typed memory is automatically used by the Real-time Ethernet Driver if it matches the pattern, otherwise the default memory is used. ## Setting up and running EcSimulatorHilDemo 1. QNX Neutrino OS configuration In order to get real-time priority (e.g. 250), see [Thread priority](#thread-priority) and also set JOBS_PRIORITY. The application needs root privileges to increase the priority above 63. 2. Unbind Ethernet Driver instance, e.g. ```console $ ifconfig en1 destroy ``` 3. Copy files from EC-Simulator package `/bin` and `eni.xml` to directory, e.g. `/tmp`. 4. Adjust LD_LIBRARY_PATH search locations for Real-time Ethernet Driver if necessary, e.g. ```console $ export LD_LIBRARY_PATH=/tmp:$LD_LIBRARY_PATH ``` 5. Run EcSimulatorHilDemo ```console $ cd /tmp $ ./EcSimulatorHilDemo -intelgbe 1 1 -f eni.xml -perf ``` #### SEE ALSO [Running EcSimulatorHilDemo](architecture_os-configuration.html.md#running-ecdemo) ## OS Compiler settings Besides the general settings from [OS Compiler settings](architecture_sdk.html.md#compile-ecdemo) the following settings are necessary to build the example application for QNX Neutrino. Extra include paths : ```default /SDK/INC/QNX /Examples/Common/QNX ``` Extra source paths : ```default /Examples/Common/QNX /Sources/OsLayer/QNX ``` Extra library paths to the main EtherCAT® components : ```default /SDK/LIB/QNX/ ``` Extra libraries (in this order) : ```default EcSimulatorRasServer EcSimulator socket ```