Mon, 11 Mar 2024 15:35:36 +0100
Add links to sr.ht repos and add an image in the README file
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
1 | /* Linker script to configure memory regions. */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
2 | /* |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
3 | * SPDX-License-Identifier: BSD-3-Clause |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
4 | ****************************************************************************** |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
5 | * @attention |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
6 | * |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
7 | * Copyright (c) 2016-2020 STMicroelectronics. |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
8 | * All rights reserved. |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
9 | * |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
10 | * This software component is licensed by ST under BSD 3-Clause license, |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
11 | * the "License"; You may not use this file except in compliance with the |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
12 | * License. You may obtain a copy of the License at: |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
13 | * opensource.org/licenses/BSD-3-Clause |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
14 | * |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
15 | ****************************************************************************** |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
16 | */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
17 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
18 | #include "cmsis_nvic.h" |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
19 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
20 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
21 | #if !defined(MBED_APP_START) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
22 | #define MBED_APP_START MBED_ROM_START |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
23 | #endif |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
24 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
25 | #if !defined(MBED_APP_SIZE) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
26 | #define MBED_APP_SIZE MBED_ROM_SIZE |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
27 | #endif |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
28 | |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
29 | #if !defined(MBED_CONF_TARGET_BOOT_STACK_SIZE) |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
30 | /* This value is normally defined by the tools |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
31 | to 0x1000 for bare metal and 0x400 for RTOS */ |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
32 | #define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x400 |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
33 | #endif |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
34 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
35 | /* Round up VECTORS_SIZE to 8 bytes */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
36 | #define VECTORS_SIZE (((NVIC_NUM_VECTORS * 4) + 7) & 0xFFFFFFF8) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
37 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
38 | MEMORY |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
39 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
40 | FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
41 | RAM (rwx) : ORIGIN = MBED_RAM_START + VECTORS_SIZE, LENGTH = MBED_RAM_SIZE - VECTORS_SIZE |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
42 | } |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
43 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
44 | /* Linker script to place sections and symbol values. Should be used together |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
45 | * with other linker script that defines memory regions FLASH and RAM. |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
46 | * It references following symbols, which must be defined in code: |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
47 | * Reset_Handler : Entry of reset handler |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
48 | * |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
49 | * It defines following symbols, which code can use without definition: |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
50 | * __exidx_start |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
51 | * __exidx_end |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
52 | * __etext |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
53 | * __data_start__ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
54 | * __preinit_array_start |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
55 | * __preinit_array_end |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
56 | * __init_array_start |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
57 | * __init_array_end |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
58 | * __fini_array_start |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
59 | * __fini_array_end |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
60 | * __data_end__ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
61 | * __bss_start__ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
62 | * __bss_end__ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
63 | * __end__ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
64 | * end |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
65 | * __HeapLimit |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
66 | * __StackLimit |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
67 | * __StackTop |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
68 | * __stack |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
69 | * _estack |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
70 | */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
71 | ENTRY(Reset_Handler) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
72 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
73 | SECTIONS |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
74 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
75 | .text : |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
76 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
77 | KEEP(*(.isr_vector)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
78 | *(.text*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
79 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
80 | KEEP(*(.init)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
81 | KEEP(*(.fini)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
82 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
83 | /* .ctors */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
84 | *crtbegin.o(.ctors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
85 | *crtbegin?.o(.ctors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
86 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
87 | *(SORT(.ctors.*)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
88 | *(.ctors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
89 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
90 | /* .dtors */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
91 | *crtbegin.o(.dtors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
92 | *crtbegin?.o(.dtors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
93 | *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
94 | *(SORT(.dtors.*)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
95 | *(.dtors) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
96 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
97 | *(.rodata*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
98 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
99 | KEEP(*(.eh_frame*)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
100 | } > FLASH |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
101 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
102 | .ARM.extab : |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
103 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
104 | *(.ARM.extab* .gnu.linkonce.armextab.*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
105 | } > FLASH |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
106 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
107 | __exidx_start = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
108 | .ARM.exidx : |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
109 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
110 | *(.ARM.exidx* .gnu.linkonce.armexidx.*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
111 | } > FLASH |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
112 | __exidx_end = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
113 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
114 | __etext = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
115 | _sidata = .; |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
116 | |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
117 | .data : AT (__etext) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
118 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
119 | __data_start__ = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
120 | _sdata = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
121 | *(vtable) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
122 | *(.data*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
123 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
124 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
125 | /* preinit data */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
126 | PROVIDE_HIDDEN (__preinit_array_start = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
127 | KEEP(*(.preinit_array)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
128 | PROVIDE_HIDDEN (__preinit_array_end = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
129 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
130 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
131 | /* init data */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
132 | PROVIDE_HIDDEN (__init_array_start = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
133 | KEEP(*(SORT(.init_array.*))) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
134 | KEEP(*(.init_array)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
135 | PROVIDE_HIDDEN (__init_array_end = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
136 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
137 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
138 | /* finit data */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
139 | PROVIDE_HIDDEN (__fini_array_start = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
140 | KEEP(*(SORT(.fini_array.*))) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
141 | KEEP(*(.fini_array)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
142 | PROVIDE_HIDDEN (__fini_array_end = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
143 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
144 | KEEP(*(.jcr*)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
145 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
146 | /* All data end */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
147 | __data_end__ = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
148 | _edata = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
149 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
150 | } > RAM |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
151 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
152 | /* Uninitialized data section |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
153 | * This region is not initialized by the C/C++ library and can be used to |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
154 | * store state across soft reboots. */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
155 | .uninitialized (NOLOAD): |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
156 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
157 | . = ALIGN(32); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
158 | __uninitialized_start = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
159 | *(.uninitialized) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
160 | KEEP(*(.keep.uninitialized)) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
161 | . = ALIGN(32); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
162 | __uninitialized_end = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
163 | } > RAM |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
164 | |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
165 | .bss : |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
166 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
167 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
168 | __bss_start__ = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
169 | _sbss = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
170 | *(.bss*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
171 | *(COMMON) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
172 | . = ALIGN(8); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
173 | __bss_end__ = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
174 | _ebss = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
175 | } > RAM |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
176 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
177 | .heap (COPY): |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
178 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
179 | __end__ = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
180 | PROVIDE(end = .); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
181 | *(.heap*) |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
182 | . = ORIGIN(RAM) + LENGTH(RAM) - MBED_CONF_TARGET_BOOT_STACK_SIZE; |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
183 | __HeapLimit = .; |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
184 | } > RAM |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
185 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
186 | /* .stack_dummy section doesn't contains any symbols. It is only |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
187 | * used for linker to calculate size of stack sections, and assign |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
188 | * values to stack symbols later */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
189 | .stack_dummy (COPY): |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
190 | { |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
191 | *(.stack*) |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
192 | } > RAM |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
193 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
194 | /* Set stack top to end of RAM, and stack limit move down by |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
195 | * size of stack_dummy section */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
196 | __StackTop = ORIGIN(RAM) + LENGTH(RAM); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
197 | _estack = __StackTop; |
64
897330ee6e9d
Make USBSerial work -- at last
David Douard <david.douard@sdfa3.org>
parents:
30
diff
changeset
|
198 | __StackLimit = __StackTop - MBED_CONF_TARGET_BOOT_STACK_SIZE; |
30
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
199 | PROVIDE(__stack = __StackTop); |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
200 | |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
201 | /* Check if data + heap + stack exceeds RAM limit */ |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
202 | ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") |
71be284c66b3
Update the custom target HP34970_FP_303RD
David Douard <david.douard@sdf3.org>
parents:
diff
changeset
|
203 | } |