200 likes | 457 Views
VxWorks 6.0 and EPICS “a first look”. Ernest L. Williams Jr. 27 April 2005 EPICS Collaboration Meeting @ SLAC. Outline. What is vxWorks 6.0? Maybe we will begin using the tools? Integration into the EPICS R3.14 build system. Running with EPICS, cool!! Issues/Concerns References.
E N D
VxWorks 6.0 and EPICS“a first look” Ernest L. Williams Jr. 27 April 2005 EPICS Collaboration Meeting @ SLAC
Outline • What is vxWorks 6.0? • Maybe we will begin using the tools? • Integration into the EPICS R3.14 build system. • Running with EPICS, cool!! • Issues/Concerns • References
What is vxWorks 6.0? • An expensive new toy!!
What is VxWorks 6.0? New Features • Kernel execution environment compatible with 5.5 • Real-time Process environment for user-mode code • MMU-based memory protection • Error detection and reporting facility • Better POSIX compilance, esp. in RTPs • dosFS improvements • Transaction-based Reliable File System • ROMFS Filesystem • New and enhanced IPC facilities • Shared library support • Object ownership and resource reclaimation • Kernel (target) shell enhancements • New processor/device support • Improved OS configuration and build facilities
What is VxWorks 6.0 (Cont’d) Supported Hardware/Host Not good where is the 68Ksupport --- Did WRS “pull a Redhat?”
What is VxWorks 6.0 (Cont’d) Real-time Processes • Real-time Processes (RTPs) are containers for user-mode applications. • Each RTP has own copies of code, data, stacks, heap and resources. • RTPs are not scheduled – tasks within RTPs are. • RTPs are launched from a fully-linked relocatable executable loaded from a file system (a la UNIX).
What is VxWorks 6.0 (Cont’d) Kernel Enhancements • Object Management (private and public scope) • ISR Objects • Optimized mutex semaphore for processes • Task preemption prevention in processes (taskRtpLock/Unlock) • Priority-inheritance enhancement • Configurable kernel work queue size
What is VxWorks 6.0 (Cont’d) Memory Management • Non-executable stack pages (certain CPUs.) • Stack overrun and underrun detection. • NULL pointer dereference detection (certain CPUs.) • Text segment write protection • Heap and partition manager instrumentation (run-time checking) • Kernel heap allocator improvements (best-fit vs. first-fit) • User-space heap and partition allocators
What is VxWorks 6.0 (Cont’d) Error Detection and Reporting • New error detection and reporting facility • Persistent error logs • Configurable behaviors on a task, process, and system level • Exception handlers instrumented to log information
What is VxWorks 6.0 (Cont’d) File System • Improved dosFs file system • Safest-order writes of metadata and user data to minimize chances of corruption • Optional cache write-through • Support for O_SYNC flag on open() operations • FIOSYNC ioctl fully flushes block device caches • Support for Unicode file names • Enhanced CHKDSK (FAT recovery, performance, etc.) • TRFS lightweight journaling filesystem • ROMFS read-only filesystem
What is VxWorks 6.0 (Cont’d) Kernel (Target) Shell • C interpreter enhancements for process information • Handles long long, short, float, signed, unsigned types • Path completion (if filesystem supports it) • New UNIX shell like interpreter • Allows custom interpreters • Multiple shell support • Secure access (user id/password protection) • Fault management support (ED&R) • VI or EMACS style command line editting • C++ symbol handling enhancements
New Tools “WindRiver Work Bench” • Development environment revolves around ECLIPSE. • A smart move by WindRiver • We still like using the commandline but maybe we will begin to use some of the builtin tools that come bundled with “Workbench” • Source Code Analyzer • Debugger • System Viewer • Scope Tools • Sergei and Tom use ECLIPSE; so it must be good!
EPICS Integration Prepare vxWorks for EPICS • BSP migration and flashing the IOC • Simply re-compile the mv2100 BSP against vxWorks 6.0 • If you want native support, then follow the BSP migration documenation. • The mv5100 BSP has native support for vxWorks 6.0 • The idea of the project facility is not too bad when done via command line. • Use WRS workbench CLI to add components recommended by Andrew Johnson. • http://www.aps.anl.gov/epics/base/T20xConfig.html • vxprj component add INCLUDE_POSIX_TIMERS • The GUI folks can use the workbench IDE to do this as well.
EPICS Integration Let’s build some vxWorks 6.0 targets • We begin by adding/modifying the EPICS build environment to support building vxWorks 6.0 targets. • Supported cross targets at the SNS • MVM2101 (vxWorks-mv2100_v6) • MVME5110 (vxWorks-mv5100_v6) • Changes to $(EPICS_BASE)/configure/CONFIG_SITE • Add our two new cross targets • Changes to $(EPICS_BASE)/configure/os • Add ---- CONFIG_SITE.linux-x86.vxWorks-mv2100_v6 • Add ---- CONFIG.Common.vxWorks-mv2100_v6 • Add ---- CONFIG_SITE.linux-x86.vxWorks-mv5100_v6 • Add ---- CONFIG.Common.vxWorks-mv5100_v6 • Add ---- CONFIG.Common.vxWorksCommon_v6
EPICS Integration Here’s what we do for the mv2100: CONFIG_SITE.linux-x86.vxWorks-mv2100_v6 VX_DIR_YES = /ade/vxWorks/6.0 CONFIG.Common.vxWorks-mv2100_v6 include $(CONFIG)/os/CONFIG.Common.vxWorksCommon_v6 # Vx GNU cross compiler suffix CMPLR_SUFFIX = ppc ARCH_CLASS = ppc # Architecture specific build flags ARCH_DEP_CPPFLAGS = -DCPU=PPC603 ARCH_DEP_CFLAGS = -mcpu=603 -mstrict-align -mlongcall
EPICS Integration Wow WRS has moved the headers around on us, hmmm. CONFIG.Common.vxWorksCommon_v6: #-------------------------------------------------- # vxWorks directory definitions # Tornado directory definitions GNU_TARGET_INCLUDE_DIR = $(VX_DIR)/vxworks-6.0/target/h GNU_TARGET_INCLUDE_DIR += $(VX_DIR)/vxworks-6.0/target/h/wrn/coreip GNU_DIR = $(VX_DIR)/gnu/3.3.2-vxworks60/x86-linux2
Running with EPICS R3.14.7 • EPICS is running in kernel space • Checkout the DEMO • Next Step --- How can EPICS use RTPs?
Issues/Concerns • WRS supplied patches to get around issues with the new “target shell” environment. • WRS did a great job to supply patches • Compiler problems introduced for C++ drivers • Not too bad but thrashes our developers a bit • Licensing Model can be a pain. • Need to do some real performance testing
Disadvantages Much too expensive WRS is incompetent on deployment of their own licensing schemes “Subscription” versus “Perpetual” Tries to use FlexLM (maybe WRS should ask the MathWorks how to do this, hmmm?) Unique User Node-Locked Floating Advantages WRS is still the current leader in the Real-Time OS space. Many vendors will give or sell vxWorks drivers. Most will just give away the driver in source/binary form. Technical Support is really much better. Really they are!! Network Stack is improved Issues/Concerns
References • Talk by WindRiver Systems (March 2005) • http://www.aps.anl.gov/epics