Emerson MVME7100 사용자 설명서
![Emerson](https://files.manualsbrain.com/attachments/1ef3aaad462e024fde6cecf537a4c6c781334d44/common/fit/150/50/6dab323528eefa0342baa74a10c15551c3b956250cf9d62f2117dcdf42a7/brand_logo.jpeg)
Checksum Algorithm
MOTLoad Firmware
MVME7100 Single Board Computer Installation and Use (6806800E08A)
95
6.7.1
Checksum Algorithm
The checksum algorithm is a simple unsigned word add of each word (4 byte) location in the
image. The image must be a multiple of 4 bytes in length (word-aligned). The content of the
checksum location in the header is not part of the checksum calculation. The calculation
assumes the location to be zero. The algorithm is implemented using the following code:
image. The image must be a multiple of 4 bytes in length (word-aligned). The content of the
checksum location in the header is not part of the checksum calculation. The calculation
assumes the location to be zero. The algorithm is implemented using the following code:
Unsigned int checksum(
Unsigned int *startPtr,/* starting address */
Unsigned int endPtr/* ending address */
) {
unsigned int checksum=0;
while (startPtr < endPtr) {
checksum += *startPtr;
startPtr++;
}
return(checksum);
}
6.7.2
Image Flags
The image flags of the header define various bit options that control how the image will be
executed.
executed.
z
COPY_TO_RAM
If set, this flag indicates that the image is to be copied to RAM at the address specified in
the header before control is passed. If not set, the image will be executed in flash. In both
instances, control will be passed at the image offset specified in the header from the base
of the image.
If set, this flag indicates that the image is to be copied to RAM at the address specified in
the header before control is passed. If not set, the image will be executed in flash. In both
instances, control will be passed at the image offset specified in the header from the base
of the image.
z
IMAGE_MCG
If set, this flag defines the image as being an Alternate MOTLoad, as opposed to USER,
image. This bit should not be set by developers of alternate boot images.
If set, this flag defines the image as being an Alternate MOTLoad, as opposed to USER,
image. This bit should not be set by developers of alternate boot images.
ImageOffset
unsigned integer
1
Offset from header start to entry
ImageFlags
unsigned integer
1
Refer to
Image Flags
on page 95
ImageVersion
unsigned integer
1
User defined
Reserved
unsigned integer
8
Reserved for expansion
Name
Type
Size
Notes
Table 6-2 MOTLoad Image Flags
Name
Value
Interpretation
COPY_TO_RAM
0x00000001
Copy image to RAM at ImageRamAddress before execution
IMAGE_MCG
0x00000002
Alternate MOTLoad image
IMAGE_POST
0x00000004
POST image
DONT_AUTO_RUN
0x00000008
Image not to be executed