Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "IOC Application Development/Debugging Beijing EPICS Seminar Tuesday, 8/23 2001 J.Odagiri."— Presentation transcript:

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

2 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

3 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.

4 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.

5 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.

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

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

8 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

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

10 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.

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

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

13 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 )

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

15 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

16 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.

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

18 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.


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

Similar presentations


Ads by Google