Script File Creation - Mitsubishi Electric MELIPC MI5000 Series User Manual

Startup
Hide thumbs Also See for MELIPC MI5000 Series:
Table of Contents

Advertisement

Script file creation

A script file (STARTUP.CMD) is a file operated by C language interpreter when this product starts. Content listed in the C
language form is analyzed and executed line by line. (Conditional branches and loops cannot be used. )
By listing the load destination and task start order of the user program in the script file, the user program can be started when
this product starts.
Script description
Describe the script in the following manner.
■Command description
• Only one command can be described per line.
• Up to 10 arguments can be described per command.
■Comment description
• For comments, use "//" at the start of a line.
• There are no character restrictions for comments.
■Execution of functions of "C++"
A symbol in C++ cannot be referenced directly from a script file.
Describe the function declaration section in the source code of "C++" in the following manner.
• extern "C" {function declaration section}
• Commands described in the script file have the same content as listed by the VxWorks startup script. For
details, refer to the manual of VxWorks.
• The following operations can be executed by describing commands in the script file.
Copying of user programs
Formatting of program memory
Ex.
When loading a user program (fileA.out) stored on the user drive (/ROM/DirA) and creating a task 'task A' to execute a
function, 'funcA'.
Storage files
File
Name
Description
STARTUP.CMD
Script file to load user program
fileA.out
User program (function "funcA" embedded) )
Task content
Task name
Priority
taskA
120
Description example of script files
ld(1,0,"/ROM/DirA/fileA.out")
taskSpawn("taskA",120,0,5000,funcA,10,0,0,0,0)
(1) A file 'fileA.out' is loaded from the directory, '/ROM/DirA'.
(2) Function 'funcA' is generated by task named 'task A'. (The function 'funcA' has already been embedded in the fileA.out. )
Up to 10 arguments can be specified per command. Therefore, up to five arguments are passed to the
function entry (example: funcA) specified by taskSpawn of the description example. If more than six
arguments are specified, the task does not start.
Stack size
5,000 bytes
/*(1)*/
/*(2)*/
9 CREATION AND REGISTRATION OF USER PROGRAMS
Storage destination path
/ROM
/ROM/DirA
Function name
Argument specification
funcA
Yes (1st argument: 10)
9.3 User Programs for the VxWorks Part
9
81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melipc mi5122-vw

Table of Contents