1/* Copyright 2024 Cypress Semiconductor Corporation (an Infineon company) or
2 * an affiliate of Cypress Semiconductor Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7SECTIONS
8{
9    .app_header :
10    {
11	    KEEP(*(.app_header))
12    } > APP_HEADER_FLASH
13
14   /* Cortex-M33 bootstrap code area */
15    .bootstrapText :
16    {
17        . = ALIGN(4);
18        __bootstrapText_begin = .;
19
20        /* Located in generated directory. This file is populated by calling
21         * zephyr_linker_sources(ROM_START ...). This typically contains the vector
22         * table and debug information.
23         */
24        #include <snippets-rom-start.ld>
25
26        /* startup code */
27        *(.text._reset_section)
28
29        *startup_cat1b_cm33.*(.text*)
30        *system_cyw20829.*(.text*)
31
32        /* drivers */
33        *cy_device.*(.text*)
34        *cy_btss.*(.text*)
35        *cy_sysclk_v2.*(.text*)
36        *cy_syspm_v2.*(.text*)
37        *cy_sysint_v2.*(.text*)
38        *cy_syslib*.*(.text*)
39        *ppu_v1.*(.text*)
40        *cy_mpc.*(.text*)
41        *cy_syspm_ppu.*(.text*)
42
43        *memcpy*.* (.text*)   /* add memcpy from the NewLib library here*/
44        *memset*.* (.text*)   /* add memcpy from the NewLib library here*/
45        *memmove*.* (.text*)  /* add memcpy from the NewLib library here*/
46        *s_fabs.* (.text*)
47
48        KEEP(*(.cy_l1func*))
49
50        . = ALIGN(4);
51        __bootstrapText_end = .;
52    } > BOOTSTRAP_RAM AT>BOOTSTRAP_FLASH
53
54    .bootstrapzero.table :
55    {
56        . = ALIGN(4);
57        __bootstrapzero_table_start__ = .;
58        LONG (__bootstrap_bss_start__)
59        LONG ((__bootstrap_bss_end__ - __bootstrap_bss_start__)/4)
60        . = ALIGN(4);
61        __bootstrapzero_table_end__ = .;
62    } > BOOTSTRAP_RAM AT>BOOTSTRAP_FLASH
63
64    .bootstrapData :
65    {
66        __bootstrapData_start__ = .;
67        . = ALIGN(4);
68
69        /* startup code */
70        *startup_cat1b_cm33.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
71        *system_cyw20829.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
72
73        /* drivers */
74        *cy_device.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
75        *cy_btss.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
76        *cy_sysclk_v2.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
77        *cy_syspm_v2.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
78        *cy_sysint_v2.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
79        *cy_syslib.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
80        *ppu_v1.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
81        *cy_mpc.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
82        *cy_pd_ppu.*(.data* .rodata .rodata.* .constdata .constdata.* .conststring .conststring.*)
83
84        KEEP(*(.cy_l1data*))
85
86        . = ALIGN(4);
87        __bootstrapData_end__ = .;
88    } > BOOTSTRAP_RAM AT>BOOTSTRAP_FLASH
89
90    .bootstrapBss (NOLOAD):
91    {
92        . = ALIGN(4);
93        __bootstrap_bss_start__ = .;
94
95        /* startup code */
96        *startup_cat1b_cm33.*(.bss* COMMON)
97        *system_cyw20829.*(.bss* COMMON)
98
99        /* drivers */
100        *cy_device.*(.bss* COMMON)
101        *cy_btss.*(.bss* COMMON)
102        *cy_sysclk_v2.*(.bss* COMMON)
103        *cy_syspm_v2.*(.bss* COMMON)
104        *cy_sysint_v2.*(.bss* COMMON)
105        *cy_syslib.*(.bss* COMMON)
106        *ppu_v1.*(.bss* COMMON)
107        *cy_mpc.*(.bss* COMMON)
108        *cy_pd_ppu.*(.bss* COMMON)
109        KEEP(*(.cy_l1bss*))
110
111        . = ALIGN(4);
112        __bootstrap_bss_end__ = .;
113    } > BOOTSTRAP_RAM
114}
115