IOC Application Development/Debugging Beijing EPICS Seminar Tuesday, 8/23 2001 J.Odagiri.

Slides:



Advertisements
Similar presentations
1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
Advertisements

Copyright 2013 – Noah Mendelsohn Compiling C Programs Noah Mendelsohn Tufts University Web:
Chapter 3 Process Description and Control
Linking & Loading CS-502 Operating Systems
Linux Boot Loaders. ♦ Overview A boot loader is a small program that exists in the system and loads the operating system into the system’s memory at system.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
16 - Nov. 2000EPICS Workshop Oak Ridge1 Epics to TINE translator Matthias Clausen, DESY Hamburg Phil Duval, DESY Hamburg Zoltan Kakucs, DESY Hamburg.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Unix kernel Kernel refers to the core part of an operating system Historically, UNIX kernels are monolithic Newer versions of UNIX allow part of the kernel.
CSSE Operating Systems
Process Processes are executing or executable instances of programs. Processes in a modern OS haveOS –management information –resources –unique process.
OS Spring’04 Introduction Operating Systems Spring 2004.
Shell and Flashing Images Commands and upgrades. RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and.
The Programming Interface. Main Points Creating and managing processes – fork, exec, wait Performing I/O – open, read, write, close Communicating between.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
Input/Output Controller (IOC) Overview Andrew Johnson Computer Scientist, AES Controls Group.
®® Microsoft Windows 7 for Power Users Tutorial 8 Troubleshooting Windows 7.
1 Logging in to a UNIX System init ( Process ID 1 created by the kernel at bootstrap ) spawns getty for every terminal device invokes our login shell terminal.
Ethernet Driver Changes for NET+OS V5.1. Design Changes Resides in bsp\devices\ethernet directory. Source code broken into more C files. Native driver.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Memory: Relocation.
CPS3340 COMPUTER ARCHITECTURE Fall Semester, /29/2013 Lecture 13: Compile-Link-Load Instructor: Ashraf Yaseen DEPARTMENT OF MATH & COMPUTER SCIENCE.
Processes and Process Control 1. Processes and Process Control 2. Definitions of a Process 3. Systems state vs. Process State 4. A 2 State Process Model.
DEBUGGING EPICS APPLICATIONS Bob Dalesio and Rozelle Wright February 10, 1997.
IOC Application Development/Debugging Shanghai EPICS Seminar Tuesday, 8/29 J.Odagiri.
Processes CS 6560: Operating Systems Design. 2 Von Neuman Model Both text (program) and data reside in memory Execution cycle Fetch instruction Decode.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
UNIX Unit 1- Architecture of Unix - By Pratima.
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Concurrency, Processes, and System calls Benefits and issues of concurrency The basic concept of process System calls.
Interfacing Device Drivers with the Kernel
Nachos Overview Lecturer: Hao-Hua Chu TA: Chun-Po Wang (Artoo) Date: 2008/09/18 Material Provided by Yuan-Hao Chang, Yung-Feng Lu.
1 1999/Ph 514: Lab #3A : SNL Lab#3B : Development Environment EPICS Lab #3a State Notation Language.
Genesis: From Raw Hardware to Processes Andy Wang Operating Systems COP 4610 / CGS 5765.
1 A Seven-State Process Model. 2 CPU Switch From Process to Process Silberschatz, Galvin, and Gagne  1999.
Implementation of Embedded OS Lab3 Porting μC/OS-II.
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
An overview of C Language. Overview of C C language is a general purpose and structured programming language developed by 'Dennis Ritchie' at AT &T's.
Copyright © Curt Hill More on Operating Systems Continuation of Introduction.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
LECTURE 3 Translation. PROCESS MEMORY There are four general areas of memory in a process. The text area contains the instructions for the application.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
1 COMP 3500 Introduction to Operating Systems Project 4 – Processes and System Calls Overview Dr. Xiao Qin Auburn University
Threads, SMP, and Microkernels Chapter 4. Processes and Threads Operating systems use processes for two purposes - Resource allocation and resource ownership.
RealTimeSystems Lab Jong-Koo, Lim
Week Seven Agenda Link of the week Review week six lab assignment This week’s expected outcomes Next lab assignment Break-out problems Upcoming deadlines.
Embedded Real-Time Systems
1 CS 192 Lecture 4 Winter 2003 December 8-9, 2003 Dr. Shafay Shamail.
Introduction to Operating Systems Concepts
IOC Application Development / Debugging
CS 3214 Computer Systems Lecture 9 Godmar Back.
Process concept.
Interrupts and signals
Chapter 2: Operating-System Structures
System Programming and administration
Linking & Loading.
CS-3013 Operating Systems C-term 2008
More examples How many processes does this piece of code create?
Genesis: From Raw Hardware to Processes
CSE 451: Operating Systems Spring 2012 Module 6 Review of Processes, Kernel Threads, User-Level Threads Ed Lazowska 570 Allen.
Memory Management Tasks
Linking & Loading CS-502 Operating Systems
Tutorial: The Programming Interface
Operating Systems Lecture 3.
Lecture 6: Multiprogramming and Context Switching
10/6: Lecture Topics C Brainteaser More on Procedure Call
Linking & Loading CS-502 Operating Systems
Lecture 10 review Booting sequence in Brief
Presentation transcript:

