Download RadiSys ARTIC960 Programmer`s Reference

Transcript
Application Loader (ricload) Utility
Example—Load a Process and Pass the Contents of a File
This example loads the process \sub dir\proc FILE001.rel to logical card 0. The process is
not started. The contents of the file parms.txt are passed as parameters argv[].
ricload 0x0 "\sub dir\proc FILE001.rel" –f parms.txt –L
The following shows the contents of the file parms.txt and the parameters passed to the
process in argv[].
Contents of File parms.txt
this is the FIRST line of parameters
this is the second line
parameter 3
Parameters argv[]
argv[0]
argv[1]
argv[2]
argv[3]
[proc FILE001.rel]
[this is the FIRST line of parameters]
[ this is the second line]
[parameter 3]
Example—Load and Start a Process Using a Configuration File
The following shows the contents of the file setup.cfg and the resulting action. The entire
load operation is done quietly (no messages displayed).
ricload –C setup.cfg –Q
Contents of File setup.cfg
****
* Setup configuration file
*
0 ric_kern.rel –F ric_kern.cfg
0 ric_base.rel
*
0 ric_mcio.rel –F ric_mcio.cfg
0 ric_scb.rel -F ric_scb.cfg
****
Resulting Action
1. The file ric_kern.rel is loaded to logical card 0 with ric_kern.cfg passed as its
parameters. Then the process is started.
2. The file ric_base.rel is loaded to logical card 0 and started.
3. The file ric_mcio.rel is loaded to logical card 0, with ric_mcio.cfg passed as its
parameters. Then the process is started.
4. The file ric_scb.rel is loaded to logical card 0 with ric_scb.cfg passed as its
parameters. Then the process is started.
Chapter 6: System Unit Utilities
201