Hi,
Your lcf file might looks like this:
Code:MEMORY{ flash (RX) : ORIGIN = 0x00000000, LENGTH = 0x0003FFBF specSect (RX) : ORIGIN = 0x0003FFC0, LENGTH = 0x00000040 vram (RWX) : ORIGIN = 0x20000000, LENGTH = 0x00000400 sram (RWX) : ORIGIN = 0x20000400, LENGTH = 0x00007C00 ipsbar (RWX) : ORIGIN = 0x40000000, LENGTH = 0x0}SECTIONS { .ipsbar : {} > ipsbar .vectors : { vectors.s (.text) . = ALIGN (0x10); } > flash .text : { *(.text) .= ALIGN(0x10); *(.rodata) .= ALIGN(0x10); ___DATA_ROM = .; __S_romp = .; } >> flash .yourArraySection : { *(.yourArrayZone) } > specSect .data : AT(ADDR(.text)+SIZEOF(.text)) { ___DATA_RAM = .; *(.exception) . = ALIGN(0x10); __exception_table_start__ = .; EXCEPTION __exception_table_end__ = .; ___sinit__ = .; STATICINIT *(.data) . = ALIGN (0x10); ___DATA_END = .; __START_SDATA = .; *(.sdata) . = ALIGN (0x10); __END_SDATA = .; __SDA_BASE = .; . = ALIGN(0x10); } > sram .bss : { . = ALIGN(0x10); __START_SBSS = .; *(.sbss) *(SCOMMON) __END_SBSS = .; . = ALIGN(0x10); __START_BSS = .; *(.bss) *(COMMON) __END_BSS = .; ___BSS_START = __START_SBSS; ___BSS_END = __END_BSS; . = ALIGN(0x10); } >> sram ___FLASH = ADDR(.vectors); ___FLASH_SIZE = 0x0003E000; ___SRAM = ADDR(sram); ___SRAM_SIZE = 0x00007C00; ___VECTOR_RAM = ADDR(vram); ___IPSBAR = ADDR(.ipsbar); ___SP_SIZE = 0x400; ___HEAP_START = .; ___HEAP_END = ___SRAM + ___SRAM_SIZE - ___SP_SIZE; ___SP_END = ___HEAP_END; ___SP_INIT = ___SP_END + ___SP_SIZE; ___heap_addr = ___HEAP_START; ___heap_size = ___HEAP_END - ___HEAP_START ; __SP_INIT = ___SP_INIT; }
and in your C file :
Code:#pragma define_section yourArrayZone ".yourArrayZone" far_absolute R__declspec(yourArrayZone)char WhatYouWant[] = {"Data of your Array"};
Emmanuel