IOC Application Development/Debugging Beijing EPICS Seminar Tuesday, 8/ J.Odagiri

Before Getting Started… 如果有付公不明白的地方、請別客気。 This lecture includes… What VxWorks is How you boot EPICS We have 90 minuets… 15 minuets for general information 75 minuets for working on exercise

VxWorks is Not Unix It’s true that VxWorks is a Unix like OS, but … Tasks share a single address space. There can be only one global variable, or one function, for a specific symbol name in the whole system. Any tasks can see any global symbols in the system.

VxWorks is Not Unix ( continued ) Tasks always run in the Kernel Mode Applications call kernel functions through a usual function call instead of a system trap. Tasks are scheduled by their fixed priority. VxWorks is a real-time OS, not a TSS system.

Comments on VxWorks Seamless unification between VxWorks itself and your applications The line between VxWorks and applications is just the matter of “Who wrote the code?” When you are developing applications under VxWorks, it’s more like you are developing the kernel itself under Unix.

Good Points and Downsides Good Points High performance Lots of flexibility Downsides No protection, not at all Hard to debug

The First 3 Points to Get System Symbol Table Linking Loader Target Shell

System Symbol Table and Linking Loader System Symbol Table Holds addresses of all external functions and variables, which are included in the VxWorks kernel and object modules you have loaded Linking Loader Resolves external references in object modules upon the loading by referring to the System Symbol Table

Loading and Linking Modules -> ld < myModule.o System Symbol Table void myCommand ( void ) { … } myCommand : 0x00fe87d0 myModule.o Registration of New Symbol

System Symbol Table and Target Shell Target Shell Looks up the command ( the function ) you typed in from the System Symbol Table If found, VxWorks shell invokes the function in its own task context, without creating a new task.

How VxWorks Shell Works -> myCommand Shell Task System Symbol Table void myCommand ( void ) { … } Look up myCommand : 0x00fe87d0 Call Return

Creating Tasks taskSpawn( char *name, int priority, int options, int stackSize, FUNCPTR *entryPt, int arg1, … , int arg10 );

Startup Scripts VxWorks shell allows you to invoke commands with a script file. # an example of startup scripts cd “/users/yangcn/startup/st.cmd” pwd ld < testModule.o moduleShow myInitRoutine( “tHello”, 50, 0 )

Loading iocCore and Others iocCore Channel Access Database Access ... seq Run-time sequencer BeijingAppLib Record Support Device Support Driver Support

Loading Run-time database dbLoadDatabase(“testAppLib.dbd”) Loads database definitions into memory Record-related definitions Device-related definitions Driver-related definitions dbLoadRecords(“test.db”) Loads database record instances into memory

iocInit() – the Entry Point iocInit() initializes iocCore. base/src/db/iocInit.c If you take a look at it, you will get the picture on how the EPICS world comes up. When iocInit() returns, iocCore has been up and running. Sevral tasks are spawned in the initialization sequence.

EPICS Tasks Channel Access related tasks Scan tasks General purpose callback tasks Watchdog task Error handling task …

Working on Lessons Please follow the instructions in the manual : Lesson_01 ~ Lesson_10. They explains how to work on the exercises. You have printed source codes of the modules for each exercise. If you have time left, please move on to : Lesson_extra_01 ~ Lesson_extra_06.