Elmo HARmonica Setting and clearing break points, Continuation of the program, Single step

Models: HARmonica HARSFEN0602

1 220
Download 220 pages 51.63 Kb
Page 68
Image 68

ElmoHARSFEN0602HARmonicaSoftwareManual PRELIMINARYDRAFT

When any error occurs inside specified VAC machine, it returns with error to the main loop that manages the running of the entire set of VAC machines. This manager stops all other VAC machines with the error ABORTED_BY_OTHER_THREAD. In order to define in which VAC machine the error occurred, find the error code different from ABORTED_BY_OTHER_THREAD.

The DB##PS command returns information an analysis of which allows various debug functionality described below.

6.5.5Setting and clearing break points

Dama supports up to 6 breakpoints simultaneously. A user can set 5 breakpoints and one for inner use of the IDE.

Breakpoints can be set anytime, anywhere, regardless if the program is running or not. The syntax is

DB##BP=xxx

Sets a breakpoint at program counter xxx. DB##BP=xxx,n

Sets a breakpoint at line program counter, activated only after n repetitions. DB##BC=xxx

Removes a breakpoint at program counter DB##BC

Removes all the breakpoints.

xxxis unsigned long – 4 bytes, n is signed short – 2 bytes.

6.5.6Continuation of the program

When the program reaches the break point, it stops running of the entire set of existing virtual machines. To cause the program to continue the running, the command DB##GO is used.

Syntax:

DB##GO and DB##GO[N]

where N is a handle of a specified VAC machine.

It continues the program running from the current program counter.

The DB##GO command continue running of all the VAC machines.

The DB##GO[N] command continue running of a specified VAC machine.

How to define a handle of a specified VAC machine, which was halted at the break point?

It must be found out the existing VAC machine whose program counter is equal to the program counter of the break point. First the DB##MS command must be sent to define which VAC machines exist. After that for all existing VAC machines we have to send the DB##PS command to get the program counter for comparison with the break point program counter. It may occur the situation when several VAC machines have the same program counter that is equal to the break point program counter. Every of them may be chosen as a specified.

6.5.7Single step

When a program reaches a break point, a user may desire to continue running in the single step mode.

6.5.7.1Run to Cursor

66

Page 68
Image 68
Elmo HARmonica, HARSFEN0602 Setting and clearing break points, Continuation of the program, Single step, Run to Cursor