Advertisement
sreejith2904

lpc2148_gcc.ld

Mar 12th, 2011
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 3.28 KB | None | 0 0
  1. /*-----  Stack(s) size / heap size are defined here  ---------*/
  2.  
  3.    heap_size      = 1024;
  4.    stack_fiq_size = 16;
  5.    stack_irq_size = 512;
  6.    stack_app_size = 1024;
  7.  
  8. /*------------------------------------------------------------------------*/
  9.              /* LPC2146 */
  10. MEMORY
  11. {
  12.    FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x00080000
  13.    RAM (rw)   : ORIGIN = 0x40000000, LENGTH = 0x00008000
  14. }
  15.  
  16.  
  17. SECTIONS
  18. {
  19.  
  20.    .text :
  21.    {
  22.      *(.reset)                  /* Startup code */
  23.      *(.text)                  /* remaining code */
  24.      *(.rodata)                 /* read-only data (constants) */
  25.      *(.rodata*)
  26.      *(.glue_7)
  27.      *(.glue_7t)
  28.    } > FLASH
  29.  
  30.    . = ALIGN(4);
  31.    _etext = . ;
  32.    PROVIDE (etext = .);
  33.  
  34.    /* .data section which is used for initialized data */
  35.    .data : AT (_etext)
  36.    {
  37.      _data = .;
  38.      *(.data)
  39.    } > RAM
  40.  
  41.    . = ALIGN(4);
  42.    _edata = . ;
  43.    PROVIDE (edata = .);
  44.  
  45.    /* .bss section which is used for uninitialized data */
  46.    .bss (NOLOAD) :
  47.    {
  48.      __bss_start = . ;
  49.      __bss_start__ = . ;
  50.      *(.bss)
  51.      *(COMMON)
  52.      . = ALIGN(4);
  53.    } > RAM
  54.  
  55.    . = ALIGN(4);
  56.    __bss_end__ = . ;
  57.    PROVIDE (__bss_end = .);
  58.  
  59.    .heap ALIGN(__bss_end__ , 4) (NOLOAD) :
  60.    {
  61.      __heap_start__ = .;
  62.      *(.heap)
  63.    }
  64.    __heap_end__ = __heap_start__ + heap_size;
  65.  
  66.    .stack_bottom  ALIGN(__heap_end__ , 4) (NOLOAD) :
  67.    {
  68.       __stack__bottom__ = .;
  69.       *(.stack)
  70.    }
  71.    __stack_bottom_end__ = __stack__bottom__  + stack_fiq_size ;
  72.  
  73.    .stack_fiq_bottom  ALIGN(__stack_bottom_end__ , 4) (NOLOAD) :
  74.    {
  75.       __stack__fiq_bottom__ = .;
  76.       *(.stack)
  77.    }
  78.    __stack_fiq_bottom_end__ = __stack__fiq_bottom__  + stack_irq_size ;
  79.  
  80.    .stack_irq_bottom  ALIGN(__stack_fiq_bottom_end__ , 4) (NOLOAD) :
  81.    {
  82.       __stack_irq_bottom__ = .;
  83.       *(.stack)
  84.    }
  85.    __stack_irq_bottom_end__ = __stack_irq_bottom__  + stack_app_size ;
  86.  
  87.   _end = . ;
  88.   PROVIDE (end = .);
  89.  
  90.   /* Stabs debugging sections.  */
  91.   .stab          0 : { *(.stab) }
  92.   .stabstr       0 : { *(.stabstr) }
  93.   .stab.excl     0 : { *(.stab.excl) }
  94.   .stab.exclstr  0 : { *(.stab.exclstr) }
  95.   .stab.index    0 : { *(.stab.index) }
  96.   .stab.indexstr 0 : { *(.stab.indexstr) }
  97.   .comment       0 : { *(.comment) }
  98.   /* DWARF debug sections.
  99.      Symbols in the DWARF debugging sections are relative to the beginning
  100.      of the section so we begin them at 0.  */
  101.   /* DWARF 1 */
  102.   .debug          0 : { *(.debug) }
  103.   .line           0 : { *(.line) }
  104.   /* GNU DWARF 1 extensions */
  105.   .debug_srcinfo  0 : { *(.debug_srcinfo) }
  106.   .debug_sfnames  0 : { *(.debug_sfnames) }
  107.   /* DWARF 1.1 and DWARF 2 */
  108.   .debug_aranges  0 : { *(.debug_aranges) }
  109.   .debug_pubnames 0 : { *(.debug_pubnames) }
  110.   /* DWARF 2 */
  111.   .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
  112.   .debug_abbrev   0 : { *(.debug_abbrev) }
  113.   .debug_line     0 : { *(.debug_line) }
  114.   .debug_frame    0 : { *(.debug_frame) }
  115.   .debug_str      0 : { *(.debug_str) }
  116.   .debug_loc      0 : { *(.debug_loc) }
  117.   .debug_macinfo  0 : { *(.debug_macinfo) }
  118.   /* SGI/MIPS DWARF 2 extensions */
  119.   .debug_weaknames 0 : { *(.debug_weaknames) }
  120.   .debug_funcnames 0 : { *(.debug_funcnames) }
  121.   .debug_typenames 0 : { *(.debug_typenames) }
  122.   .debug_varnames  0 : { *(.debug_varnames) }
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement