© 2005 Wind River
© 2005 Wind River
© 2005 Wind River
Device Software Optimization
Wind RiverWorkbench2.5 / VxWorks6.3
Marcus Bortel
3 © 2005 Wind River
Agenda
09:00-09:15 Welcome & Introduction (DESY)
09:15-09:30 DESY – Projects, Requirements, Meeting Goals (DESY)
09:30-10:15 Wind River Workbench – End to End IDE (Marcus Bortel)
10:15-10:50 Wind River VxWorks 6.x – world leading RTOS (Marcus Bortel)
10:50-11:00 Break Open Discussion (all)
11:00-11:30 Licensing (Floating License) (Marcus Bortel)
11:30-12:30 Workbench Introduction (Marcus Bortel)
12:30-13:15 Lunch (all)
13:15-14:15 Generate Boot loader and VxWorks Image (Marcus Bortel)
Configure and Generate a Target Image
14:15-15:30 Run Image on Target, Debugging of the Target (all Tools) (all)
15:30-15:40 Break (all)
15:40-16:45 How is BSP and Driver implemented (overview) (Marcus Bortel)
16:45-OPEN Open Discussion (all)
Latest 18:00 Wrap Up and Next Steps (all)
4 © 2005 Wind River
Agenda
1. Die neue SW-Version VxWorks 6.0 (z.Zt. ist 5.5 aktuell), für die DESY gerade
einen neuen Wartungsvertrag abgeschlossen hat. D.h. die Unterschiede und neuen
Features. Die neue VxWorks 6.0 Version kann/wird basierend auf der Workbench
Eclipse bearbeitet -> Einführung.
2. Image Konfiguration mit dem neuen Graphiktool bzw. mit dem CMD-Tool.
3. Einbinden von Treibern und eigenem Code in ein Image.
4. Einbinden von neuer HW (NIC und GRA-Karten) in das Target.
5. Allgemein das Thema Netzwerk: Zuordnung von Routingtables, laden des Images
über Subnetzgrenzen hinaus, Verwendung von Gateways usw.
5 © 2005 Wind River
Wind River Workbench Development Suite
Wind River Workbench
Graphical User Interface Host Shell
Eclipse Framework
System Viewer Third-Party CMProject Editor
Build
Compiler
Source Analyzer
Debugger
AlternateEditor
Third-Party Tool
Analysis
Data
Memory
Performance
Coverage
VxWorks Simulator
VxWorks Linux Other OS No OS
OCD and Target Agent Connectivity
UnitTester
Diagnostics
HardwareBring-Up
FirmwareDriver & BSP
ApplicationSoftware
Code QA & Test
System Test
6 © 2005 Wind River
How many tools do you use?
HardwareBring Up
Kernel/OS, Driver, & BSP
Application Software
Design & Debug
Code QA& Test
Product Life Cycle
Deployment & Field Management
System Level Testing
JTAG Tools
JTAG Debugger
Code Browsers
Build SystemsConfiguration management
Multiple Debuggers Editors
Memory Leaks Detectors
CPU Profilers
Unit Testing Tools
Data tracing Tools
Code Coverage Tools
Code Patching Framework
Telnet/Serial Shells
7 © 2005 Wind River
FirmwareDriver & BSP
ApplicationSoftware
VerificationAnd Test
HardwareBring Up
Kernel/OSDriver & BSP
ApplicationSoftware
Design & Debug
Code QA& Test
JTAG Based Tools
Flashing, H/W Testing, H/W trace
JTAG Debugger
Full Source Level Debugging,Multi-Core, Multi-device Support,
Visual Kernel Configuration
Build-Compile-Debug
Code Browsing and Navigation, Automated Builds, Multi-device
Debugging, Target Management
System Level Testing
Deployment &Field Management
Dynamic Debugging
Run-time Dynamic Code Insertion, Core File Analysis
Software Performanceand Visualization
Graphical analysis of Memory Allocations / Leaks, Function Profiling,
Visualization of OS Events
Testing and QA
Unit Testing, Performance Analysis, Code Coverage,
Field Diagnostics
Remote upgrades, Device management
Where does Workbench fit in?
8 © 2005 Wind River
Wind River Workbench
One Common Interface for All Phases of Device Development, Debug, and Test:
• Hardware Bring-up
• Kernel/OS, Driver, and BSP Development
• Application Software Design and Debug
• Code QA & Test
• System Level Testing
• Deployment & Field Management
9 © 2005 Wind River
Workbench Benefits by Phase
• Hardware Bring-up– High speed, on-chip debug (OCD) and download– Built in hardware diagnostics– Hardware breakpoints (flash/ROM)– Detailed Access to cache and peripheral registers– Flash programming
• Kernel / OS, Driver & BSP Development– OCD and agent, at the same time– Register, assembly, and and source level– OS/Runtime configuration– Kernel object browsing– Source code enhanced debugging for VxWorks and Linux
• Application Software Design & Debug– Editor, source analysis, debug integration– Source code analysis – Multiple context debugging– Data monitoring– Performance Profiling– Memory use analysis
FirmwareDriver & BSP
ApplicationSoftware
VerificationAnd Test
HardwareBring Up
Kernel/OSDriver & BSP
ApplicationSoftware
Design & Debug
Code QA& Test
System Level Testing
Deployment &Field Management
10 © 2005 Wind River
Workbench Benefits by Phase
• Code QA & Test– Unit Testing and Test coverage analysis (optional plug-in)– Automatic generation of test harness code and test case stubs (optional plug-in)– Static code analysis and code formatting enforcement
• System Level Testing– Core file analysis after system failures– Run-time code insertion to add instrumentation
• Deployment & Field Management– Support instrumentation of deployed devices– Software version management– Field firmware upgrades
FirmwareDriver & BSP
ApplicationSoftware
VerificationAnd Test
HardwareBring Up
Kernel/OSDriver & BSP
ApplicationSoftware
Design & Debug
Code QA& Test
System Level Testing
Deployment &Field Management
11 © 2005 Wind River
Workbench is built on an open framework
ECLIPSE Platform
CDTProjects, Editor &
Static Analysis
Views
WRSource Code
Analysis Engine
Debugger Views
Via DSDP
WR Compiler
WR Platform Specific
Tools
WRDebuggerBack-end
Target Management
Via DSDP
WRPlatform
Independent Tools
NativeGNU Tools
Support(GDB)
Open S
ource
Win
d R
iver
Wind River Workbench Value-Added Components
Open Eclipse Framework
Analysis& Test
Framework
Via TPTP
Partnerand/or
Customer-Integrated
Tools
12 © 2005 Wind River
Introduction – Eclipse platform
• WindRiver Workbench is based on the Eclipse platform
– An open, industry supported, java-based framework for tool integration
– Integration via Plug-Ins for additional technologies like ClearCase, PVCS, SlickEdit and more available
– Runs on a wide range of operating systems with common look & feel
– Open-source licensing and a community of tool developers
– For more information please seehttp://www.eclipse.org
Wind River Workbench
Java VM
Eclipse platform
ClearCase, CVS, etc.
Java DevelopmentTools (JDT)
Wind River Development
Tools
13 © 2005 Wind River
Eclipse platform – what it provides
• Ready to use UI features– Native look and feel on all supported host platforms – Supports platform specific features, i.e. ActiveX– Dockable views (place views on different locations in the frame) – Floating views (open them as separate windows) – Toolbars configurable/dockable by end user – Drag & Drop support– History (ability to navigation back and forward similar to a web browser) – Bookmarks (ability to mark locations persistently) and History– Online Help (context sensitive Windows (based on HTMLHelp) and Unix
(integration with Netscape) )– Online Upgrade (could be integrated with existing WRS technology)
• Integration with 3rd party tools – ClearCase, CVS, over 950 more -> http://eclipse-plugins.2y.net/eclipse/
14 © 2005 Wind River
staticanalysis
project build
Wind River Workbench
debugger targetmanager
ClearCase
Introduction - Workbench Components
Leverage SNiFF+ industry proven,
big project enabled, technologyLeverage Tornado & Vision/SingleStep technology
WR editor
15 © 2005 Wind River
Wind River® Workbench Architecture
Debugger Frame Work
Eclipse Framework
Project &
Build System*
Source
Browsing* (SNiFF+
Technology)
Workbench
Editor*
Profiling
Tools*Scope Tools /
WR System Viewer
Unified
Debugger*
On-Chip Debug Connection
Plug-in
Target Agent Connection
Plug-in
Embedded OS
JTAG
TargetApplication
Target Agent
Network
WIND®RIVER ICE
WIND®RIVER Probe
NetworkUSB/LPT
Network
CPU Plug-in
Host
Target
Compilers(Diab & GNU)
* WR Extensions to Eclipse
Target OS Plug-in
Target BoardSerial
16 © 2005 Wind River
Wind River Workbench
One Common Interface for All Phases of Device Development, Debug, and Test:
• Hardware Bring-up
• Kernel/OS, Driver, and BSP Development
• Application Software Design and Debug
• Code QA & Test
• System Level Testing
• Deployment & Field Management
17 © 2005 Wind River
Static Analysis
Capabilities– Symbol browsing (easy & quick navigation)– Function call trees, Dependency graphs– Class inheritance– Include hierarchies– Code completion & parameter hints– Conditional code highlighting– Retriever for fast Search and Replace– Refactoring (C/C++ symbol based replacement)
BenefitsNavigate instantly
• Through millions of lines of code• Thousands of files and directories• Without getting lost
Better comprehend source code• Excellent dependency visualization
Make code reuse reality• Understand VxWorks 6.3 and Linux source code• Port to custom hardware more quickly• Simplify code reviews
Coding 19%
Documenting
6%
Testing/Debugging
28%Code Analysis 47%
How do developers spend their time?
Time Savings with Wind River Workbench
18 © 2005 Wind River
Source Analysis
• Features– Symbol browsing– Function call trees– Dependency graphs– Class and diagrams– Include hierarchies– Code completion– Conditional code highlighting
• Benefits– Better understand Linux kernel
updates and open source software
– Port to custom hardware more quickly
– Simplify code reviews
19 © 2005 Wind River
Retriever
• The “most used“ SNiFF+ Tool is now available with the Wind River Workbench
• Search and Replace your project(s) content by one mouse click
New Highlights
• Speed – the Workbench Retriever is performance optimized (faster than in SNiFF+)
• Matches are automatically highlighted in the Source Editor
20 © 2005 Wind River
Wind River Workbench Editor
• Rich Graphical Code Editing– Code Completion– Symbol tool tips (even external)– Keyword and symbol high-lighting– Code Formatting– Conditional Code Highlighting
• Support for multiple languages
– C/C++, Ada and Assembly
• Well Integrated– Debugger - Set breakpoints, step
through code, mixed source and assembly views
– Source analysis – go to symbol definition, open call trees, …
• Scalable and Extensible– Works with files up to 1GB large– Accepts other Editor plug-ins based
on Eclipse
• Includes VI plug-in and Emacsconstructs
21 © 2005 Wind River
Source completion & Parameter hint
22 © 2005 Wind River
Workbench - Project and Build
• Extensions to the Eclipse project system – Wizards to create new projects
• bootable, downloadable, RTP’s, BSP’s– Integration with VxWorks kernel config and system builder UI– Multi-Language project support– Migration of existing projects (T2.2, SNiFF+ 4.x) by providing a
Project Importer Utility
• Build extensions– Multi-language, multi-platform build system– Based on Makefiles (gmake) maintained by the IDE– Automatic generation of makefiles (including dependencies)– Build can be started also from command line– Configurable for WindRiver (diab) and GNU compiler– Easily build RTP’s for different build specs
23 © 2005 Wind River
Wind River Tool Chain & Debugger
Choice of 2 compilers for flexibility and easier migration– Gnu toolchain 3.4– Wind River toolchain (diab) 5.4
(significant new cross-module optimizations)
WindRiver Debugger– Extendable design with a plug-in architecture
– Target OS (VxWorks, Linux)– Connection Types (JTAG, Serial, Ethernet)– CPU (PowerPC, Intel, ARM among others)
– Debug multiple tasks, threads, RTPs, and processors concurrently– Dual OS debug strategy
– Task mode and system mode debugging (VxWorks 6.2+)– Kernel & User mode debug via a single agent (Linux) – Same debug agent for VxWorks 6.2+ and Linux 2.4.x Linux 2.6.x
– Performance optimized for large code bases
24 © 2005 Wind River
Wind River VxWorks Simulator
Complete simulation of VxWorks 6.3• vxSim is a port of vxWorks to a host architecture (x86)• Full featured prototyping and test environment• The capabilities of VxSim are (more or less) identical to a “true“ VxWorks running on a HW target
Ability to create virtual networks• Create virtual systems• Connect VxWorks simulation environment to real
system components
Benefits• Hardware independent development• Allows large portion of SW testing early in the development cycle
25 © 2005 Wind River
Wind River System Viewer
Software Logic Analyzer
Graphical visualization of all system activity over time
Multiple data collection and upload methods including ring-buffer and post-mortem
Data export for advanced analysis
Operating System Support• Linux • VxWorks 6.0+ (including triggering)
BenefitsQuickly analyze and understand the complete temporal behavior of your deviceFind critical proplems in your system quickerFine-tune your shippable product
26 © 2005 Wind River
Multiple Context DebuggingConnect to and debug Multiple processor cores, multiple processors, multiple
operating systems simultaneously
Systems• Multiple Cores in a Die• Multiple CPUs on a board• Multiple CPU boards in a system• Kernel Level Debug
Applications• Multiple Applications• Multiple Tasks, Threads, Processes• Multiple Kernels• Stepping through System Calls
Connections• TCP/IP• Serial• JTAG
Debug Agents• Kgdb / kernel agents• User App. agents • WDB agent• JTAG/ICE agents
27 © 2005 Wind River
Wind River WorkbenchMultiple Session and Multiple Core
• Multiple Sessions/ Connections:
– Software Agent Based– Wind River ICE– Wind River Probe
• Multiple CPUs or Boards:
• Multiple Contexts– System – Processes– Threads
• Linux Debugging– KGDB over Ethernet– KGDB over Serial– Usermode over Ethernet– Usermode over USB
• VxWorks Debugging– System mode debug– Task mode debug– Multiple connection types
(ethernet, serial, JTAG)
28 © 2005 Wind River
Wind River On-Chip Debugging Tools
Debugging enhanced with the addition of On-Chip Debugging support• Support for Board and Operating System Bring-up• CPU and Board initialization• Analyze and debug system crashes• Program Flash devices in-circuit• Built-in diagnostics for board testing• Kernel mode debugging with OS Awareness
– VxWorks– Linux– Express Logic ThreadX
Hardware supportedWind River ICE• High Speed Ethernet connectivity
• Wind River JTAGServer™ support for multiple JTAG/EJTAG/BDM devices
• Target Console Interface for backhaul of serial data from target to host development environment
• Easy migration from one processor family to another
Wind River Probe• USB 2.0 Compatible
• USB Windows Device Driver Certified
• USB Powered, no additional power supplies required
• Easy migration from one processor family to another
• 100MHz JTAG Clock support
29 © 2005 Wind River
Wind River ScopeTools
ProfileScope– Statistical Profiling
MemScope– Memory Analysis with Leak Detection
Stethoscope– Graphical Data Monitoring Tool that
provides visualization of dataTraceScope
– Code Execution tracing tool for VxWorks 6.2+CoverageScope
– Complete code coverage information for testing VxWorks 6.2+
Benefits• Fully integrated into the WindRiver Workbench via Plug-Ins
• Analyze and solve problems in demanding embedded applications
• Reduce risk, reduce time to market, by cutting integration and test time
30 © 2005 Wind River
ScopeTools Is Your Toolbox
• Provides visibility into running system– Analyze customers’ code, third-party code,
and the operating system• No recompilation or instrumentation
required (except for CoverageScope)
• Guarantees system reliability– Track memory leaks, memory corruptions, and
bad parameters• Ensures high performance
– Find slow code, unnecessary function calls, poorly assigned task priorities while running production code at full speed
• Reduces time to market – Get results instantly without making your
customers jump through hoops.
31 © 2005 Wind River
ScopeTools
• Visualization and Analysis tools– StethoScope
• Real-Time Data Monitor
– TraceScope• Execution-Flow Tracer
– ProfileScope • Dynamic Execution Profiler
– MemScope• Instant Memory Analyzer
– CoverageScope• Code Coverage Analyzer
• Used by kernel developers, middleware developers, and application developers
32 © 2005 Wind River
Finding Solutions with MemScope
• Problem: After running for several days, the application controlling my hardware fails. Because this occurred right after upgrading to a new version of a driver, we suspect there is some problem in thenew driver code.
• Solution: MemScope quickly points out that the third-party driver has a memory leak and shows where it is occurring. It’s easy to go back to the vendor to have them fix the problem.
33 © 2005 Wind River
MemScope - Memory Analyzer
What Task?
Bytes Outstanding
Which Function (full callstack)?
# Frees
# Allocs
34 © 2005 Wind River
MemScope – Fragmentation View
Memory map
Display by -Size-Task -Module
Details for block
35 © 2005 Wind River
Finding Solutions with ProfileScope
• Problem: “I need to test how much load my system can handle. How can I measure its response to an external load?”
• Solution: Run ProfileScope and install its output into StethoScope to see how your CPU is used over time.
36 © 2005 Wind River
ProfileScope – Dynamic Execution Profiler
• Find functions/ tasks that are CPU hogs
• See how your program handles varying loads
• View load history with StethoScope
37 © 2005 Wind River
ProfileScope - Execution Profiler
% CPU Total
Task and Function Call Tree
Graphical Usage Meter
% CPU Current
38 © 2005 Wind River
Finding Solutions with StethoScope
• Problem: “My system needs some tuning. How can I adjust the run-time performance without having to repeatedly edit, recompile, reload, etc.?”
• Solution: StethoScope’s writeback feature makes it easy to adjust parameters on the fly in running applications and to immediately see the results of your changes.
39 © 2005 Wind River
StethoScope – Real-Time Data Monitor
•Watch any variable• Global or static variables on-the-fly• Local variables via API
•Dynamic visualization • How noisy is my sensor?• When did the valve close?• How many packets per second am I receiving?
• Display it while it happens• Catch user-defined events• Change variables on the fly• Minimal impact
40 © 2005 Wind River
Tech Update – Scope Tools
CoverageScope
TraceScope
StethoScope
ProfileScope
MemScope
VxW
ork
s 65
3
VxW
ork
s 6.
1
VxW
ork
s 6.
0
MV
L D
istr
ibu
tio
ns
(2.4
.20
and
ab
ove
)
Win
d R
iver
Lin
ux
Dis
trib
uti
on
(2.6
.10
bas
ed)
Lin
ux
2.6.
10
(un
mo
dif
ied
)
Lin
ux
2.6.
8.1
(un
mo
dif
ied
)
Lin
ux
2.4.
26
(un
mo
dif
ied
)
Lin
ux
2.4.
22
(un
mo
dif
ied
)
Lin
ux
2.4.
20
(un
mo
dif
ied
)
Lin
ux
2.4.
18
(un
mo
dif
ied
)
Target OS's compatible with Workbench 2.3Scope Tool
41 © 2005 Wind River
Wind River Workbench Summary
Set of tools for the entire development lifecycle, from hardware bring-up to product test and manufacture
End-to-End Integration
Multiple Contexts
Extensible, Scalable Framework
Based on Eclipse, seamlessly integrates 3rd-party and in-house plug-ins for total customization and scalability
Supports multiple OSes, CPUs, architectures, cores, languages and connection types
© 2005 Wind River
Workbench Diagnostics 1.0
43 © 2005 Wind River
Transforming Service Delivery
Connected DevicesRemote Tools
Proactive AlgorithmsAutomated Analytics
Yesterday Today Tomorrow
• Customer Identifies Problem
• Customer Initiates Service
• Support Eng Dispatched
• Problem Reproduced, Fixed
Reactive
• System Identifies Problems
• Customer Initiates Service
• Remote Diagnosis
• Remote Repair or Dispatch
Proactive
• Online System Monitors Data
• Diagnoses or Fixes Problem
• Automated, Self-managed
• Calls Customer Before Issue
Predictive
Design for Serviceability
44 © 2005 Wind River
What is Unit Testing?
Unit testing is the lowest level of testing performed during software development, where individual units of software are tested in isolation from other parts of a program.
• In C, this is usually an isolated function or sub-routine. In C++, unit testing usually occurs at the class level.
• Unit tests have to be repeated whenever software is modified or used in a new environment.
45 © 2005 Wind River
Identifying a Unit to Test
Workbench Project
C / C++ Source Fileint strlen (char *str){int len = 0;// Do calculation here ......return len;}
Function (or Class)
Unit
46 © 2005 Wind River
Code Coverage Analysis
Case: X = 1, 2 or 3?
Start
Function1
1
2
3Print Error
Log Event
Reset
AdditionalCheck
End
Case: Y = Null? Function 2
Are test cases written to try all possible decisions
and exercise all code branches?
47 © 2005 Wind River
Unit Tester Reporting
Unit Tester provides consistent project-wide PASS/FAIL and
coverage reporting.
Drill-down tree views of project results and support for XML, Word, HTML, and ASCII report generation.
48 © 2005 Wind River
What does Wind River Unit Tester Do?
1. Wizard-driven Test Script Generation• Step-by-step facilities for creating a complete test driver environment.
Automatically generates test harness code and test-case stubs / wrappers.
2. Flexible Test Build / Run• Build and run test projects from inside Workbench
3. Intuitive Test Directives• Quickly develop structured, repeatable tests, yielding clear and unambiguous
results. Allows for easy test-case re-use
4. Code Verification• Checks for expected and unexpected exceptions, standard and user-defined
data types. Performs integrated code-coverage analysis and metrics on executing test-cases.
49 © 2005 Wind River
Unit Tester Integrated Reporting
50 © 2005 Wind River
What Is Workbench Diagnostics?
Wind River Workbench Diagnostics is a root-
cause analysis tool set that enables device
software developers to securely record, isolate,
diagnose, and correct device software defects
51 © 2005 Wind River
Key Features of Workbench Diagnostics
• Sensor Points– Software test points that can be
dynamically placed into a running application
• No pre-instrumentation required in application code
– No modification to application source code required
– Minimally intrusive to application operation
– Tightly integrated tool set
• VxWorks 6.2 Core Image Generation– Comprehensive system state
information at the point of exception
– Tightly integrated tool set
Application
VxWorks
SP 1
SP 2
SP 4
SP 3
SP 5
Application
VxWorks
Core Image
© 2005 Wind River
Sensor Point Run-Time
53 © 2005 Wind River
Sensor Points
• Dynamic instrumentation of functions running on “live” devices or systems
– Instrument applications written in C or C++– Instrument kernel, ISRs, and device drivers– Instrument third-party code
• Software instrumentation modules– Sensor points written in ANSI-C with custom
directives– No application, kernel, or third-party source
code needed– Same scope as any function in which it is
inserted• Access to local and global variables
• Highly efficient, minimal overhead logging framework
• Minimally intrusive
• Small footprint
Application
VxWorks
SP 1
SP 2
SP 4
SP 3
SP 5
Third-Party Run-Time
54 © 2005 Wind River
Sensor Point Architecture
Application
Sensor Point 1
Device Management Agent
Sensor Point Manager
Sensor Point Logging
Log1
Log2
Log3
void foo(int param){int state;state = globallist[param].state;
if (state < 10)return state;
return 0;}
static count = 0;sensorpoint thread{
sensorpoint “foo”{on_line(5):
log($state, count++)}
}
1
2
3• Dynamically instrument
• Enable instrumentation
• Log data
1
2
3
55 © 2005 Wind River
Sensor Point Execution Path
Branch to patch Push the stack
Save registers
Load PatchID
Call sensor point
Restore registers
Pop stack
Original instruction
Branch back
Sensor point
{
….
}
foo( )
56 © 2005 Wind River
Benefits
• Improves development and QA productivity– Enables fact-driven analysis
• Minimizes project delays by reducing time-to-resolution for defects found during development/testing/manufacturing
• Increases overall product reliability
• Allows customers to make go-to-market decisions with confidence
© 2005 Wind River
Core File Tools
58 © 2005 Wind River
VxWorks 6.2+ Core Generation
• Core image is a snapshot of system memory induced:– By kernel
• Fatal System Exception: An exceptions that occurs during kernel initialization, at interrupt level, or while in kernel state
• Kernel Panic: An unrecoverable situation detected by the kernel
• Kernel Task-Level Exception: An exception that occurs in a kernel task (exception not fatal to the system)
– On demand by user application• User applications can call
coreDumpUsrGenerate()
Application
VxWorks
Core Image
59 © 2005 Wind River
Core Image Storage
• Persistent memory– Area of RAM at the top of VxWorks 6.x system
memory specifically reserved for error records – Not cleared after warm reboots (provided a VxWorks
6.x boot loader is used) – Cold reboot always clears the persistent memory
region
• Multiple core image
• On-target compression
• Raw device– Device Access Layer that consists of a set of device
specific routines provided by the user as a separate module
• sysCoreRawDumpDevInit — initialize raw storage device interface
• sysCoreDumpDevErase — erase interface for core dump
• sysCoreDumpDevWrite — write interface for core dump
• sysCoreDumpRawDevRead — read from core dump device
• sysCoreDumpDevFlush — flush the core dump device
Application
VxWorks
Core Image 0
Core Image 1
Core Image 2
60 © 2005 Wind River
Workbench Debugger
• Core file analysis with Workbench and Workbench Diagnostics
– Attach Workbench to a core file• Target Manager
– “Connect” to a core file stored on the host file-system
• Does not require a running target
• Read-only mode for IDE tools– Debugging
• Stack trace points to the function running at the point of exception
• View content of microprocessor register content and view variable values captured when the core was generated
• View data structure content, such as kernel tasks, message queues, semaphores, and other operating system resources captured when the core was generated
– Editor• Points to the line in source code
that raised the exception
Stack Backtrace
© 2005 Wind River
VxWorks 6.x
62 © 2005 Wind River
VxWorks 6.x Key Goals
• Increase customer value by enabling:– Leverage and reuse of existing IP investment– Improved development experience and edit-compile-debug cycle– The ability to create more robust, higher quality end-products
• VxWorks 6.x delivers on these goals by providing:– Easy migration from VxWorks 5.5– An optional, viable memory protection model– Continued focus on VxWorks key attributes– Best in class IDE (Eclipse based) and debugger (Multi-X) based on
Wind River technology -> Wind River Workbench
63 © 2005 Wind River
VxWorks 6.x – Seamless Migration
• Seamless compatibility with VxWorks 5.5:recompile only
– Runs existing VxWorks 5.5 BSPs, drivers and kernel applications
• Easy migration of a user application fromVxWorks 5.5 kernel to an RTP
• Extensive compatibility testing– VxWorks 5.5 test suites– Customer code
VxWorks 5.4• Tornado 2 IDE• Networking Routing• File Systems• Connectivity• Graphics and Java
VxWorks 5.5• Diab Compiler• POSIX pThreads• pSOS-Events
VxWorks 6.0• Memory Protection
• Error Detection • Real-Time Process • IPC Messaging
• Unified MX Debugger• Eclipse-based IDE
VxWorks 5.3.1•wind Kernel / Target Shell•TCP/IP Networking• Distributed Shared Memory
64 © 2005 Wind River
“VxWorks 6” – Key Focus
• Higher Performance, Reliability and Productivity
• Seamless migration from VxWorks 5.5
• State of the art memory protection
– Error detection and reporting
– Real-Time Processes (RTP)
– Inter-Process Communication (IPC)
• Modular runtime and IDE
• Innovative Debugger: a system solution
• Validated by industry-leading companies
65 © 2005 Wind River
Real-Time Operating System
FileSystems
I/OSystem
NetworkStack
DeviceDrivers
Kernel
66 © 2005 Wind River
Mem
ory
Man
agem
ent
Intertask Communications
Interrupt Support
Semaphores
Task
Managem
ent Syste
m C
lock
VxWorks – The wind Microkernel
VxMP
Real-Time Embedded Application
Target Agent
Java & Web
Target
VxVMI
VxWorks 5.X
File System
WindNetNetworking SCSI
Core OS
wind Microkernel
POSIX Library
BSPWind Microkernel
The VxWorks System
67 © 2005 Wind River
Overhead to C ISRInterrupt Exit andRescheduling
HardwareInterrupt
Kernal InterruptLatency
C ISRResume withHighest Prio.Task2,1 µs 1,2 µs
Total Interrupt Response Time = 3,2 µs
Total Task Response Time = 10,0 µs
Optimized Performance
• 16kB Instruction-Cache• 16 kB Data-Cache• No L2 Cache
• MPC8260 ADS Board• 40 MHz PowerQUICII• 16MB SDRAMDRAM
2,2 µs
68 © 2005 Wind River
Technical Goals of VxWorks 6.x
• Reduce problematic error propagation– To help find root causes sooner
• Provide strong memory protection– To contain error propagation paths
• Provide message passing IPC: Wind River Multi Processing Technology– To facilitate the interaction of software separated by memory
protection boundaries
69 © 2005 Wind River
Memory Protection –Error Detection & Reporting
• Real-Time error detecting, reporting & handling
• Faster and cheaper development & testing cycles
• Increased robustness & reliability
• Key features– ISR/Task stack overrun detection– Code corruption detection– Null pointer usage detection– Heap block overrun detection– Heap usage tracking & leakage
detection– Persistent storage of error records
Stack Pages Program Pages Address Space
0x0
Readonly
Rawdata
Start
Stop
Stack
Task 1
Task 2
Task 3
Heap Blocks Heap Blocks
70 © 2005 Wind River
Error Detection(Using the MMU)
Stack
Start
End
Stack Pages
Read-Only Code
RW Data
Program PagesAddress Space
0x0
ISR/Task Stack Overrun Detection
Code Corruption Detection
Null Ptr Usage Detection
71 © 2005 Wind River
Heap Error Detection(MMU not required)
Heap Blocks Heap Blocks
Task1
Task2
Task3
Heap Block Overrun Detection
Heap Usage Tracking & Leakage Detection
72 © 2005 Wind River
• Error records
• Error reporting & handling policy is customizable
• ISR contexts managed - not just tasks
• Persistent memory capability
Error Reporting Features
73 © 2005 Wind River
Technical Goals of VxWorks 6.x
• Reduce problematic error propagation– To help find root causes sooner
• Provide strong memory protection– To contain error propagation paths
• Provide message passing IPC: Wind River Multi Processing Technology– To facilitate the interaction of software separated by memory
protection boundaries
74 © 2005 Wind River
VxWorks 5.x Today
Shared Environment:
– Single address space
– Program code & data
– Kernel objects
– Heap
• Supervisor privilege tasks
• Direct device access
• Simple to understand
• Straightforward to programVxWorks Kernel Environment
Task1
Driver2
Driver1
SemB
MsgQA
App DCode
App CCode
App BCode
App ACode
Heap
man
age
r
Task3
Task2
SemA
VxWorks OS Modules
VxWorks BSP
But this has its challenges too…
• Resource reclamation difficult
• Symbols collide during integration
• App errors are unmanaged and so must be treated as system errors
• Software errors/faults can propagate
75 © 2005 Wind River
Memory Protection –Real-Time Processes (RTPs)
• Protects kernel from applications and applications from each other
• Familiar UnixTM-style process programming model
– Executing from a main() routine
• Easy integration and testing of legacy or third-party code
• MMU or MMU- less • User-level objects (code, heap,
stack, tasks, semaphores, FDs, etc.)
• Global task scheduler• Resource reclamation
VxWorks Kernel Environment
Task1
Driver2
Driver1
SemB
MsgQA
App DCode
App CCode
App BCode
App 1Code
Heap m
anag
er
Task3
Task2
SemA
VxWorks OS Modules
VxWorks BSP
RTP 1
RTP1 Code
Task
Heap
TaskTask ...
RTP 2
RTP2 Code
Task
Heap
TaskTask ...
76 © 2005 Wind River
Embedded Shared Libraries
Kernel
RTP 1
Shared Lib 1Data (RTP 1)
RTP 2
Shared Lib 1Data (RTP 2)
RTP 3
Shared Lib 1Data (RTP 3)
Shared Lib 1 Code
RTP 4
Shared Lib 2Data (RTP 4)
Shared Lib 2Code
RTP 5
RTP 1 StaticCode & Data
RTP 2 StaticCode & Data
RTP 3 StaticCode & Data
RTP 5 StaticCode & Data
RTP 4 StaticCode & Data
Kernel Static Code & Data
77 © 2005 Wind River
Technical Goals of VxWorks 6.x
• Reduce problematic error propagation– To help find root causes sooner
• Provide strong memory protection– To contain error propagation paths
• Provide message passing IPC: Wind River Multi Processing Technology– To facilitate the interaction of software separated by memory protection
boundaries
78 © 2005 Wind River
Memory Protection –Message Channels
• Common IPC mechanism for runtime integration of all applications and middleware
• New message passing model complements existing function call model
• Location transparency provides design flexibility
• Three messaging modes– Unidirectional send (“fire-and-
forget”)– Send with asynchronous reply– Blocking send-receive-reply (RPC
semantics)
• Designed for future multi-core and multi-processor messaging
RTP 1
RTP 2
VxWorks Kernel Environment
Task Task
Fire & Forget
Reply Reply
Async Send Block until Receive
RTP 1
RTP 2
VxWorks Kernel Environment
Task Task
Fire & Forget
Reply Reply
Async Send Block until Receive
79 © 2005 Wind River
IPC: Message Channels
• Client Tasks “connect” to a service to open a message channel
• Messages are sent across the message channel to the message service
• Server tasks process messages in priority or FIFO order and can send back an optional reply
• Clients and servers can be in the same RTP or in different RTPs
• Messaging API is sockets (select() supported)
ServerTask 2
Use
r Spa
ceK
erne
l Spa
ce
ServerTask 1
ClientTask 1
ClientTask 2
ClientTask 3
RTP 1 RTP 2 RTP 3
MessageChannel 3
MessageChannel 1
MessageChannel 2
80 © 2005 Wind River
VxWorks 6.x Summary
• Backward compatibility with VxWorks 5.5
• State-of-the-art memory protection
• Memory error detection and reporting mechanisms
• Standard process-based programming model
• Scalable message passing architecture
© 2005 Wind River
Questions and Answers
© 2005 Wind River
THANK YOU !
83 © 2005 Wind River
Platform for Industrial Devices
VxWorks
BSP Developer's Kit
OPC
COTS Boards, Reference Designs
CANDCOM
Web ServerXML/SOAPSNMP v1,v2,v3CLI
RIP/RIPngFirewallIPsec & IKERadius Client
802.11X/802.1i SSL/TLS USB Host/Client
IPv4/v6 Networking Stack Media Library
DOS FSBridgingNATTIPC
802.11 a,b,g Flash FSEthernetPPP
Design ServicesHW/SW IntegrationSystem Design
Training and Installation Platform CustomizationTraining andProfessional Services
Software Partners
Hardware Partners
Flash/ Fail Safe FS
Java Virtual Machine
Graphics/UI
CAN Protocol Stack
CIFS Server/Client
Fieldbus Solutions
WorkbenchDevelopment Suite ScopeToolsSource AnalyzerBuild
Project Debugger
System ViewerCompilerEditor
Eclipse Framework
RuntimeComponents
84 © 2005 Wind River
Enterprise License Model (Platforms)
free1 UniqueUser freefreefreefree Company
Company # User Site Host-OSTarget*
ArchitectureProject
Target** Processor
ProductionLicenses
License advantages:• annual subscription fee per Wind River Platform seat
• no restrictions on Site / Host-OS / Target-Architecture or Project – SUBCONTRACTORS are easy to integrate
• Enterprise wide NETWORK USER License– Optional NodeLocked or Floating
• support/maintenance included
• service credits included as a bonus (e.g. for public training, onsite consulting, …)
• production licenses aggregated across multiple projects and within 1 platform
• process optimization