mbed-os/targets/TARGET_ublox/TARGET_HI2110/device/TOOLCHAIN_IAR/hi2110.icf

65 lines
3.0 KiB
Plaintext

/* Sizes and locations */
define symbol __start_flash__ = 0x00000000;
define symbol __size_flash__ = 0x20000;
define symbol __start_ram__ = 0x01000000;
define symbol __size_ram__ = 0x5000;
define symbol __size_flash_vtable__ = 192;
define symbol __size_ram_vtable__ = 128; /* Reserve space for dynamic vectors mapped to RAM (see cmsis_nvic.c) */
define symbol __size_ipc__ = 256;
if (!isdefinedsymbol(MBED_BOOT_STACK_SIZE)) {
define symbol MBED_BOOT_STACK_SIZE = 0x400;
}
if (isdefinedsymbol(__stack_size__)) {
define symbol __size_cstack__ = __stack_size__;
} else {
define symbol __size_cstack__ = MBED_BOOT_STACK_SIZE;
}
if (isdefinedsymbol(__heap_size__)) {
define symbol __size_heap__ = __heap_size__;
} else {
define symbol __size_heap__ = (1024 * 8);
}
/* Memory regions */
define symbol __region_INTVEC_FLASH_start__ = __start_flash__;
define symbol __region_INTVEC_FLASH_end__ = __start_flash__ + __size_flash_vtable__ - 1;
define symbol __region_TEXT_start__ = __start_flash__ + __size_flash_vtable__; /* Leave room for flash vector table at start */
define symbol __region_TEXT_end__ = __start_flash__ + __size_flash__ - 1;
define symbol __region_INTVEC_RAM_start__ = __start_ram__;
define symbol __region_DATA_start__ = __start_ram__ + __size_ram_vtable__; /* Leave room for RAM vector table at start */
define symbol __region_DATA_end__ = __start_ram__ + __size_ram__ - __size_cstack__ - __size_ipc__ - 1; /* Leave room for IPC and stack at end */
define symbol __region_CSTACK_start__ = __start_ram__ + __size_ram__ - __size_cstack__ - __size_ipc__;
define symbol __region_CSTACK_end__ = __start_ram__ + __size_ram__ - __size_ipc__ - 1;
define symbol __region_IPC_start__ = __start_ram__ + __size_ram__ - __size_ipc__;
define symbol __region_IPC_end__ = __start_ram__ + __size_ram__ - 1;
define memory mem with size = 4G;
define region FLASH_region = mem:[from __region_INTVEC_FLASH_start__ to __region_INTVEC_FLASH_end__] | mem:[from __region_TEXT_start__ to __region_TEXT_end__];
define region DATA_region = mem:[from __region_DATA_start__ to __region_DATA_end__];
define region CSTACK_region = mem:[from __region_CSTACK_start__ to __region_CSTACK_end__];
define region IPC_region = mem:[from __region_IPC_start__ to __region_IPC_end__];
define block CSTACK with alignment = 8, size = __size_cstack__ { };
define block HEAP with alignment = 8, size = __size_heap__ { };
define block RW { readwrite };
define block ZI { zi };
/* Place sections */
initialize by copy { readwrite };
do not initialize { section .noinit };
do not initialize { section .ipc };
place at address mem:__region_INTVEC_FLASH_start__ { readonly section .intvec };
place in FLASH_region { readonly };
place in DATA_region { block RW };
place in DATA_region { block ZI };
place in DATA_region { last block HEAP };
place in CSTACK_region { block CSTACK };
place in IPC_region { section .ipc };