Highlights from
Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

image thumbnail

Embedded Coder Support Package for Green Hills MULTI IDE (R2012b)

by

 

Embedded Coder integration for creating models that run directly in Green Hills MULTI IDE

run(id,runopt,funcname,timeout)
function run(id,runopt,funcname,timeout)
%RUN initiate execution of processor.
%  RUN(id,OPTION,TIMEOUT) initiates execution of the processor from the 
%  present program counter (PC) location. After starting execution of the 
%  processor, the OPTION parameter determines when control is returned to 
%  the user.
%
%  OPTION parameter defines the action of the RUN method.
%    'run' (default) - executes a run and waits to confirm that the 
%                      processor is running, then immediately returns.
%    'runtohalt'     - executes a run, and then waits until the processor 
%                      has halted.  The halt can be caused by a breakpoint,
%                      by direct interaction with MULTI, or by a normal 
%                      program exit.
%    'tohalt'        - This option will wait for the processor to complete 
%                      execution to halt. Unlike 'run' and 'runtohalt',
%                      'tohalt' does not directly modify the action of the 
%                      processor, but simply waits for the processor state 
%                      to change. The halt can be caused by a breakpoint,
%                      by direct interaction with MULTI, or by a normal 
%                      program exit.
%    'main'          - This option resets the program and executes a run 
%                      until the start of function 'main'.
%    'tofunc'        - This option must be followed by an extra parameter 
%                      FUNCNAME, the name of the function to run to: 
%                        RUN(id,'tofunc',FUNCNAME)
%                        RUN(id,'tofunc',FUNCNAME,TIMEOUT)
%                      This executes a run from the present PC location 
%                      until the start of function FUNCNAME is reached. If 
%                      FUNCNAME is not along the program's normal execution
%                      path, FUNCNAME is not reached and the method times
%                      out.
%
%  The TIMEOUT parameter defines how long to wait (in seconds) for 
%  completion of specified action.  If this period is exceeded, the routine
%  returns immediately with a timeout error.  In general, the 'run' and 
%  'runtohalt' options cause the processor to initiate execution, but the 
%  timeout value  gave insufficient time to verify the completion of the 
%  action.
%
%  RUN(id,OPTION) Same as above, except the timeout value defaults to the 
%  value specified by the id object. Use GET(id,'timeout') to examine the 
%  default supplied by the object.
%
%  RUN(id) Same as above, except the OPTION defaults to the 'run'.  This 
%  causes an immediate return of control after the processor is running.
%
%  See also GHSMULTI/HALT, GHSMULTI/RESTART, GHSMULTI/ISRUNNING.

% Copyright 2012 The MathWorks, Inc.

Contact us