/*###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__ = 0x00200000; /*-Memory Regions-*/ /*= Code region(s) ===================================== */ /* -- Program region in internal Flash ----------------- */ define symbol __ICFEDIT_Program_In_FLASHTCM_start__ = 0x00200000; // FLASH-ROM 1 Mbyte define symbol __ICFEDIT_Program_In_FLASHTCM_end__ = 0x002FFFFF; define symbol __ICFEDIT_region_ITCMRAM_start__ = 0x00000000; // ITCM-RAM 16 KbytesITCM (64-bit) define symbol __ICFEDIT_region_ITCMRAM_end__ = 0x00003FFF; define symbol __ICFEDIT_region_DTCMRAM_start__ = 0x20000000; // DTCM-RAM 64 KbytesDTCM (64-bit) define symbol __ICFEDIT_region_DTCMRAM_end__ = 0x20003FFF; // 0x2000FFFF - 0x8000 - 0x4000 (- HEAP1 - STACK) define symbol __ICFEDIT_region_SRAM1_start__ = 0x20010000; // SRAM1 240 KbytesAHB (32-bit) define symbol __ICFEDIT_region_SRAM1_end__ = 0x20043FFF; // 0x2004BFFF - 0x8000 (- HEAP2) define symbol __ICFEDIT_region_SRAM2_start__ = 0x2004C000; // SRAM2 16 KBytesAHB (32-bit) define symbol __ICFEDIT_region_SRAM2_end__ = 0x2004FFFF; define symbol __ICFEDIT_region_QSPI_start__ = 0x90000000; // QSPI 16 Mbyte define symbol __ICFEDIT_region_QSPI_end__ = 0x90FFFFFF; //______________________________________________________________________________ // Перенесем таблицу прерываний в DTCMRAM [1] define symbol __ICFEDIT_DTCMRAM_intvec_start__ = 0x20000000; //______________________________________________________________________________ /* RAM -- STACK region --------------------------------- */ /* The Stack of the main application will be located RAM-DTCM (0x4000 = 16k) All internal variables of called functions will be located in this region. */ define symbol __ICFEDIT_region_STACK_RAM_DTCM_start__ = 0x20004000; define symbol __ICFEDIT_region_STACK_RAM_DTCM_end__ = 0x20007FFF; /*-HEAP_5 Regions-*/ /* RAM-DTCM -- HEAP1 region ---------------------------------- */ /* The Heap of the main application will be located RAM-DTCM (0x8000 = 32k) All dynamic allocations data got by malloc, realloc, calloc... will be located in this region.*/ define symbol __ICFEDIT_region_HEAP_RAM_DTCM_start__ = 0x20008000; // 0x2000FFFF - 0x8000 + 1 define symbol __ICFEDIT_region_HEAP_RAM_DTCM_end__ = 0x2000FFFF; /* SRAM1 -- HEAP2 region ---------------------------------- */ /* The Heap of the main application will be located SRAM1 (0x8000 = 32k) All dynamic allocations data got by malloc, realloc, calloc... will be located in this region.*/ define symbol __ICFEDIT_region_HEAP_SRAM1_start__ = 0x20044000; // 0x2004BFFF - 0x8000 + 1 define symbol __ICFEDIT_region_HEAP_SRAM1_end__ = 0x2004BFFF; //______________________________________________________________________________ /*-Sizes-*/ define symbol __ICFEDIT_size_cstack__ = 0x4000; define symbol __ICFEDIT_size_heap__ = 0x200; // FreeRTOS здесь не причем. Без обычной кучи нельзя. Пусть она будет, но маленькой define symbol __ICFEDIT_size_heap1__ = 0x8000; // FreeRTOS has nothing to do with it. You can't do without a heap. Let her be, but small define symbol __ICFEDIT_size_heap2__ = 0x8000; /**** End of ICF editor section. ###ICF###*/ define memory mem with size = 4G; define region ROM_region = mem:[from __ICFEDIT_Program_In_FLASHTCM_start__ to __ICFEDIT_Program_In_FLASHTCM_end__]; //define region RAM_ITCM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; //define region RAM_DTCM_region = mem:[from __ICFEDIT_region_DTCMRAM_start__ to __ICFEDIT_region_DTCMRAM_end__]; //define region RAM_SRAM1_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__]; //define region RAM_SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__]; // Здесь можно раскидать данные по этим отдельным регионам. Но и так венигрет, да и сколько нибудь серьезных массивов пока нет // Возможно позже отдадим SRAM2 по LwIp. Пока просто объединим. // Here you can scatter data for these separate regions. But so far there are no serious arrays. // Maybe later we will give SRAM2 for LwIp. Let's just unite for now. define region RAM_region = mem:[from __ICFEDIT_region_SRAM1_start__ to __ICFEDIT_region_SRAM1_end__] | mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__]; define region ITCMRAM_region = mem:[from __ICFEDIT_region_ITCMRAM_start__ to __ICFEDIT_region_ITCMRAM_end__]; define region DTCMRAM_region = mem:[from __ICFEDIT_region_DTCMRAM_start__ to __ICFEDIT_region_DTCMRAM_end__]; define region RAM_SRAM2_region = mem:[from __ICFEDIT_region_SRAM2_start__ to __ICFEDIT_region_SRAM2_end__]; define region RAM_DTCM_STACK_region = mem:[from __ICFEDIT_region_STACK_RAM_DTCM_start__ to __ICFEDIT_region_STACK_RAM_DTCM_end__]; define region RAM_DTCM_HEAP_region = mem:[from __ICFEDIT_region_HEAP_RAM_DTCM_start__ to __ICFEDIT_region_HEAP_RAM_DTCM_end__]; define region RAM_SRAM1_HEAP_region = mem:[from __ICFEDIT_region_HEAP_SRAM1_start__ to __ICFEDIT_region_HEAP_SRAM1_end__]; define region EXTRN_QSPI_region = mem:[from __ICFEDIT_region_QSPI_start__ to __ICFEDIT_region_QSPI_end__]; define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { }; define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { }; define block HEAP1 with alignment = 8, size = __ICFEDIT_size_heap1__ { }; define block HEAP2 with alignment = 8, size = __ICFEDIT_size_heap2__ { }; //keep { block HEAP1 }; //keep { block HEAP2 }; // Блоки CSTACK и HEAP линкер как-то само-собой встраивает place in // А вот HEAP1 и HEAP2 херит без директивы #pragma section = "HEAP1" // Их можно сохранить директивой keep, но place in с ними без создания секций не прокатывает // CSTACK and HEAP the linker embeds "place in" // Linker kills HEAP1 and HEAP2 without directive #pragma section = "HEAP1" // They can be saved with the keep directive, but "place in" does not work with them without creating sections. //______________________________________________________________________________ // Перенесем таблицу прерываний в DTCMRAM [2] // Move the interrupt table to DTCMRAM [2] //initialize by copy { readwrite }; initialize by copy { readwrite, section .intvec_DTCM, section .DTCM, ro object stm32f7xx_it.o }; do not initialize { section .noinit }; //______________________________________________________________________________ // Перенесем таблицу прерываний в DTCMRAM [3] // Move the interrupt table to DTCMRAM [3] place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place at address mem:__ICFEDIT_DTCMRAM_intvec_start__ { section .intvec_DTCM }; place in ITCMRAM_region { section .ITCM }; place in DTCMRAM_region { section .DTCM }; place in ROM_region { readonly }; place in ITCMRAM_region { }; place in RAM_region { readwrite, block HEAP }; place in RAM_DTCM_STACK_region { block CSTACK }; place in RAM_DTCM_HEAP_region { block HEAP1 }; place in RAM_SRAM1_HEAP_region { block HEAP2 }; //place in EXTRN_QSPI_region { section .textqspi }; /* DTCM-RAM 0x20000000 0x2000FFFF 64 KbytesDTCM (64-bit) ITCM-RAM 0x00000000 0x00003FFF 16 KbytesITCM (64-bit) SRAM1 0x20010000 0x2004BFFF 240 KbytesAHB (32-bit) SRAM2 0x2004C000 0x2004FFFF 16 KBytesAHB (32-bit) */