The checksum calculation can be made over several ranges. If several ranges are used, then please note:
See example project example: Two ranges two checksums 650.zip.
The 1st range is 0x1006000 to 0x102FFFB and the 2nd range 0x1030000 to 0x103EFFB.
Three changes are required:
--place_holder __checksum1,2,.checksum1,1
--place_holder __checksum2,2,.checksum2,1
--define_symbol __checksum_begin1=0x1006000
--define_symbol __checksum_end1=0x102FFFB
--define_symbol __checksum_begin2=0x1030000
--define_symbol __checksum_end2=0x103EFFB
ielftool --fill 0xFF;0x1006000-0x102FFFB --fill 0xFF;0x1030000-0x103EFFB
--checksum __checksum1:2,crc16,0x0;0x1006000-0x102FFFB
--checksum __checksum2:2,crc16,0x0;0x1030000-0x103EFFB
--verbose "$TARGET_PATH$" "$TARGET_PATH$"
define symbol __ICFEDIT_region_ROM_start__ = 0x1006000;
define symbol __ICFEDIT_region_ROM_end__ = 0x102FFFF;
define symbol __ICFEDIT_region_PFM_start__ = 0x1030000;
define symbol __ICFEDIT_region_PFM_end__ = 0x103EFFF;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__
to __ICFEDIT_region_ROM_end__];
define region PFM_region = mem:[from __ICFEDIT_region_PFM_start__
to __ICFEDIT_region_PFM_end__];
place at end of ROM_region { readonly section .checksum1 };
place at end of PFM_region { readonly section .checksum2 };
See example project example: Two ranges one checksum 650.zip.
The 1st range is 0x1006000 to 0x102FFFB and the 2nd range is 0x1030000 to 0x103EFFF.
Three changes are required:
--place_holder __checksum,2,.checksum,1
--define_symbol __checksum_begin1=0x1006000
--define_symbol __checksum_end1=0x102FFFB
--define_symbol __checksum_begin2=0x1030000
--define_symbol __checksum_end2=0x103EFFF
ielftool --fill 0xFF;0x1006000-0x102FFFB --fill 0xFF;0x1030000-0x103EFFF
--checksum __checksum:2,crc16,0x0;0x1006000-0x102FFFB;0x1030000-0x103EFFF
--verbose "$TARGET_PATH$" "$TARGET_PATH$"
define symbol __ICFEDIT_region_ROM_start__ = 0x1006000;
define symbol __ICFEDIT_region_ROM_end__ = 0x102FFFF;
define symbol __ICFEDIT_region_PFM_start__ = 0x1030000;
define symbol __ICFEDIT_region_PFM_end__ = 0x103EFFF;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__
to __ICFEDIT_region_ROM_end__];
define region PFM_region = mem:[from __ICFEDIT_region_PFM_start__
to __ICFEDIT_region_PFM_end__];
place at end of ROM_region { readonly section .checksum };
All product names are trademarks or registered trademarks of their respective owners.
© IAR Systems 1995-2021 - All rights reserved.
We use cookies on this website to provide you with a better experience. You need to accept cookies to continue using this site. Cookies