source: ecs_cellMon/firmware/STM32G0xx_Flash.icf@ 7

Last change on this file since 7 was 3, checked in by f.jahn, 3 years ago

fw hinzugfügt-->zed

File size: 8.5 KB
Line 
1/*********************************************************************
2* SEGGER Microcontroller GmbH *
3* The Embedded Experts *
4**********************************************************************
5* *
6* (c) 2014 - 2020 SEGGER Microcontroller GmbH *
7* *
8* www.segger.com Support: support@segger.com *
9* *
10**********************************************************************
11* *
12* All rights reserved. *
13* *
14* Redistribution and use in source and binary forms, with or *
15* without modification, are permitted provided that the following *
16* condition is met: *
17* *
18* - Redistributions of source code must retain the above copyright *
19* notice, this condition and the following disclaimer. *
20* *
21* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND *
22* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, *
23* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF *
24* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE *
25* DISCLAIMED. IN NO EVENT SHALL SEGGER Microcontroller BE LIABLE FOR *
26* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR *
27* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT *
28* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; *
29* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
30* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT *
31* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE *
32* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH *
33* DAMAGE. *
34* *
35**********************************************************************
36-------------------------- END-OF-HEADER -----------------------------
37
38File : STM32G0xx_Flash.icf
39Purpose : STM32G0xx linker script for application placement in Flash,
40 for use with the SEGGER Linker.
41*/
42
43define memory with size = 4G;
44
45//
46// Combined regions per memory type
47//
48define region FLASH = FLASH1;
49define region RAM = RAM1;
50
51//
52// Block definitions
53//
54define block vectors { section .vectors }; // Vector table section
55define block vectors_ram { section .vectors_ram }; // Vector table section
56define block ctors { section .ctors, section .ctors.*, block with alphabetical order { init_array } };
57define block dtors { section .dtors, section .dtors.*, block with reverse alphabetical order { fini_array } };
58define block exidx { section .ARM.exidx, section .ARM.exidx.* };
59define block tbss { section .tbss, section .tbss.* };
60define block tdata { section .tdata, section .tdata.* };
61define block tls { block tbss, block tdata };
62define block tdata_load { copy of block tdata };
63define block heap with size = __HEAPSIZE__, alignment = 8, /* fill =0x00, */ readwrite access { };
64define block stack with size = __STACKSIZE__, alignment = 8, /* fill =0xCD, */ readwrite access { };
65//
66// Explicit initialization settings for sections
67// Packing options for initialize by copy: packing=auto/lzss/zpak/packbits
68//
69do not initialize { section .non_init, section .non_init.*, section .*.non_init, section .*.non_init.* };
70do not initialize { section .no_init, section .no_init.*, section .*.no_init, section .*.no_init.* }; // Legacy sections, kept for backwards compatibility
71do not initialize { section .noinit, section .noinit.*, section .*.noinit, section .*.noinit.* }; // Legacy sections, used by some SDKs/HALs
72do not initialize { block vectors_ram };
73initialize by copy with packing=auto { section .data, section .data.*, section .*.data, section .*.data.* }; // Static data sections
74initialize by copy with packing=auto { section .fast, section .fast.* }; // "RAM Code" sections
75initialize by symbol __SEGGER_init_heap { block heap }; // Init the heap if there is one
76initialize by symbol __SEGGER_init_ctors { block ctors }; // Call constructors for global objects which need to be constructed before reaching main (if any). Make sure this is done after setting up heap.
77
78//
79// Explicit placement in FLASHn
80//
81place in FLASH1 { section .FLASH1, section .FLASH1.* };
82//
83// FLASH Placement
84//
85place at start of FLASH { block vectors }; // Vector table section
86place in FLASH with minimum size order { section .init, section .init.*, // Init code section
87 section .init_rodata, section .init_rodata.*, // Init read-only section
88 section .text, section .text.*, // Code section
89 section .rodata, section .rodata.*, // Read-only data section
90 section .segger.*, // Auto-generated initialization
91 section .ARM.extab.*, // ARM exception table
92 block exidx, // ARM exception unwinding block
93 block ctors, // Constructors block
94 block dtors }; // Destructors block
95place in FLASH { block tdata_load }; // Thread-local-storage load image
96
97//
98// Explicit placement in RAMn
99//
100place in RAM1 { section .RAM1, section .RAM1.* };
101//
102// RAM Placement
103//
104place at start of RAM { block vectors_ram };
105place in RAM { section .non_init, section .non_init.*, // No initialization section
106 section .no_init, section .no_init.*, // No initialization section, for backwards compatibility
107 section .noinit, section .noinit.*, // No initialization section, used by some SDKs/HALs
108 block tls }; // Thread-local-storage block
109place in RAM with auto order { section .fast, section .fast.*, // "ramfunc" section
110 section .RamFunc*, // "ramfunc" section
111 section .data, section .data.*, // Initialized data section
112 section .bss, section .bss.* // Static data section
113 };
114place in RAM { block heap }; // Heap reserved block
115place at end of RAM { block stack }; // Stack reserved block at the end
116
117define region CRC = [end(FLASH) - 4 size 4];
118define region APP = FLASH - CRC;
119place in CRC { integrity check of APP with algorithm="CRC-32/STM32" fill=0xFF };
120fill APP with 0xFF;
Note: See TracBrowser for help on using the repository browser.