DSC

Target Family : MC56F84789

Listing: Memory Segments
MEMORY {
## Program Memory space 
.p_interruptsboot_ROM(RX) : ORIGIN = 0x000000, LENGTH = 0x000004 # reserved for boot location 
.p_interrupts_ROM(RX)  : ORIGIN = 0x000004,  LENGTH = 0x000200 # reserved for interrupt vectoring
# .p_reserved_IFR     (RX)  : ORIGIN = 0x000200, LENGTH = 0x000008 # 16 bytes reserved for IFR
.p_flash_ROM          (RX)  : ORIGIN = 0x000208, LENGTH = 0x01FDF8 # primary location for code to be run - to 0x1ffff
Listing: Input calc_crc.crc File
CRC
SEED = 0xFFFF
FILL = 0xFF
FROM 0x000208 TO 0x000210;
DEST = 0x3000            //Address as DATA BYTE
Listing: Input Bytes from .elf File
*** PROGRAM SEGMENT 2 ***
0x00000208:  7B 82 4B 86 0A 00 7B 82 48 87 00 40 1F D8 7C F8  '{.K...{.H..@..|.'
0x00000210:  BC
Listing: Program Header Before Post Linking
*** PROGRAM HEADER TABLE ***
no type offset     vaddr      paddr      filesz     memsz      flags     align

0  LOAD 0x000001B4 0x00000000 0x00000000 0x00000008 0x00000008 0x00000005  1
1  LOAD 0x000001BC 0x00000004 0x00000004 0x000001B4 0x000001B4 0x00000005  1
2  LOAD 0x00000370 0x00000208 0x00000208 0x000039BC 0x000039BC 0x00000005  4
3  LOAD 0x00000000 0x00068000 0x00068000 0x00000000 0x00008000 0x00000005  1
4  LOAD 0x00003D2C 0x00001EE6 0x00002000 0x00000290 0x00000290 0x00000005  4
5  LOAD 0x00000000 0x00000000 0x00000000 0x00000000 0x00004000 0x00000006  1
6  LOAD 0x00003FC0 0x00002000 0x00002000 0x00000290 0x00000DB0 0x00000006  8
7  LOAD 0x00000000 0x0000C000 0x0000C000 0x00000000 0x00004000 0x00000006  1
8  LOAD 0x00000000 0x0000E000 0x0000E000 0x00000000 0x00004000 0x00000006  1
9  LOAD 0x00000000 0x0001E000 0x0001E000 0x00000000 0x00000800 0x00000006  1
10 LOAD 0x00000000 0x0001E400 0x0001E400 0x00000000 0x00003800 0x00000006  1
11 LOAD 0x00000000 0x00FFFF00 0x00FFFF00 0x00000000 0x00000200 0x00000006  1
Listing: Output in '.elf.crc.elf' file
                               ** PROGRAM SEGMENT 12 ***
0x00001800:  56 D0    //
Address as "DATA WORD"
--calculated checksum value -2 bytes
Note: DEST (destination_address) in the input *.crc file for DSC should be a BYTE ADDRESS value. In the above example, ' DEST = 0x3000' in the ' calc_crc.crc' file.

Since the DSC disassembler output lists the segments addresses as WORD ADDRESS , the checksum value segment in the final disassembly should be checked using the corresponding WORD ADDRESS .

For DSC, the byte address is converted to a word address by dividing the byte address by two. For example, the checksum data value generated for the above example is located at 0x1800 'WORD ADDRESS'.

Listing: Program Header after post linking
                             *** PROGRAM HEADER TABLE ***
no type offset      vaddr       paddr       filesz      memsz       flags      align

0  LOAD 0x000001D4  0x00000000  0x00000000  0x00000008  0x00000008  0x00000005  1
1  LOAD 0x000001DC  0x00000004  0x00000004  0x000001B4  0x000001B4  0x00000005  1
2  LOAD 0x00000390  0x00000208  0x00000208  0x000039BC  0x000039BC  0x00000005  4
3  LOAD 0x00000000  0x00068000  0x00068000  0x00000000  0x00008000  0x00000005  1
4  LOAD 0x00003D4C  0x00001EE6  0x00002000  0x00000290  0x00000290  0x00000005  4
5  LOAD 0x00000000  0x00000000  0x00000000  0x00000000  0x00004000  0x00000006  1
6  LOAD 0x00003FE0  0x00002000  0x00002000  0x00000290  0x00000DB0  0x00000006  8
7  LOAD 0x00000000  0x0000C000  0x0000C000  0x00000000  0x00004000  0x00000006  1
8  LOAD 0x00000000  0x0000E000  0x0000E000  0x00000000  0x00004000  0x00000006  1
9  LOAD 0x00000000  0x0001E000  0x0001E000  0x00000000  0x00000800  0x00000006  1
10 LOAD 0x00000000  0x0001E400  0x0001E400  0x00000000  0x00003800  0x00000006  1
11 LOAD 0x00000000  0x00FFFF00  0x00FFFF00  0x00000000  0x00000200  0x00000006  1
12 LOAD 0x0001BC7C  0x00001800  0x00001800  0x00000002  0x00000002  0x00000004  0

New segment added by the post linker or crcgen utility.