VxWorks 6.0 and EPICS “a first look” Ernest L. Williams Jr.
Download
Report
Transcript VxWorks 6.0 and EPICS “a first look” Ernest L. Williams Jr.
VxWorks 6.0 and EPICS
“a first look”
Ernest L. Williams Jr.
27 April 2005
EPICS Collaboration Meeting @ SLAC
ICS – Software Engineering Group
1
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
ICS – Software Engineering Group
2
What is vxWorks 6.0?
An
expensive new toy!!
ICS – Software Engineering Group
3
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
ICS – Software Engineering Group
4
What is VxWorks 6.0 (Cont’d)
Supported Hardware/Host
Not good where is the 68K support --- Did WRS “pull a Redhat?”
Architectures
Intel, MIPS and PowerPC
Architecture
Families
• Pentium ,2,3,4
• MIPS 5Kx, tx49xx, bcm125x
• Freescale PowerPC 60x, PowerPC 7xx, PowerPC 74xx,
PowerPC 82xx, PowerPC 52xx, PowerPC 85xx
• IBM PowerPC 405, PowerPC 44x
Hosts
• Windows 2000 professional
Windows XP
Solaris 2.8, 2.9
Red Hat Enterprise Workstation 3.0
--- Fedora Core 3 works great as well (but not supported)
--- Red Hat Enterprise Workstation 4.0 will be supported in future releases
ICS – Software Engineering Group
5
What is VxWorks 6.0 (Cont’d)
Real-time Processes
Real-time Processes (RTPs) are containers for usermode 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).
ICS – Software Engineering Group
6
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
ICS – Software Engineering Group
7
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
ICS – Software Engineering Group
8
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
ICS – Software Engineering Group
9
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
ICS – Software Engineering Group
10
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
ICS – Software Engineering Group
11
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!
ICS – Software Engineering Group
12
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.
ICS – Software Engineering Group
13
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
Add
Add
Add
Add
---- CONFIG_SITE.linux-x86.vxWorks-mv2100_v6
---- CONFIG.Common.vxWorks-mv2100_v6
---- CONFIG_SITE.linux-x86.vxWorks-mv5100_v6
---- CONFIG.Common.vxWorks-mv5100_v6
---- CONFIG.Common.vxWorksCommon_v6
ICS – Software Engineering Group
14
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
ICS – Software Engineering Group
15
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
ICS – Software Engineering Group
16
Running with EPICS R3.14.7
EPICS is running in kernel space
Checkout the DEMO
Next Step --- How can EPICS use RTPs?
ICS – Software Engineering Group
17
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
ICS – Software Engineering Group
18
Issues/Concerns
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
ICS – Software Engineering Group
19
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
References
Talk by WindRiver Systems (March 2005)
http://www.aps.anl.gov/epics
ICS – Software Engineering Group
20