OP-1156 fix path logic to not deviate from correct altitude too much
[librepilot.git] / flight / pios / stm32f10x / link_STM32103CB_CC_Rev1_sections.ld
blobf3c6b468f21012376c09f2679a13391c612e601f
1 /* This is the size of the stack for all FreeRTOS IRQs */
2 _irq_stack_size = 0x240;
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     .text :
17     {
18         PROVIDE (pios_isr_vector_table_base = .);
19         KEEP(*(.isr_vector .isr_vector.*))
20         *(.text .text.* .gnu.linkonce.t.*)
21         *(.glue_7t) *(.glue_7)
22         *(.rodata .rodata* .gnu.linkonce.r.*)
23     } > FLASH
25     /* module sections */
26     .initcallmodule.init :
27     {
28         . = ALIGN(4);
29         __module_initcall_start = .;
30         KEEP(*(.initcallmodule.init))
31         . = ALIGN(4);
32         __module_initcall_end   = .;
33     } >FLASH
35     .ARM.extab :
36     {
37         *(.ARM.extab* .gnu.linkonce.armextab.*)
38     } > FLASH
40     .ARM.exidx :
41     {
42         *(.ARM.exidx* .gnu.linkonce.armexidx.*)
43     } > FLASH
45     . = ALIGN(4);
46     _etext = .;
47     _sidata = .;
49     /*
50      * This stack is used both as the initial sp during early init as well as ultimately
51      * being used as the STM32's MSP (Main Stack Pointer) which is the same stack that
52      * is used for _all_ interrupt handlers.  The end of this stack should be placed
53      * against the lowest address in RAM so that a stack overrun results in a hard fault
54      * at the first access beyond the end of the stack.
55      */
56     .irq_stack :
57     {
58          . = ALIGN(4);
59          _irq_stack_end = . ;
60          . = . + _irq_stack_size ;
61          . = ALIGN(4);
62          _irq_stack_top = . - 4 ;
63          . = ALIGN(4);
64     } > SRAM
66     .data : AT (_etext)
67     {
68         _sdata = .;
69         *(.data .data.*)
70         . = ALIGN(4);
71         _edata = . ;
72     } > SRAM
76     /* .bss section which is used for uninitialized data */
77     .bss (NOLOAD) :
78     {
79         _sbss = . ;
80         *(.bss .bss.*)
81         *(COMMON)
82     } > SRAM
84     .heap (NOLOAD) :
85     {
86         . = ALIGN(4);
87         _sheap = . ;
88         _sheap_pre_rtos = . ;
89         *(.heap)
90         . = ALIGN(4);
91         _eheap = . ;
92         _eheap_pre_rtos = . ;
93         _init_stack_end = . ;
94         _sheap_post_rtos = . ;
95         . = . + _init_stack_size ;
96         . = ALIGN(4);
97         _eheap_post_rtos = . ;
98         _init_stack_top = . - 4 ;
99     } > SRAM
101     _eram = ORIGIN(SRAM) + LENGTH(SRAM) ;
102     _ebss = _eram ;
103     
104     /* keep the heap section at the end of the SRAM
105      * this will allow to claim the remaining bytes not used
106      * at run time! (done by the reset vector).
107      */
109     PROVIDE ( _end = _ebss ) ;
111     /* Stabs debugging sections.  */
112     .stab          0 : { *(.stab) }
113     .stabstr       0 : { *(.stabstr) }
114     .stab.excl     0 : { *(.stab.excl) }
115     .stab.exclstr  0 : { *(.stab.exclstr) }
116     .stab.index    0 : { *(.stab.index) }
117     .stab.indexstr 0 : { *(.stab.indexstr) }
118     .comment       0 : { *(.comment) }
119     /* DWARF debug sections.
120        Symbols in the DWARF debugging sections are relative to the beginning
121        of the section so we begin them at 0.  */
122     /* DWARF 1 */
123     .debug          0 : { *(.debug) }
124     .line           0 : { *(.line) }
125     /* GNU DWARF 1 extensions */
126     .debug_srcinfo  0 : { *(.debug_srcinfo) }
127     .debug_sfnames  0 : { *(.debug_sfnames) }
128     /* DWARF 1.1 and DWARF 2 */
129     .debug_aranges  0 : { *(.debug_aranges) }
130     .debug_pubnames 0 : { *(.debug_pubnames) }
131     /* DWARF 2 */
132     .debug_info     0 : { *(.debug_info .gnu.linkonce.wi.*) }
133     .debug_abbrev   0 : { *(.debug_abbrev) }
134     .debug_line     0 : { *(.debug_line) }
135     .debug_frame    0 : { *(.debug_frame) }
136     .debug_str      0 : { *(.debug_str) }
137     .debug_loc      0 : { *(.debug_loc) }
138     .debug_macinfo  0 : { *(.debug_macinfo) }
139     /* SGI/MIPS DWARF 2 extensions */
140     .debug_weaknames 0 : { *(.debug_weaknames) }
141     .debug_funcnames 0 : { *(.debug_funcnames) }
142     .debug_typenames 0 : { *(.debug_typenames) }
143     .debug_varnames  0 : { *(.debug_varnames) }