Transcript
Page 1: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003

1

Stanford Linear Accelerator Center

RTEMS Experiences at SSRL (continued)

• Introduction• Building/Booting

• Available EPICS Support• Wish List

Page 2: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 2

Introduction

• Currently at RTEMS 4.6.0pre2• We no longer build for VxWorks• Building RTEMS is complicated• …but using is easy• OSI layer makes porting from

VxWorks almost trivial

Page 3: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 3

Building RTEMS at SSRL1) Tools and libraries2) Unbundled RTEMS applications3) Create symbol list used in system image

link4) System image used by all IOC

• Not all libraries included• Include some unbundled apps like Cexp• Don’t use routines (rtems_init and

rtems_netconfig) delivered in base/src/RTEMS

Building is complex - Till’s README files helpful

Page 4: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 4

RTEMS Unbundled Apps• C Expression Interpreter

(Cexp) (our “shell”)• Telnet• NFS• Monitor

Page 5: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 5

RTEMS Boot• System image loaded• Initialization task

• Also loads symbol file• Runs common non-EPICS startup script to

load other unbundled apps, set TZ, start tasks, etc

• Then runs EPICS app startup script identified in NVRAM which loads app image and initializes EPICS

• Left at Cexp prompt – at this point, usage similar in concept to VxWorks

Page 6: RTEMS Experiences at SSRL (continued)

CEXP QuickStart

For CEXP details, read $RTEMS_APPS/cexp/README.

Things to remember:

* arrow and backspace keys work (up/down-arrow for history since reboot) * all commands need parenthesis even if the fcn has no arguments

Popular CEXP commands:

* Symbol (Function) Lookup:

Cexp> lkup("<part-of-fcn-name>") example: Cexp> lkup("drv") ===== In module 'bin/multiUse.obj' (0x01d5ac68) =====: 0x019c47ac[ 12]: VOID void drvIpac 0x019c4930[ 12]: VOID void drvTip810

USER VARIABLES: 0x00000000 (0)

* Changing Directory and Invoking a Script:

Cexp> chdir("/TFTP/BOOTP_HOST/<directory>/") *** Remember the final "/" *** Cexp> cexp("<script-file>") example: Cexp> chdir("/TFTP/BOOTP_HOST/epics/saa/iocBoot/iocspear6/") Cexp> cexp("st.cmd")

* Rebooting

Cexp> rtemsReboot() Note: If connected via terminal server, you can reboot by ctrl-] to telnet and typing "send break": Cexp> telnet> send break

Page 7: RTEMS Experiences at SSRL (continued)

CEXP QuickStart (continued)

* System Monitor

Cexp> rtemsMonitor() monitor> help *** lists monitor queries *** monitor> task *** task list *** monitor> cpuUsageDump monitor> cpuUsageReset monitor> exit

* Network Monitor

Cexp> rtems_bsdnet_show_if_stats() Cexp> rtems_bsdnet_show_ip_stats() Cexp> rtems_bsdnet_show_tcp_stats() Cexp> rtems_bsdnet_show_udp_stats() Cexp> rtems_bsdnet_show_mbuf_stats() Cexp> rtems_bsdnet_show_icmp_stats() Cexp> rtems_bsdnet_show_inet_routes()

* Favorite EPICS Commands

Cexp> dbl() *** DB record list *** Cexp> dbcar() *** CA link list *** Cexp> dbior() *** Drv/Dev report *** Cexp> casr() *** CAS report *** Cexp> dbpr("<record-name>",5) *** Full DB record dump *** Cexp> scanppl() *** Scan DB record lists *** Cexp> iocsh() *** Enter IOC shell ***

Page 8: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 8

EPICS/RTEMS Support Available at SSRL

• IPAC – CANBus, Acromag, Hytec• BitBus Controller• GPIB – LAN and Termios• Echotek Digital Receiver• AB EtherIP• Generic Transient Recorder• Bumpless Reboot Restore• Sequencer• Soon – General Standards PMC

Page 9: RTEMS Experiences at SSRL (continued)

Stephanie Allison EPICS Meeting June, 2003 9

Wish List• osiDevLib – layer on top of VME/VXI (return

errors for soft IOCs)• devStats – CPU health status monitor like

[VX,vx,Vx,vX]Stats• epicsOSversion – get OS class and version as

string• osiTS – periodic NTP sync and timestamp

update like soft time slave IOC in VxWorks’s drvTS

• Routine to show boot parameters• BTW, include files under base/src/vxWorks/src

should be installed in base/include/os/vxWorks


Recommended