Konrad Scheuer

Copy ROM to RAM Coldfire .lcf-File

Discussion created by Konrad Scheuer on Jul 23, 2008
Latest reply on Aug 1, 2008 by Arev
Hello,
 
I'm currently running software from Internal RAM in MCF54455.
Running from FLASH directly is too slow.
 
Can anybody help me to change my lcf-file?
Is there anything else I have to do, that it gets copied from FLASH to RAM and executed from RAM?
 
 
This is my LCF-FIle:

KEEP_SECTION { .vectortable }
MEMORY {
  interrupts  (RX) : ORIGIN = 0x80000000, LENGTH = 0x00000600
  code        (RX) : ORIGIN = 0x80000600, LENGTH = 0x00005154
  data        (RW) : ORIGIN = 0x80005754, LENGTH = 0x000028AC
}
SECTIONS {
  .interrupts :
  {
    ___VECTOR_RAM = .;
    * (.vectortable)
    . = ALIGN (0x4);
  } > interrupts
  .text :
  {
    * (.text)
    . = ALIGN(0x4);
    * (.rodata)
    . = ALIGN(0x4);
    ___ROM_AT = .;
    ___DATA_ROM = .;
  } > code
  .data : AT(___ROM_AT)
  {
    ___PLL_CODE_START =.;
    * (.changePllCode)
    . = ALIGN(0x4);
    ___PLL_CODE_END =.;
    ___PLL_CODE_SIZE = ___PLL_CODE_END - ___PLL_CODE_START;
    ___DATA_RAM = .;
    * (.exception)
    . = ALIGN(0x4);
    __exception_table_start__ = .;
    EXCEPTION
    __exception_table_end__   = .;
    ___sinit__ = .;
      STATICINIT
    ___DATA_START =.;
    * (.data)
    . = ALIGN (0x4);
    ___DATA_END   =.;
    __SDATA_START =.;
    * (.sdata)
    . = ALIGN (0x4);
    __SDATA_END = .;
    __SDA_BASE = .;
    . = ALIGN(0x4);
  } > data
  .bss :
  {
    __START_SBSS = .;
    * (.sbss)
    *(SCOMMON)
    __END_SBSS = .;
    __START_BSS = .;
    * (.bss)
    * (COMMON)
    __END_BSS = .;
    . = ALIGN(0x4);
  } >> data
  # Heap and Stack sizes definition
  ___heap_size = 0x400;
  ___stack_size = 0x400;
  # 32 Kbytes Internal SRAM
  ___RAMBAR = 0x80000000;
  ___RAMBAR_SIZE = 0x00008000;
  ___SP_AFTER_RESET = ___RAMBAR + ___RAMBAR_SIZE - 4;
  ___SP_SIZE = 0x0400;
  ___HEAP_START = .;
  ___HEAP_END = ___HEAP_START + ___heap_size;
  ___SP_END = ___HEAP_END;
  ___SP_INIT = ___SP_END + ___stack_size;
  ___heap_addr = ___HEAP_START;
  ___heap_size = ___HEAP_END -  ___HEAP_START;
  __SP_INIT = ___SP_INIT;
  _romp_at = ___ROM_AT + SIZEOF(.data);
  .romp : AT(_romp_at)
  {
    __S_romp = _romp_at;
    WRITEW(___ROM_AT);
    WRITEW(ADDR(.data));
    WRITEW(SIZEOF(.data));
    WRITEW(0);
    WRITEW(0);
    WRITEW(0);
  }
}
 
Thanks and best regards,
Konrad.

Outcomes