1/*
2** ###################################################################
3**     Processors:          LPC55S69JBD100_cm33_core0
4**                          LPC55S69JET98_cm33_core0
5**
6**     Compiler:            IAR ANSI C/C++ Compiler for ARM
7**     Reference manual:    LPC55xx/LPC55Sxx User manual Rev.0.2  15 Aug 2018
8**     Version:             rev. 1.0, 2018-08-22
9**     Build:               b180921
10**
11**     Abstract:
12**         Linker file for the IAR ANSI C/C++ Compiler for ARM
13**
14**     Copyright 2016 Freescale Semiconductor, Inc.
15**     Copyright 2016-2018 NXP
16**     All rights reserved.
17**
18**     SPDX-License-Identifier: BSD-3-Clause
19**
20**     http:                 www.nxp.com
21**     mail:                 support@nxp.com
22**
23** ###################################################################
24*/
25
26
27/* USB BDT size */
28define symbol usb_bdt_size             = 0x0;
29/* Stack and Heap Sizes */
30if (isdefinedsymbol(__stack_size__)) {
31  define symbol __size_cstack__        = __stack_size__;
32} else {
33  define symbol __size_cstack__        = 0x800;
34}
35
36if (isdefinedsymbol(__heap_size__)) {
37  define symbol __size_heap__          = __heap_size__;
38} else {
39  define symbol __size_heap__          = 0x0400;
40}
41
42define symbol m_interrupts_start               = 0x00000000;
43define symbol m_interrupts_end                 = 0x0000013F;
44
45define symbol m_text_start                     = 0x00000140;
46define symbol m_text_end                       = 0x00071FFF;
47
48define exported symbol core1_image_start     = 0x00072000;
49define exported symbol core1_image_end       = 0x00097FFF;
50
51if (isdefinedsymbol(__use_shmem__)) {
52  define symbol m_data_start                     = 0x20000000;
53  define symbol m_data_end                       = 0x200317FF;
54  define exported symbol rpmsg_sh_mem_start      = 0x20031800;
55  define exported symbol rpmsg_sh_mem_end        = 0x20032FFF;
56} else {
57  define symbol m_data_start                     = 0x20000000;
58  define symbol m_data_end                       = 0x20032FFF;
59}
60
61define symbol m_usb_sram_start                 = 0x40100000;
62define symbol m_usb_sram_end                   = 0x40103FFF;
63
64define memory mem with size = 4G;
65
66define region TEXT_region             = mem:[from m_interrupts_start to m_interrupts_end]
67                                      | mem:[from m_text_start to m_text_end];
68define region DATA_region = mem:[from m_data_start to m_data_end-__size_cstack__];
69define region CSTACK_region = mem:[from m_data_end-__size_cstack__+1 to m_data_end];
70if (isdefinedsymbol(__use_shmem__)) {
71  define region rpmsg_sh_mem_region     = mem:[from rpmsg_sh_mem_start to rpmsg_sh_mem_end];
72}
73
74define block CSTACK    with alignment = 8, size = __size_cstack__   { };
75define block HEAP      with alignment = 8, size = __size_heap__     { };
76define block RW        { readwrite };
77define block ZI        { zi };
78
79define region core1_region = mem:[from core1_image_start to core1_image_end];
80define block SEC_CORE_IMAGE_BLOCK          { section  __sec_core };
81
82/* regions for USB */
83define region USB_BDT_region = mem:[from m_usb_sram_start to m_usb_sram_start + usb_bdt_size - 1];
84define region USB_SRAM_region = mem:[from m_usb_sram_start + usb_bdt_size to m_usb_sram_end];
85place in USB_BDT_region                     { section m_usb_bdt };
86place in USB_SRAM_region                    { section m_usb_global };
87
88initialize by copy { readwrite, section .textrw };
89
90if (isdefinedsymbol(__USE_DLIB_PERTHREAD))
91{
92  /* Required in a multi-threaded application */
93  initialize by copy with packing = none { section __DLIB_PERTHREAD };
94}
95
96do not initialize  { section .noinit, section m_usb_bdt, section m_usb_global };
97if (isdefinedsymbol(__use_shmem__)) {
98  do not initialize  { section rpmsg_sh_mem_section };
99}
100
101place at address mem: m_interrupts_start    { readonly section .intvec };
102place in TEXT_region                        { readonly };
103place in DATA_region                        { block RW };
104place in DATA_region                        { block ZI };
105place in DATA_region                        { last block HEAP };
106place in CSTACK_region                      { block CSTACK };
107if (isdefinedsymbol(__use_shmem__)) {
108  place in rpmsg_sh_mem_region                { section rpmsg_sh_mem_section };
109}
110place in core1_region                       { block SEC_CORE_IMAGE_BLOCK };
111
112