
if( isdefinedsymbol(ST_BTL) ) {
define symbol __ICFEDIT_intvec_start__ = 0x08003000;
define symbol __ICFEDIT_region_ROM_start__   = 0x08003000;
} else {
define symbol __ICFEDIT_intvec_start__ = 0x08000000;
define symbol __ICFEDIT_region_ROM_start__   = 0x08000000;
}

/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_end__     = 0x0801FFFF;
define symbol __ICFEDIT_region_FIB_start__   = 0x08040000;
define symbol __ICFEDIT_region_FIB_end__     = 0x080407FF;
define symbol __ICFEDIT_region_RAM_start__   = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__     = 0x20001FFF;
/*-Sizes-*/
define symbol __ICFEDIT_size_cstack__   = 0x500;



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 block CSTACK    with alignment = 8, size = __ICFEDIT_size_cstack__   { };
define block FLASH_IMAGE with fixed order { readonly section .intvec, readonly } ;

initialize by copy { readwrite };
do not initialize  { section .noinit,
                     section FAT,
                     section NVM };

place at address mem:__ICFEDIT_region_FIB_start__ { section FAT };
place in ROM_region { block FLASH_IMAGE };

place at end of ROM_region { section NVM };
place in RAM_region   { readwrite,
                        block CSTACK };

