summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/boot.lds
blob: 9861ef2125ee18467f12fcc412fc2cecd2455856 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#include "config.h"
#include "cpu.h"

ENTRY(start)
OUTPUT_FORMAT(elf32-littlearm)
OUTPUT_ARCH(arm)
STARTUP(target/arm/crt0.o)

#define LOAD_SIZE 0x100000  /* Reserve 1MB for loading the firmware */

MEMORY
{
    IRAM : ORIGIN = IRAM_ORIG, LENGTH = IRAM_SIZE
    DRAM : ORIGIN = DRAM_ORIG + LOAD_SIZE, LENGTH = DRAM_SIZE - LOAD_SIZE - TTB_SIZE
}

SECTIONS
{
  . = IRAM_ORIG;

  .text : {
    *(.init.text)
    *(.glue_7)
    *(.glue_7t)
    *(.text*)
    *(.icode*)
  } > IRAM

  .data : {
    *(.data*)
    *(.rodata*)
    _dataend = . ;
   } > IRAM

  .stack  (NOLOAD) :
  {
     *(.stack)
     _stackbegin = .;
     stackbegin = .;
     . += 0x2000;
     _stackend = .;
     stackend = .;
  } > IRAM

  .bss (NOLOAD) : {
     _edata = .;
     *(.bss*);
     *(COMMON)
     _end = .;
   } > DRAM
}