например
Код
void Data_StartNextTransfer( void ) @ ".itcmram"
{..................}
{..................}
При компиляции ошибок нет. Мало того, если посмотреть асемблерный листинг, то и там в заголовке указания на секции совпадают
Однако линкер может выдать такое сообщение
Код
Warning[Lp005]: placement includes a mix of sections with content (example "ro code section .itcmram in USBH.o") and sections without content D:\WORK\C\ARM\PA-20 v4 new\EWARM\stm32f745xx_flash_sram.icf 54
(example "rw code section .itcmram in DataTask.o symbols: [Data_StartNextTransfer]")
Warning[Lp006]: placement includes a mix of writable sections (example "rw code section .itcmram in DataTask.o symbols: [Data_StartNextTransfer]") D:\WORK\C\ARM\PA-20 v4 new\EWARM\stm32f745xx_flash_sram.icf 54
and non-writable sections (example "ro code section .itcmram in USBH.o")
(example "rw code section .itcmram in DataTask.o symbols: [Data_StartNextTransfer]")
Warning[Lp006]: placement includes a mix of writable sections (example "rw code section .itcmram in DataTask.o symbols: [Data_StartNextTransfer]") D:\WORK\C\ARM\PA-20 v4 new\EWARM\stm32f745xx_flash_sram.icf 54
and non-writable sections (example "ro code section .itcmram in USBH.o")
а в мэп файле хорошо видно, что те функции, которые он нормально кладет в ITCMRAM, помечены как RW. Те, что в том же исходнике, но оставленные в ПЗУ - CODE. Но те, что он отказывается класть в ITCMRAM помечает как RO. И хотя сообщение - предупреждение, реально прошивка не работает. По всяким атрибутам функций закономерности не заметил. Подскажите, что в функции может быть не так и как это исправить, если я ее хочу запускать из ITCMRAM?
Код
/*###ICF### Section handled by ICF editor, don't touch! ****/
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
define symbol __ICFEDIT_region_DTCMRAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_DTCMRAM_end__ = 0x2000FFFF;
define symbol __ICFEDIT_region_SRAM1_start__ = 0x20010000;
define symbol __ICFEDIT_region_SRAM1_end__ = 0x2004BFFF;
define symbol __ICFEDIT_region_SRAM2_start__ = 0x2004C000;
define symbol __ICFEDIT_region_SRAM2_end__ = 0x2004FFFF;
define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x00003FFF;
define symbol __ICFEDIT_region_SRAM_start__ = 0x60000000;
define symbol __ICFEDIT_region_SRAM_end__ = 0x601FFFFF;
/*-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 DTCMRAM_region = mem:[from __ICFEDIT_region_DTCMRAM_start__ to __ICFEDIT_region_DTCMRAM_end__];
define region SRAM1_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__];
define region SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__];
define region SRAM_region = mem:[from __ICFEDIT_region_SRAM_start__ to __ICFEDIT_region_SRAM_end__];
define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
define block SRAM with alignment = 8 { section .sram };
define block SRAM2 with alignment = 8 { section .sram2 };
define block DTCMRAM with alignment = 8 { section .dtcmram };
define block ITCMRAM with alignment = 8 { section .itcmram };
initialize by copy { readwrite, section .itcmram };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in SRAM1_region { readwrite,
block HEAP,
block CSTACK};
place in SRAM_region { block SRAM };
place in ITCMRAM_region {block ITCMRAM };
place in DTCMRAM_region {block DTCMRAM };
place in SRAM2_region {block SRAM2 };
/*-Editor annotation file-*/
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\cortex_v1_0.xml" */
/*-Specials-*/
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_end__ = 0x080FFFFF;
define symbol __ICFEDIT_region_DTCMRAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_DTCMRAM_end__ = 0x2000FFFF;
define symbol __ICFEDIT_region_SRAM1_start__ = 0x20010000;
define symbol __ICFEDIT_region_SRAM1_end__ = 0x2004BFFF;
define symbol __ICFEDIT_region_SRAM2_start__ = 0x2004C000;
define symbol __ICFEDIT_region_SRAM2_end__ = 0x2004FFFF;
define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000;
define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x00003FFF;
define symbol __ICFEDIT_region_SRAM_start__ = 0x60000000;
define symbol __ICFEDIT_region_SRAM_end__ = 0x601FFFFF;
/*-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 DTCMRAM_region = mem:[from __ICFEDIT_region_DTCMRAM_start__ to __ICFEDIT_region_DTCMRAM_end__];
define region SRAM1_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__];
define region SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__];
define region SRAM_region = mem:[from __ICFEDIT_region_SRAM_start__ to __ICFEDIT_region_SRAM_end__];
define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__];
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
define block SRAM with alignment = 8 { section .sram };
define block SRAM2 with alignment = 8 { section .sram2 };
define block DTCMRAM with alignment = 8 { section .dtcmram };
define block ITCMRAM with alignment = 8 { section .itcmram };
initialize by copy { readwrite, section .itcmram };
do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly };
place in SRAM1_region { readwrite,
block HEAP,
block CSTACK};
place in SRAM_region { block SRAM };
place in ITCMRAM_region {block ITCMRAM };
place in DTCMRAM_region {block DTCMRAM };
place in SRAM2_region {block SRAM2 };