DEBUGGING EPICS APPLICATIONS Bob Dalesio and Rozelle Wright February 10, 1997.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Jump to first page Setup Ethernet & PPP client on Laptop computer Presented by: Xuewu Cai Jianfang Wang.
Lectures on File Management
1 1999/Ph 514: Working With an IOC EPICS Working with an IOC Marty Kraimer APS.
1 1999/Ph 514: Channel Access Concepts EPICS Channel Access Concepts Bob Dalesio LANL.
DHCP -Ameeta and Haripriya -cmsc 691x. DHCP ► Dynamic Host Configuration Protocol ► It controls vital networking parameters of hosts with the help of.
1 Dynamic DNS. 2 Module - Dynamic DNS ♦ Overview The domain names and IP addresses of hosts and the devices may change for many reasons. This module focuses.
4.3 Boot Loader Copyright © OneAccess Networks - All rights reserved -
IOC Application Development/Debugging Beijing EPICS Seminar Tuesday, 8/ J.Odagiri.
SNS Integrated Control System Running IOC Core on Windows and Linux Dave Thompson Wim Blokland Ernest Williams.
Debugging What can debuggers do? Run programs Make the program stops on specified places or on specified conditions Give information about current variables’
Linux IOC Operations at NSTX - An Overview P. Sichta 28Mar2005.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.1 Troubleshooting Working at a Small-to-Medium Business or ISP – Chapter 9.
1 CCNA 2 v3.1 Module 9. 2 Basic Router Troubleshooting CCNA 2, Module 9.
Chapter 7 Interupts DMA Channels Context Switching.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
WXES2106 Network Technology Semester /2005 Chapter 7 TCP/IP Suite Error and Control Messages CCNA2: Module 8, 9.
Guide To UNIX Using Linux Third Edition
V4 – Executive Summary 1.Provide online add/delete of I/O to support continuous operation. 2.Provide redundant control of remote I/O to support improved.
CCNA 2 v3.1 Module 2.
CCENT Review. Put the following descriptions in order from Layer 7 to Layer 1 and give the name of each layer.
Shell and Flashing Images Commands and upgrades. RS-232 Driver chip – ST3232C Driver chip is ST3232C Provides electrical interface between UART port and.
Embedded Systems Principle of Debugger. Reference Materials kl.de/avr_projects/arm_projects/#winarmhttp://
EPICS IOC Diagnostics Tools Jeff Hill. Overview 4 EPICS built-in diagnostic tools 4 solutions to specific problems.
Starting the switch Configuring the Switch
FTP (File Transfer Protocol) & Telnet
Chap 5 Startup and Setup Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
FINAL MPX DELIVERABLE Due when you schedule your interview and presentation.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Cisco S2 C4 Router Components. Configure a Router You can configure a router from –from the console terminal (a computer connected to the router –through.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 9 Basic Router Troubleshooting.
Specview 32 Release 2.5 Enhancements
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 3: Operating-System Structures System Components Operating System Services.
2002 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
Interrupts, Buses Chapter 6.2.5, Introduction to Interrupts Interrupts are a mechanism by which other modules (e.g. I/O) may interrupt normal.
1 Version 3.0 Module 6 Switch Configuration. 2 Version 3.0 Switches Contain: –CPU –RAM –Operating System.
3.14 Work List IOC Core Channel Access. Changes to IOC Core Online add/delete of record instances Tool to support online add/delete OS independent layer.
 Wind River Systems, Inc Appendix - E Shared Memory Network.
CSNB374: Microprocessor Systems Chapter 5: Procedures and Interrupts.
IOC Application Development/Debugging Shanghai EPICS Seminar Tuesday, 8/29 J.Odagiri.
EPICS Release 3.15 Bob Dalesio May 19, Features for 3.15 Support for large arrays - done for rsrv in 3.14 Channel access priorities - planned to.
Status of the STT Motherboard Testing Evgeny Popkov Boston University 5 Jan
1 1999/Ph 514: Flow of Control EPICS Flow of Control Marty Kraimer APS.
Linux Operations and Administration
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 Router Initialization steps.
Sem 2v2 Chapter 5 Router Startup and Setup. A router initializes by loading the bootstrap, the operating system, and a configuration file. If the router.
Ladebug Kernel Debugging Tutorial Bob Lidral. Introduction Kinds of kernel debugging How to use Ladebug for kernel debugging Not how to debug a kernel.
1 Channel Access Concepts – IHEP EPICS Training – K.F – Aug EPICS Channel Access Concepts Kazuro Furukawa, KEK (Bob Dalesio, LANL)
1 EPICS Flow of Control: EPICS Workshop at IHEP, Beijing, August 2001 EPICS Flow of Control Marty Kraimer APS.
Commands 3/1/ Boot PROM Fundamentals All Sun systems have resident boot PROM firmware Provides basic hardware testing and initialization prior.
Control System Overview J. Frederick Bartlett Fermilab June 1,1999.
Embedded Real-Time Systems Introduction to embedded software development Lecturer Department University.
Monitoring Dynamic IOC Installations Using the alive Record Dohn Arms Beamline Controls & Data Acquisition Group Advanced Photon Source.
SNS Integrated Control System ORACLE –JERI DB Generation April 27, 2004 Coles Sibley Jeff Patton.
2. OPERATING SYSTEM 2.1 Operating System Function
CCNA 2 v3.1 Module 9 Basic Router Troubleshooting
Router Startup and Setup
Chapter 2: System Structures
Chapter 5: Switch Configuration
Introduction to Operating System (OS)
Introduction to the Junos Operating System
Chapter 5: Switch Configuration
AT91RM9200 Boot strategies This training module describes the boot strategies on the AT91RM9200 including the internal Boot ROM and the U-Boot program.
Chapter 2: Operating-System Structures
Operating Systems Lecture 3.
Router Startup and Setup
Lecture9: Embedded Network Operating System: cisco IOS
Channel Access Concepts
Chapter 2: Operating-System Structures
Presentation transcript:

DEBUGGING EPICS APPLICATIONS Bob Dalesio and Rozelle Wright February 10, 1997

Outline References Booting a VME Crate - vxWorks and EPICS Debugging Hardware Failures Debugging Database Problems Debugging Client Connections to the Database Developing and Debugging new code under vxWorks

DEBUGGING REFERENCES EPICS Documentation on WWW at APS Applications Developer's Guide Particularly -- Chapter IOC Test Facilities Record Reference Manual VxWorks Programmer's Manual Particularly Chapter 2 -- Getting Started Chapter Debugging Chapter The Shell

Boot Parameters mv167> bootChange '.' = clear field; '-' = go to previous field; ^D = quit boot device : ei processor number : 0 host name : leia file name : ~wright/vx/v51.epics/config/mv167/vxWorks inet on ethernet (e) : :ffffff00 inet on backplane (b): host inet (h) : gateway inet (g) : user (u) : vx ftp password (pw) (blank = use rsh): xxxxxxx flags (f) : 0x29 target name (tn) : vxmv156733a startup script (s) : ~wright/camac_demo/camac/startup.mv167 other (o) :

Booting vxWorks Boot Parameters Used for Booting vxWorks boot device : ei host name : leia file name : ~wright/vx/v51.epics/config/mv167/vxWorks host inet (h) : user (u) : vx ftp password (pw) (blank = use rsh): xxxxxxx Successful Boot of vxWorks - from Serial Port Attaching network interface ei0... done. Attaching network interface lo0... done. Loading Start at 0x1000 Attaching network interface ei0... done. Attaching network interface lo0... done. Loading symbol table from leia:~wright/vx/v51.epics/config/mv167/vxWorks...done

Booting vxWorks Unsuccessful Boot of vxWorks - from Serial Port Attaching network interface ei0... done. :ei0 is correct ethernet driver Attaching network interface lo0... done. Loading... Error loading file: errno = 0xd. Can't load boot file!! Possible Reasons Verify boot parameters are OK Network is down, a bad cable connection or has an improper termination vxWorks does not exist at the specified filename in the boot parameters vx account or password not setup on the specified host file protections on the specified filename are not correct

Booting EPICS After Successful Boot of vxWorks - from Serial Port –runs this: startup script (s) : ~wright/camac_demo/camac/startup.mv167 Successful Boot done Executing startup script ~wright/camac_demo/camac/startup.mv167 (will execute each command in the startup script)

Booting EPICS Verify Successful Boot by telnet'ing to IOC and typing: i NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY *timeStamp _gts_select 2b PEND a2a0 2b *callback _callbackTas 2bd2cc 40 PEND a2a0 2bd *scanEvent 30da PEND a2a c 0 0 *gpibLink 2c99b2 2bb5e4 47 PEND a2a0 2bb *scanPeriod 30d676 29ba44 53 DELAY b9f8 0 4 *CA client _camsgtask 2ad PEND a2a0 2ad71c 0 0 *CA repeater_ca_repeater 38439c 181 PEND a2a *CA TCP _req_server 2b5a PEND a2a0 2b598c 0 0 *CA event _event_task 27f7c0 181 PEND a2a0 27f *CA event _event_task 33ce PEND a2a0 33ce1c 0 0 *CA UDP _cast_server 2b44b0 182 PEND a2a0 2b *CA online _rsrv_online 2b2f DELAY b2e *taskwd 31a368 2c DELAY c444c value = 0 = 0x0 * - EPICS tasks

Booting EPICS Unsuccessful Boot of EPICS telnet to IOC successfully verifies that vxWorks booted observe the execution of the startup script rename the startup file reboot the IOC telnet into the IOC invoke the startup script manually using the '<' redirection character for example: < ~wright/camac_demo/camac/startup.mv167 Common Errors missing record or device support recSup.ascii or devSup.ascii lists support that is not in the object file being loaded undefined symbol you added code that references external symbols that were not loaded first

Hardware Interfaces in the IOC Detecting Errors dbior - command that calls the report function of every driver *Note: most drivers have reports - some do not! dbpr "database record name" - report all of the fields of a database record if the SEVR field is Invalid and the STAT field is either READ/WRITE then there is a failure returning from the device/driver support Common Source of Errors address jumpers on the card not correct - check manual and module_types.c for interrupt devices: the backplane jumpers need to be correct from CPU to this module the interrupt vector needs to be unique - use the veclist diagnostic to list all vectors verify that the device and driver support were loaded (see booting EPICS)

Database Logic in the IOC Detecting Errors dbpr "database record name" - report all of the fields of a database record if the SEVR field is Invalid and the STAT field is UDF the record was never processed Use the database debugger to step through the database execution see chapter 2 of the Application Developer's Guide Set the TPRO field of a database record - this will cause all records processed as part of this chain to print their name to stdout Use the dbt command to determine the execution time of a particular database chain Common Source of Errors address fields are incorrect forward links do not pass data scan mechanisms are wrong passive records are processed too frequently (improper use of Process Passive)

Connections to the Database Detecting Errors Standard channel access clients give an indication when they are not able to connect Applications must do the same: sequences, tcl/TK Use cau or probe to check out the channel access connection Common Source of Errors The process variable name is incorrect - use dbgrep to verify the name is in the IOC Broadcast address on the IOC and workstation must match bootChange to see the boot parameters where the IOC sets the net mask ifconfig -a to see the netmask on the Unix workstation The IOC is using 100% of the CPU - telnet to the IOC and use the spy command Verify client connection - telnet to the IOC and use the client_stat command

Plots, Sliders, Bars Not Working Common Source of Errors HOPR and LOPR are not set in the database or the display list The value is outside the specified display range - either HOPR/LOPR or in display Value is outside the control range in the database - see DRVH and DRVL fields

Debugging New Code in the IOC New Subroutines / tasks in vxWorks Verify it loads successfully - linking is done at load time vxWorks treats all global symbols as commands available from the shell: telnet to the ioc set a breakpoint on your new routine spawn the routine using the sp command step through the routine and verify that it works before integrating it use global symbols to peek/poke or turn on/off debug statements New drivers in vxWorks Use the m command to peek/poke memory locations to verify new hardware Put in good diagnostic routines that dump all available registers (this is for dbior later) Put in test codes to exercise, calibrate or reinitial the hardware