4 uploading a program, 1 the ls command, 2 the program upload process – ElmoMC SimplIQ Software Manual User Manual

Page 86: 6 program execution, Uploading a program -24, 6 program execution -24

Advertising
background image

SimplIQ

Software Manual

Program Development and Execution

MAN-SIMSW (Ver. 1.4)

6-24

5. Use the CC=checksum command to declare the end of loading and to verify the entire

download process.

6.5.4

Uploading a Program

6.5.4.1 The LS Command

The LS command is used to upload a program that resides in the drive flash, for backup or
for further editing. This option is disabled when a program is running. After program
upload, the user can modify it and then return to the compilation step. When uploading
from a non-protected area in the flash, the process is as follows:
LP[1]=start;

LP[2]=payload net length

xxxxxxxxx<ESC>CS;

where:
xxxxxxxxx

denotes the escape-sequenced data payload.

start

denotes the byte address in the user program flash.

CS

denotes the 16-bit checksum for the message.

Failures in executing the LS command may occur if the LS sequence (including <ESC>s)
exceeds 200 characters (internal

SimplIQ

buffer management limit). The LS output will be

terminated with the proper checksum and terminator. The data transmitted in the payload
will be good and meaningful, but not to the defined length.

6.5.4.2 The Program Upload Process

In order to upload a program image from the

SimplIQ

drive, perform the following

procedure:
1. Read the location (loc) and the length (len) of the user code partition from the main

TOC, using the LP[3] and LP[4] commands.

2. Upload your image file using the following sequence:

LP[1]=loc;

LP[2]=100

Use LS to get the next 100 bytes of the payload.

LP[1]=(loc+100);

Use LS to get the next 100 bytes of the payload.
. . . and so on until the end of the image.

6.6

Program Execution

Presently, it is not possible to run more than one task, the virtual machine,

simultaneously. This will, however, be possible in the future.

The following sections describe how to run a program.

Advertising