
• Configure the network on the slave side using the command below:
$ rtifconfig rteth0 up 192.208.100.102
If there are more than one slave boards, you should redo this step using the IP address of the used boards.
NOTE
• Verify the network connection using the command below:
$ rtping 192.208.100.102
4.4 PREEMPT-RT
This option turns the kernel into a real-time kernel by replacing various locking primitives (spinlocks, rwlocks, etc.) with preemptible
priority-inheritance aware variants, enforcing interrupt threading and introducing mechanisms to break up long non-preemptible
sections. This makes the kernel, except for very low level and critical code pathes (entry code, scheduler, low level interrupt
handling) fully preemptible and brings most execution contexts under scheduler control.
4.4.1 System RT Latency Tests
The basic measurement tool for RT Linux is cyclictest.
4.4.1.1 Running Cyclictest
Cyclictest accurately and repeatedly measures the difference between a thread's intended wake-up time and the time at which
it actually wakes up in order to provide statistics about the system's latencies. It can measure latencies in real-time systems
caused by the hardware, the firmware, and the operating system.
The original test was written by Thomas Gleixner (tglx), but several people have subsequently contributed modifications.
Cyclictest is currently maintained by Clark Williams and John Kacur and is part of the test suite
.
cyclictest :
• Use the below command to Latency Test:
$ cyclictest -p90 –h50 –D30m
For detailed parameters of Cyclictest, please refer to
https://wiki.linuxfoundation.org/realtime/documentation/
howto/tools/cyclictest/start?s%5b%5d=cyclictest
NOTE
4.4.2 RT Application Development
This section describes how to Development application.
RT Application: API, Basic Structure, Background :
• Basic Linux application rules are the same; Use the POSIX API.
• There is still a division of Kernel Space and User Space.
• Linux applications run in User Space
• For details, please refer to:
http://rt.wiki.kernel.org/index.php/RT_PREEMPT_HOWTO
RT Application: How do you build it :
• Using the cross compiler example:
$ arm-linux-gnueabihf-gcc <filename>.c -o <filename>.out -lrt –Wall
NXP Semiconductors
Industrial features
Open Industrial User Guide, Rev. 1.8, 05/2020
User's Guide
47 / 199