Проблема такая: создал свой icf файл, в настройках линекера на вкладке checksum установил:
start address:0x8000000
end address: 0x8000BFB
CRC16, 2 bytes, align 1.
Собираю проект и получаю ошибку ielftool error: the checksum symbol was not found in string table.
Просматриваю .map файл и вижу, что сектор .checksum отсутствует. Понять не могу, почему?
Ниже привожу содержание .icf файла. Подскажите, что не так делаю или не доделал?
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000 ;
define symbol __ICFEDIT_region_ROM_end__ = 0x08000BFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x2000FFFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__ = 0x400;
define symbol __ICFEDIT_size_heap__ = 0x200;
/**** End of ICF editor section. ###ICF###*/
define memory mem with size = 4G;
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
define symbol __region_USB_PKG_RAM_start__ = 0x40006000;
define symbol __region_USB_PKG_RAM_end__ = 0x400063FF;
define region USB_PKG_RAM_region = mem:[from __region_USB_PKG_RAM_start__ to __region_USB_PKG_RAM_end__];
define region Flash_region = mem:[from 0x08000C00 to 0x08000FFF];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
initialize by copy { readwrite };
do not initialize { section .noinit };
do not initialize { section USB_PACKET_MEMORY };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at end of ROM_region { readonly section .checksum };
place in USB_PKG_RAM_region
{ readwrite data section USB_PACKET_MEMORY };
place in ROM_region { readonly };
place in RAM_region { readwrite,
block CSTACK, block HEAP };
place in Flash_region { readonly section FLASH };
Разобрался. Все непонятки по своей глупости. Т.к. переменная __checksum нигде в программе не использовалась, то под нее место и не резервировалось.