0863a3864be5f1d90e15a7348eb255de1472826f
1 /*----------------------------------------------------------------------------*/
2 /* r5f_linker.cmd */
3 /* */
4 /* (c) Texas Instruments 2020, All rights reserved. */
5 /* */
7 /* USER CODE BEGIN (0) */
8 /* USER CODE END */
9 --retain="*(.intvecs)"
10 --retain="*(.intc_text)"
11 --retain="*(.rstvectors)"
12 --retain="*(.irqStack)"
13 --retain="*(.fiqStack)"
14 --retain="*(.abortStack)"
15 --retain="*(.undStack)"
16 --retain="*(.svcStack)"
17 -stack 0x2000 /* SOFTWARE STACK SIZE */
18 -heap 0x2000 /* HEAP AREA SIZE */
21 /* Stack Sizes for various modes */
22 __IRQ_STACK_SIZE = 0x1000;
23 __FIQ_STACK_SIZE = 0x1000;
24 __ABORT_STACK_SIZE = 0x1000;
25 __UND_STACK_SIZE = 0x1000;
26 __SVC_STACK_SIZE = 0x1000;
28 /*----------------------------------------------------------------------------*/
29 /* Linker Settings */
30 --retain="*(.intvecs)"
32 /*----------------------------------------------------------------------------*/
33 /* Memory Map */
34 MEMORY{
35 PAGE 0:
36 /* Reset Vectors base address(RESET_VECTORS) should be 64 bytes aligned */
37 RESET_VECTORS (X) : origin=0x00000000 length=0x100
38 /* RESET_VECTORS (X) : origin=0x00020000 length=0x100 */
39 TCMA_RAM (RX) : origin=0x00000100 length=0x00007F00
40 TCMB_RAM (RW) : origin=0x00080000 length=0x00008000
41 SBL_RESERVED_L2_RAM (RW) : origin=0x10200000 length=0x00060000
42 L2_RAM (RW) : origin=0x10260000 length=0x00090000
43 L3_RAM (RW) : origin=0x88000000 length=0x00390000
44 HWA_RAM (RW) : origin=0x82000000 length=0x00020000
46 PAGE 1:
47 L3_RAM (RW) : origin=0x88000000 length=0x00390000
48 }
50 /*----------------------------------------------------------------------------*/
51 /* Section Configuration */
52 SECTIONS{
53 /* .intvecs : {} palign(8) > VECTORS */
54 /* .intc_text : {} palign(8) > VECTORS */
55 .rstvectors : {} palign(8) > RESET_VECTORS
56 .bootCode : {} palign(8) > TCMA_RAM
57 .startupCode : {} palign(8) > TCMA_RAM
58 .startupData : {} palign(8) > TCMB_RAM, type = NOINIT
60 /* The linker notation "X >> Y | Z" indicates section X is first allocated in Y
61 and allowed to overflow into Z and can be split from Y to Z.
62 The linker notation "X > Y | Z" indicates section X is first allocated in Y
63 and allowed to overflow into Z and cannot be split from Y to Z. Some sections
64 like bss are not allowed to be split so > notation is used for them
65 */
66 .text : {} >> TCMA_RAM | L2_RAM
68 .const : {} > L2_RAM
69 .switch : {} > L2_RAM
70 .cio: : {} > SBL_RESERVED_L2_RAM | L2_RAM
71 .data: : {} > SBL_RESERVED_L2_RAM | L2_RAM
73 .cinit : {} > L2_RAM
74 .pinit : {} > L2_RAM
75 .bss : {} > SBL_RESERVED_L2_RAM | L2_RAM
76 .stack : {} > TCMB_RAM | SBL_RESERVED_L2_RAM | L2_RAM
77 .sysmem : {} > SBL_RESERVED_L2_RAM | L2_RAM
78 .irqStack : {. = . + __IRQ_STACK_SIZE;} align(4) > L2_RAM (HIGH)
79 RUN_START(__IRQ_STACK_START)
80 RUN_END(__IRQ_STACK_END)
81 .fiqStack : {. = . + __FIQ_STACK_SIZE;} align(4) > L2_RAM (HIGH)
82 RUN_START(__FIQ_STACK_START)
83 RUN_END(__FIQ_STACK_END)
84 .abortStack : {. = . + __ABORT_STACK_SIZE;} align(4)> L2_RAM (HIGH)
85 RUN_START(__ABORT_STACK_START)
86 RUN_END(__ABORT_STACK_END)
87 .undStack : {. = . + __UND_STACK_SIZE;} align(4) > L2_RAM (HIGH)
88 RUN_START(__UND_STACK_START)
89 RUN_END(__UND_STACK_END)
90 .svcStack : {. = . + __SVC_STACK_SIZE;} align(4) > L2_RAM (HIGH)
91 RUN_START(__SVC_STACK_START)
92 RUN_END(__SVC_STACK_END)
93 }
94 /*----------------------------------------------------------------------------*/