BRDS (182.704, WS 2017) Ulrich Schmid s@ecs.tuwien.ac.at http://ti.tuwien.ac.at/ecs/teaching/courses/brds
File System Protocol Stack Audio Driver Graphics Driver Microkernel Application Message Bus Microkernel the only trusted component Applications and drivers: Processes that plug into a message bus Reside in memory-protected address space Cannot corrupt other software components Can be started, stopped, and upgraded dynamically Critical for survivability U. Schmid BRDS: Intro QNX Neutrino 2
Monolitic vs. Microkernel Architecture Realtime Executive (VxWorks, proprietary) > No MMU and no protection > Applications, drivers, etc. are all in kernel space Application Application Kernel space System-wide corruption Device Drivers TCP/IP Stack File System U. Schmid BRDS: Intro QNX Neutrino 3
Monolitic vs. Microkernel Architecture Realtime Executive (VxWorks, proprietary) > No MMU and no protection > Applications, drivers, etc. are all in kernel space Monolithic Kernel (Linux, etc.) > MMU with partial protection > Applications are protected Application Application Kernel space System-wide corruption Device Drivers TCP/IP Stack File System Application User Space (re-startable) Kernel space Contained Application Device Drivers System-wide TCP/IP Stack corruption File System U. Schmid BRDS: Intro QNX Neutrino 4
Monolitic vs. Microkernel Architecture Realtime Executive (VxWorks, proprietary) > No MMU and no protection > Applications, drivers, etc. are all in kernel space Monolithic Kernel (Linux, etc.) > MMU with partial protection > Applications are protected Application Application Kernel space System-wide corruption Device Drivers TCP/IP Stack File System Contained Application Application (re-startable) Device Drivers System-wide TCP/IP Stack corruption File System User Space Kernel space True Microkernel (QNX Neutrino RTOS) > MMU with full protection > Applications, drivers, and protocols are all protected Kernel Application Contained File System (re-startable) Contained User Space Device Drivers TCP/IP Stack (re-startable) U. Schmid BRDS: Intro QNX Neutrino 5
U. Schmid BRDS: Intro QNX Neutrino 6
Microkernel provides elementary functions only Most QNX services for application processes are NOT provided by the microkernel Rather: Via QNX system processes U. Schmid BRDS: Intro QNX Neutrino 7
U. Schmid BRDS: Intro QNX Neutrino 8
Processes have MMU-protected dedicated address space A process may comprise multiple threads that share its address space U. Schmid BRDS: Intro QNX Neutrino 9
Flexible preemptive, prioritydriven thread scheduling, with same-priority threads handled according to either round-robin FIFO (= manual round robin) sporadic (aperiodic server) U. Schmid BRDS: Intro QNX Neutrino 10
Flexible preemptive, prioritydriven thread scheduling, with same-priority threads handled according to round-robin FIFO (manual round robin) sporadic (aperiodic server) Powerful inter-process/thread communication (IPC) U. Schmid BRDS: Intro QNX Neutrino 11
U. Schmid BRDS: Intro QNX Neutrino 12
Very fast interrupt handling: Short periods where interrupts are disabled: Defer heavy computations to processes U. Schmid BRDS: Intro QNX Neutrino 13
Initial Program Loader (IPL): Elementary HW setup Startup: QNX boot Boot script: Application boot U. Schmid BRDS: Intro QNX Neutrino 14
U. Schmid BRDS: Intro QNX Neutrino 15
Basic IPC mechanism: Processes send / receive messages via channels Channel Higher-level (POSIX) services build atop U. Schmid BRDS: Intro QNX Neutrino 16
Flexible MP mechanisms: Fragmented messages via inputoutput vectors (IOV) Various MP semantics, for example, synchronous send: U. Schmid BRDS: Intro QNX Neutrino 17
Devices identified via pathnames Name resolution etc. handled by Process Manager and devicespecific Resource Managers U. Schmid BRDS: Intro QNX Neutrino 18
Devices identified via pathnames Name resolution etc. handled by Process Manager and devicespecific Resource Managers Example: Network printer usage U. Schmid BRDS: Intro QNX Neutrino 19
Devices identified via pathnames Name resolution etc. handled by Process Manager and devicespecific Resource Managers Relies on Global Name Service U. Schmid BRDS: Intro QNX Neutrino 20
U. Schmid BRDS: Intro QNX Neutrino 21
Embedded systems need to be monitored, debugged and controlled remotely Much of the complexity and difficulty with embedded development is limited insight into the operation of the target system U. Schmid BRDS: Intro QNX Neutrino 22
U. Schmid BRDS: Intro QNX Neutrino 23
U. Schmid BRDS: Intro QNX Neutrino 24
Process and Thread Information Source View with current executing code U. Schmid BRDS: Intro QNX Neutrino 25
Execution control Variables and data structures Registers U. Schmid BRDS: Intro QNX Neutrino 26
Embedded systems require operating system and applications to be bundled into a boot image Tools are needed to simplify the work of creating a boot image QNX Momentics provides the System Builder which provides tools in Eclipse to: Create boot image from OS, binaries, libraries and DLLs Startup script editing Built-in TFTP server Serial terminal U. Schmid BRDS: Intro QNX Neutrino 27
U. Schmid BRDS: Intro QNX Neutrino 28
Image Navigator Binary and File System Builder U. Schmid Built-in TFTP Server Binary Inspector BRDS: Intro QNX Neutrino Serial Terminal 29
Binaries, Libraries, DLLs, etc. Boot File System Structure U. Schmid BRDS: Intro QNX Neutrino 30
U. Schmid BRDS: Intro QNX Neutrino 31
We use QNX 6.5.0 with Service Pack SP1 (NOTE: Most recent QNX version is 6.6.0!) You hence need to download and install: QNX Software Development Platform 6.5.0 QNX Software Development Platform 6.5.0 Service Pack 1 QNX Software Development Platform 6.5.0 Byte Pair Encoding Patch QNX Software Development Platform 6.5.0 SP1 applypatch Patch QNX Software Development Platform 6.5.0 SP1 ARMv7 Kernel & Libc Patch QNX Software Development Platform 6.5.0 SP1 TCP Timer Patch QNX Software Development Platform 6.5.0 SP1 TCP Timer Patch Debug Files Rely on installation notes for every component U. Schmid BRDS: Intro QNX Neutrino 33
We use QNX 6.5.0 with Service Pack SP1 (NOTE: Most recent QNX version is 6.6.0!) You hence need to download and install: QNX BSP for Pandaboard (Release A4) [not for Pandaboard ES!]: TI-OMAP4430-Panda MLO/x-load bootloader U-boot bootloader Pandaboard WiFi Driver Follow TI OMAP4430 Pandaboard QNX6.5.0 BSP Release Notes and Install Notes U. Schmid BRDS: Intro QNX Neutrino 34
The BSP installation notes describe how to properly format the SD card for booting MLO/u-boot requires a single active FAT32 partition (of type 0x0c) If you use Windows (diskpart shell utility), the default partition offset is 1024 kb The MLO bootloader expects an offset of 4096 kb (not mentioned in the BSP installation notes!). Force it by create partition primary offset=4096 U. Schmid BRDS: Intro QNX Neutrino 35
U. Schmid BRDS: Intro QNX Neutrino 36