Elmo HARSFEN0602, HARmonica software manual Downloading and Uploading a Program, #@Autoexec

Models: HARmonica HARSFEN0602

1 220
Download 220 pages 51.63 Kb
Page 61
Image 61

 

 

 

 

 

 

 

 

 

 

HARSFEN0602ElmoHARmonicaSoftwareManual

PRELIMINARYDRAFT

 

 

 

 

 

 

 

 

 

 

59

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

4. Attempt to jump to local label at ‘reset’ statement

 

 

 

 

 

 

For example,

 

 

 

 

 

 

function foo () ** Function definition

 

 

 

 

 

 

… ** Function body

 

 

 

 

 

 

return ** Function end

 

 

 

 

 

 

 

 

 

 

 

 

goto ##foo

 

 

 

 

 

 

The last expression is illegal: foo is not label.

 

 

75

Illegal nargout

 

The keyword ‘nargout’ is used outside function

 

 

 

 

 

 

For example,

 

 

 

 

 

 

##START ** Label

 

 

 

 

 

 

if nargout > 2

 

 

 

 

 

 

Use the keyword ‘nargout’ outside function

 

 

76

Function without body

 

Attempt to call function which is defined but does not have body

 

 

77

Bad goto statement

 

After the keyword ‘goto’ must be ## or #@ before the name of a label,

 

 

 

 

 

 

otherwise this error appears.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

goto START

 

 

 

 

 

 

Between ‘goto’ and label name ## oe #@ is absent.

 

 

78

Auto routine is local

 

Auto routine is defined as local label.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

function start (int a) ** Function definition

 

 

 

 

 

 

… ** Some code

 

 

 

 

 

 

#@AUTOEXEC

 

 

 

 

 

 

 

 

 

 

 

 

return ** Function end

 

 

 

 

 

 

The auto routine AUTOEXEC is defined inside function as local label.

 

 

79

Command has 'not

 

Program refers to command that has ‘not program’ falg, i.e. it cannot be used

 

 

 

 

program' flag

 

inside user program.

 

 

 

 

 

 

For example,

 

 

 

 

 

 

LS

 

 

 

 

 

 

Attempt to use in a program the LS command that has ‘not program’ flag.

 

 

80

Image file is too long

 

This error occurs if image file length exceeds user code partition size

 

 

81

System function tdif is

 

During evaluation of the wait flow control, the tdif system function is must

 

 

 

 

not supported by the

 

be defined inside the Harmonica, otherwise this error appears.

 

 

 

 

Harmonica

 

 

 

 

 

 

82

Unknown error

 

Unknown error

 

 

6.3Downloading and Uploading a Program

Note: In this step of the program development the communication between Composer and Harmonica must be established.

After successful compilation the CompileCode.img may be downloaded to Harmonica.

Composer’s development environment supports the downloading process. Before each download, Composer automatically clears the memory Flash sector, which is used for saving the user program.

This section describes how the serial flash down/up loads. The flash is interfaced using two commands:

DL and LS.

Both commands use the assisting command LP. LP is a vector integer command.

The user flash area may be cleared by the command CP.

The user flash area may be checksum-verified, and program ready flag set, by the CC command.

Page 61
Image 61
Elmo HARSFEN0602, HARmonica software manual Downloading and Uploading a Program, #@Autoexec