Merged in f5soh/librepilot/laurent/LP-92_Feed_forward_remove (pull request #33)
[librepilot.git] / flight / pios / stm32f0x / link_STM3205x_GPSP_sections.ld
bloba526ca7854b39d1d5ad129689a14d12e2e78a19f
1 /* This is the size of the stack for all FreeRTOS IRQs */
2 _irq_stack_size = 0x150;
3 /* This is the size of the stack for early init: life span is until scheduler starts */
4 _init_stack_size = 0x100;
6 /* Stub out these functions since we don't use them anyway */
7 PROVIDE (   vPortSVCHandler = 0 ) ;
8 PROVIDE (   xPortPendSVHandler = 0 ) ;
9 PROVIDE (   xPortSysTickHandler = 0 ) ;
11 PROVIDE(pios_board_info_blob = ORIGIN(BD_INFO));
13 /* Section Definitions */
14 SECTIONS
16     .isr_vector :
17     {
18         . = ALIGN(4);
19         pios_isr_vector_table_base = .;
20         KEEP(*(.isr_vector))        /* Interrupt vectors */
21     } > FLASH
22     .text :
23     {
24         . = ALIGN(4);
25         *(.text .text.* .gnu.linkonce.t.*)
26         *(.glue_7t) *(.glue_7)
27         *(.rodata .rodata* .gnu.linkonce.r.*)
28     } > FLASH
30     /* module sections */
31     .initcallmodule.init :
32     {
33         . = ALIGN(4);
34         __module_initcall_start = .;
35         KEEP(*(.initcallmodule.init))
36         . = ALIGN(4);
37         __module_initcall_end   = .;
38     } >FLASH
40     .ARM.extab :
41     {
42         *(.ARM.extab* .gnu.linkonce.armextab.*)
43     } > FLASH
45     .ARM.exidx :
46     {
47         *(.ARM.exidx* .gnu.linkonce.armexidx.*)
48     } > FLASH
50     . = ALIGN(4);
51     _etext = .;
52     _sidata = .;
53     .ram_vector_table(NOLOAD): {*(.ram_vector_table)} >VTRAM
55     /*
56      * This stack is used both as the initial sp during early init as well as ultimately
57      * being used as the STM32's MSP (Main Stack Pointer) which is the same stack that
58      * is used for _all_ interrupt handlers.  The end of this stack should be placed
59      * against the lowest address in RAM so that a stack overrun results in a hard fault
60      * at the first access beyond the end of the stack.
61      */
62     .irq_stack :
63     {
64          . = ALIGN(4);
65          _irq_stack_end = . ;
66          . = . + _irq_stack_size ;
67          . = ALIGN(4);
68          _irq_stack_top = . - 4 ;
69          . = ALIGN(4);
70     } > SRAM
72     .data : AT (_etext)
73     {
74         _sdata = .;
75         *(.data .data.*)
76         . = ALIGN(4);
77         _edata = . ;
78     } > SRAM
82     /* .bss section which is used for uninitialized data */
83     .bss (NOLOAD) :
84     {
85         _sbss = . ;
86         *(.bss .bss.*)
87         *(COMMON)
88     } > SRAM
90     .heap (NOLOAD) :
91     {
92         . = ALIGN(4);
93         _sheap = . ;
94         _sheap_pre_rtos = . ;
95         *(.heap)
96         . = ALIGN(4);
97         _eheap = . ;
98         _eheap_pre_rtos = . ;
99         _init_stack_end = . ;
100         _sheap_post_rtos = . ;
101         . = . + _init_stack_size ;
102         . = ALIGN(4);
103         _eheap_post_rtos = . ;
104         _init_stack_top = . - 4 ;
105     } > SRAM
107     _eram = ORIGIN(SRAM) + LENGTH(SRAM) ;
108     _ebss = _eram ;
109     _estack = _init_stack_top;
110     /* keep the heap section at the end of the SRAM
111      * this will allow to claim the remaining bytes not used
112      * at run time! (done by the reset vector).
113      */
115     PROVIDE ( _end = _ebss ) ;
117     /* Stabs debugging sections.  */
118     .stab          0 : { *(.stab) }
119     .stabstr       0 : { *(.stabstr) }
120     .stab.excl     0 : { *(.stab.excl) }
121     .stab.exclstr  0 : { *(.stab.exclstr) }
122     .stab.index    0 : { *(.stab.index) }
123     .stab.indexstr 0 : { *(.stab.indexstr) }
124     .comment       0 : { *(.comment) }
125     /* DWARF debug sections.
126        Symbols in the DWARF debugging sections are relative to the beginning
127        of the section so we begin them at 0.  */
128     /* DWARF 1 */
129     .debug          0 : { *(.debug) }
130     .line           0 : { *(.line) }
131     /* GNU DWARF 1 extensions */
132     .debug_srcinfo  0 : { *(.debug_srcinfo) }
133     .debug_sfnames  0 : { *(.debug_sfnames) }
134     /* DWARF 1.1 and DWARF 2 */
135     .debug_aranges  0 : { *(.debug_aranges) }
136     .debug_pubnames 0 : { *(.debug_pubnames) }
137     /* DWARF 2 */
138     .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
139     .debug_abbrev   0 : { *(.debug_abbrev) }
140     .debug_line     0 : { *(.debug_line) }
141     .debug_frame    0 : { *(.debug_frame) }
142     .debug_str      0 : { *(.debug_str) }
143     .debug_loc      0 : { *(.debug_loc) }
144     .debug_macinfo  0 : { *(.debug_macinfo) }
145     /* SGI/MIPS DWARF 2 extensions */
146     .debug_weaknames 0 : { *(.debug_weaknames) }
147     .debug_funcnames 0 : { *(.debug_funcnames) }
148     .debug_typenames 0 : { *(.debug_typenames) }
149     .debug_varnames  0 : { *(.debug_varnames) }