EMERSON KJ4001X1-CK1質(zhì)量接線板
mageName無符號字符20用戶定義的ImageRamAddress無符號整數(shù)1 RAM地址ImageOffset無符號整數(shù)從標頭開始到條目的偏移ImageFlags無符號整數(shù)參考第110頁的圖像標志ImageVersion無符號整數(shù)用戶定義的保留無符號整數(shù)8保留用于擴展校驗和算法校驗和算法是每個單詞的簡單無符號單詞相加(4字節(jié))位置。圖像長度必須是4字節(jié)的倍數(shù)(字對齊)。標頭中校驗和位置的內(nèi)容不是校驗和計算的一部分。計算假定位置為零。該算法使用以下代碼實現(xiàn):無符號整數(shù)校驗和(無符號int*startPtr,/*起始地址*/無符號int endPtr/*結(jié)束地址圖像標志標頭的圖像標志定義了控制圖像執(zhí)行方式的各種位選項。COPY_TO_RAM如果設(shè)置,則此標志表示在傳遞控制之前,圖像將復(fù)制到標頭中指定的地址處的RAM。如果未設(shè)置,則圖像將在閃存中執(zhí)行實例中,控件將以標頭中指定的圖像偏移量從圖像底部傳遞。
mageName unsigned character 20 User defined
ImageRamAddress unsigned integer 1 RAM address
ImageOffset unsigned integer 1 Offset from header start to entry
ImageFlags unsigned integer 1 Refer to Image Flags on page 110
ImageVersion unsigned integer 1 User defined
Reserved unsigned integer 8 Reserved for expansion 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:
Unsigned int checksum(
Unsigned int *startPtr,/* starting address */
Unsigned int endPtr/* ending address Image Flags
The image flags of the header define various bit options that control how the image will be
executed.
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.