Elmo HARmonica Network Hardware User Manual


 
HARSFEN0602
The user code partition can be read by the LS command.
The data in this partition is:
A TOC (Table of Contents)
A "Compilation done" flag
A virtual machine code segment
A text backup segment. The text backup includes virtual code counter references.
A function symbol table
A variable symbol table
An automatic function table
Each partition starts at a page (264 bytes) boundary.
16.5.1 The TOC
The table of contents is located at the starting address of user code partition.
Each of the items below is relative to the start of the user code partition.
The length of the TOC is one flash page (264 byte).
The TOC includes:
Item Address Size Comment
Compilation done 0 unsigned
long
Points to the fixed address 264
Virtual machine code
segment start address
4 unsigned
long
Points to the fixed address 2*264.
The length of this segment is less
then 63k.
Virtual machine code
segment length
8 unsigned
long
Text backup segment
start address
12 unsigned
long
Text backup segment
length
16 unsigned
long
Function symbol table
start address
20 unsigned
long
Function symbol table
length
24 unsigned
long
Variable symbol table
start address
28 unsigned
long
Variable symbol table
length
32 unsigned
long
Automatic function table
start address
36 unsigned
long
Automatic function table
length
40 unsigned
long
Last used address 44 unsigned
long
The checksum for the user code
partition is checked from Address 0
in the serial flash to that address.
Must be in the range
[2*264,100000]
All unused TOC items are set to zero.
16.5.2 The Compilation Done Flag
The Compilation Done Flag tells the Harmonica if a program is ready to run. This means that a program
image has been successfully downloaded to the Harmonica and its checksum verified, and also that the
symbol tables has been copied to the local data flash of the Harmonica.