提交 592284c6 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

format link scripts

上级 9bc68d26
; ************************************************************* ; *************************************************************
; *** Scatter-Loading Description File generated by uVision *** ; *** Scatter-Loading Description File generated by uVision ***
; ************************************************************* ; *************************************************************
; load region size_region ; load region size_region
LR_IROM1 (0) (1024 * 128) LR_IROM1 (0) (1024 * 128)
{ {
; load address = execution address ; load address = execution address
ER_IROM1 (0) (1024 * 128) ER_IROM1 (0) (1024 * 128)
{ {
*.o (RESET, +First) *.o (RESET, +First)
*(InRoot$$Sections) *(InRoot$$Sections)
.ANY (+RO) .ANY (+RO)
} }
; RW data ; RW data
RW_IRAM1 0x20000000 (1024 * 48) RW_IRAM1 0x20000000 (1024 * 48)
{ {
.ANY (+RW +ZI) .ANY (+RW +ZI)
} }
} }
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xxa_cm0plus.sct ;* \file cy8c6xxa_cm0plus.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM0+ core. ; The following defines control RAM and flash memory allocation for the CM0+ core.
; You can change the memory allocation by editing the RAM and Flash defines. ; You can change the memory allocation by editing the RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', ; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
; RAM ; RAM
#define RAM_START 0x08000000 #define RAM_START 0x08000000
#define RAM_SIZE 0x00002000 #define RAM_SIZE 0x00002000
; Flash ; Flash
#define FLASH_START 0x10000000 #define FLASH_START 0x10000000
#define FLASH_SIZE 0x00002000 #define FLASH_SIZE 0x00002000
; The size of the stack section at the end of CM0+ SRAM ; The size of the stack section at the end of CM0+ SRAM
#define STACK_SIZE 0x00001000 #define STACK_SIZE 0x00001000
; The following defines describe a 32K flash region used for EEPROM emulation. ; The following defines describe a 32K flash region used for EEPROM emulation.
; This region can also be used as the general purpose flash. ; This region can also be used as the general purpose flash.
; You can assign sections to this memory region for only one of the cores. ; You can assign sections to this memory region for only one of the cores.
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. ; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
; Therefore, repurposing this memory region will prevent such middleware from operation. ; Therefore, repurposing this memory region will prevent such middleware from operation.
#define EM_EEPROM_START 0x14000000 #define EM_EEPROM_START 0x14000000
#define EM_EEPROM_SIZE 0x8000 #define EM_EEPROM_SIZE 0x8000
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Public RAM ; Public RAM
; This is an unprotected public RAM region, with the placed .cy_sharedmem section. ; This is an unprotected public RAM region, with the placed .cy_sharedmem section.
; This region is used to place objects that require full access from both cores. ; This region is used to place objects that require full access from both cores.
; Uncomment the following lines, define the region size and uncomment placement of ; Uncomment the following lines, define the region size and uncomment placement of
; .cy_sharedmem section below. ; .cy_sharedmem section below.
; #define PUBLIC_RAM_SIZE %REGION_SIZE% ; #define PUBLIC_RAM_SIZE %REGION_SIZE%
; #define PUBLIC_RAM_START (RAM_START + RAM_SIZE - STACK_SIZE - PUBLIC_RAM_SIZE) ; #define PUBLIC_RAM_START (RAM_START + RAM_SIZE - STACK_SIZE - PUBLIC_RAM_SIZE)
; Cortex-M0+ application flash area ; Cortex-M0+ application flash area
LR_IROM1 FLASH_START FLASH_SIZE LR_IROM1 FLASH_START FLASH_SIZE
{ {
.cy_app_header +0 .cy_app_header +0
{ {
* (.cy_app_header) * (.cy_app_header)
} }
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
; To use unprotected public RAM uncomment the following .cy_sharedmem section placement. Recalculate the HEAP start address. ; To use unprotected public RAM uncomment the following .cy_sharedmem section placement. Recalculate the HEAP start address.
;RW_IRAM2 PUBLIC_RAM_START UNINIT ;RW_IRAM2 PUBLIC_RAM_START UNINIT
;{ ;{
; * (.cy_sharedmem) ; * (.cy_sharedmem)
;} ;}
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE) ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE
{ {
} }
} }
; Emulated EEPROM Flash area ; Emulated EEPROM Flash area
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
{ {
.cy_em_eeprom +0 .cy_em_eeprom +0
{ {
* (.cy_em_eeprom) * (.cy_em_eeprom)
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00200000 #define __cy_memory_0_length 0x00200000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Emulated EEPROM Flash area */ /* Emulated EEPROM Flash area */
#define __cy_memory_1_start 0x14000000 #define __cy_memory_1_start 0x14000000
#define __cy_memory_1_length 0x8000 #define __cy_memory_1_length 0x8000
#define __cy_memory_1_row_size 0x200 #define __cy_memory_1_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xxa_cm4_dual.sct ;* \file cy8c6xxa_cm4_dual.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM4 core. ; The following defines control RAM and flash memory allocation for the CM4 core.
; You can change the memory allocation by editing RAM and Flash defines. ; You can change the memory allocation by editing RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat', ; Your changes must be aligned with the corresponding defines for CM0+ core in 'xx_cm0plus.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm0plus.scat'.
; RAM ; RAM
#define RAM_START 0x08002000 #define RAM_START 0x08002000
#define RAM_SIZE 0x000FD800 #define RAM_SIZE 0x000FD800
; Flash ; Flash
#define FLASH_START 0x10000000 #define FLASH_START 0x10000000
#define FLASH_SIZE 0x00200000 #define FLASH_SIZE 0x00200000
; The size of the stack section at the end of CM4 SRAM ; The size of the stack section at the end of CM4 SRAM
#define STACK_SIZE 0x00001000 #define STACK_SIZE 0x00001000
; By default, the COMPONENT_CM0P_SLEEP prebuilt image is used for the CM0p core. ; By default, the COMPONENT_CM0P_SLEEP prebuilt image is used for the CM0p core.
; More about CM0+ prebuilt images, see here: ; More about CM0+ prebuilt images, see here:
; https://github.com/cypresssemiconductorco/psoc6cm0p ; https://github.com/cypresssemiconductorco/psoc6cm0p
; The size of the Cortex-M0+ application flash image ; The size of the Cortex-M0+ application flash image
#define FLASH_CM0P_SIZE 0x2000 #define FLASH_CM0P_SIZE 0x2000
; The following defines describe a 32K flash region used for EEPROM emulation. ; The following defines describe a 32K flash region used for EEPROM emulation.
; This region can also be used as the general purpose flash. ; This region can also be used as the general purpose flash.
; You can assign sections to this memory region for only one of the cores. ; You can assign sections to this memory region for only one of the cores.
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. ; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
; Therefore, repurposing this memory region will prevent such middleware from operation. ; Therefore, repurposing this memory region will prevent such middleware from operation.
#define EM_EEPROM_START 0x14000000 #define EM_EEPROM_START 0x14000000
#define EM_EEPROM_SIZE 0x8000 #define EM_EEPROM_SIZE 0x8000
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Cortex-M0+ application flash image area ; Cortex-M0+ application flash image area
LR_IROM FLASH_START FLASH_CM0P_SIZE LR_IROM FLASH_START FLASH_CM0P_SIZE
{ {
.cy_m0p_image +0 FLASH_CM0P_SIZE .cy_m0p_image +0 FLASH_CM0P_SIZE
{ {
* (.cy_m0p_image) * (.cy_m0p_image)
} }
} }
; Cortex-M4 application flash area ; Cortex-M4 application flash area
LR_IROM1 (FLASH_START + FLASH_CM0P_SIZE) (FLASH_SIZE - FLASH_CM0P_SIZE) LR_IROM1 (FLASH_START + FLASH_CM0P_SIZE) (FLASH_SIZE - FLASH_CM0P_SIZE)
{ {
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE) ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE
{ {
} }
; Used for the digital signature of the secure application and the ; Used for the digital signature of the secure application and the
; Bootloader SDK application. The size of the section depends on the required ; Bootloader SDK application. The size of the section depends on the required
; data size. ; data size.
.cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256 .cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256
{ {
* (.cy_app_signature) * (.cy_app_signature)
} }
} }
; Emulated EEPROM Flash area ; Emulated EEPROM Flash area
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
{ {
.cy_em_eeprom +0 .cy_em_eeprom +0
{ {
* (.cy_em_eeprom) * (.cy_em_eeprom)
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00200000 #define __cy_memory_0_length 0x00200000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Emulated EEPROM Flash area */ /* Emulated EEPROM Flash area */
#define __cy_memory_1_start 0x14000000 #define __cy_memory_1_start 0x14000000
#define __cy_memory_1_length 0x8000 #define __cy_memory_1_length 0x8000
#define __cy_memory_1_row_size 0x200 #define __cy_memory_1_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xx4_cm0plus.sct ;* \file cy8c6xx4_cm0plus.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
#if !defined(MBED_ROM_START) #if !defined(MBED_ROM_START)
#define MBED_ROM_START 0x10000000 #define MBED_ROM_START 0x10000000
#endif #endif
;* MBED_APP_START is being used by the bootloader build script and ;* MBED_APP_START is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_START ;* will be calculate by the system. Without bootloader the MBED_APP_START
;* is equal to MBED_ROM_START ;* is equal to MBED_ROM_START
;* ;*
#if !defined(MBED_APP_START) #if !defined(MBED_APP_START)
#define MBED_APP_START MBED_ROM_START #define MBED_APP_START MBED_ROM_START
#endif #endif
#if !defined(MBED_ROM_SIZE) #if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x80000 #define MBED_ROM_SIZE 0x80000
#endif #endif
;* MBED_APP_SIZE is being used by the bootloader build script and ;* MBED_APP_SIZE is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE ;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
;* is equal to MBED_ROM_SIZE ;* is equal to MBED_ROM_SIZE
;* ;*
#if !defined(MBED_APP_SIZE) #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE MBED_ROM_SIZE #define MBED_APP_SIZE MBED_ROM_SIZE
#endif #endif
#if !defined(MBED_RAM_START) #if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x08000000 #define MBED_RAM_START 0x08000000
#endif #endif
#if !defined(MBED_RAM_SIZE) #if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x00010000 #define MBED_RAM_SIZE 0x00010000
#endif #endif
#if !defined(MBED_PUBLIC_RAM_SIZE) #if !defined(MBED_PUBLIC_RAM_SIZE)
#define MBED_PUBLIC_RAM_SIZE 0x200 #define MBED_PUBLIC_RAM_SIZE 0x200
#endif #endif
; The size of the stack section at the end of CM0+ SRAM ; The size of the stack section at the end of CM0+ SRAM
#if !defined(MBED_BOOT_STACK_SIZE) #if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400 #define MBED_BOOT_STACK_SIZE 0x400
#endif #endif
#define STACK_SIZE MBED_BOOT_STACK_SIZE #define STACK_SIZE MBED_BOOT_STACK_SIZE
#if !defined(MBED_PUBLIC_RAM_START) #if !defined(MBED_PUBLIC_RAM_START)
#define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE)
#endif #endif
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM0+ core. ; The following defines control RAM and flash memory allocation for the CM0+ core.
; You can change the memory allocation by editing the RAM and Flash defines. ; You can change the memory allocation by editing the RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', ; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
; RAM ; RAM
#define RAM_START MBED_RAM_START #define RAM_START MBED_RAM_START
#define RAM_SIZE MBED_RAM_SIZE #define RAM_SIZE MBED_RAM_SIZE
; Public RAM ; Public RAM
#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START #define PUBLIC_RAM_START MBED_PUBLIC_RAM_START
#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE #define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE
; Flash ; Flash
#define FLASH_START MBED_APP_START #define FLASH_START MBED_APP_START
#define FLASH_SIZE MBED_APP_SIZE #define FLASH_SIZE MBED_APP_SIZE
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Cortex-M0+ application flash area ; Cortex-M0+ application flash area
LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000)
{ {
.cy_app_header +0 .cy_app_header +0
{ {
* (.cy_app_header) * (.cy_app_header)
} }
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
RW_IRAM2 PUBLIC_RAM_START UNINIT RW_IRAM2 PUBLIC_RAM_START UNINIT
{ {
* (.cy_sharedmem) * (.cy_sharedmem)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2) ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE
{ {
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00040000 #define __cy_memory_0_length 0x00040000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xx5_cm0plus.sct ;* \file cy8c6xx5_cm0plus.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
#if !defined(MBED_ROM_START) #if !defined(MBED_ROM_START)
#define MBED_ROM_START 0x10000000 #define MBED_ROM_START 0x10000000
#endif #endif
;* MBED_APP_START is being used by the bootloader build script and ;* MBED_APP_START is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_START ;* will be calculate by the system. Without bootloader the MBED_APP_START
;* is equal to MBED_ROM_START ;* is equal to MBED_ROM_START
;* ;*
#if !defined(MBED_APP_START) #if !defined(MBED_APP_START)
#define MBED_APP_START MBED_ROM_START #define MBED_APP_START MBED_ROM_START
#endif #endif
#if !defined(MBED_ROM_SIZE) #if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x80000 #define MBED_ROM_SIZE 0x80000
#endif #endif
;* MBED_APP_SIZE is being used by the bootloader build script and ;* MBED_APP_SIZE is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE ;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
;* is equal to MBED_ROM_SIZE ;* is equal to MBED_ROM_SIZE
;* ;*
#if !defined(MBED_APP_SIZE) #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE MBED_ROM_SIZE #define MBED_APP_SIZE MBED_ROM_SIZE
#endif #endif
#if !defined(MBED_RAM_START) #if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x08000000 #define MBED_RAM_START 0x08000000
#endif #endif
#if !defined(MBED_RAM_SIZE) #if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x00010000 #define MBED_RAM_SIZE 0x00010000
#endif #endif
#if !defined(MBED_PUBLIC_RAM_SIZE) #if !defined(MBED_PUBLIC_RAM_SIZE)
#define MBED_PUBLIC_RAM_SIZE 0x200 #define MBED_PUBLIC_RAM_SIZE 0x200
#endif #endif
; The size of the stack section at the end of CM0+ SRAM ; The size of the stack section at the end of CM0+ SRAM
#if !defined(MBED_BOOT_STACK_SIZE) #if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400 #define MBED_BOOT_STACK_SIZE 0x400
#endif #endif
#define STACK_SIZE MBED_BOOT_STACK_SIZE #define STACK_SIZE MBED_BOOT_STACK_SIZE
#if !defined(MBED_PUBLIC_RAM_START) #if !defined(MBED_PUBLIC_RAM_START)
#define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE)
#endif #endif
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM0+ core. ; The following defines control RAM and flash memory allocation for the CM0+ core.
; You can change the memory allocation by editing the RAM and Flash defines. ; You can change the memory allocation by editing the RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', ; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
; RAM ; RAM
#define RAM_START MBED_RAM_START #define RAM_START MBED_RAM_START
#define RAM_SIZE MBED_RAM_SIZE #define RAM_SIZE MBED_RAM_SIZE
; Public RAM ; Public RAM
#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START #define PUBLIC_RAM_START MBED_PUBLIC_RAM_START
#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE #define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE
; Flash ; Flash
#define FLASH_START MBED_APP_START #define FLASH_START MBED_APP_START
#define FLASH_SIZE MBED_APP_SIZE #define FLASH_SIZE MBED_APP_SIZE
; The following defines describe a 32K flash region used for EEPROM emulation. ; The following defines describe a 32K flash region used for EEPROM emulation.
; This region can also be used as the general purpose flash. ; This region can also be used as the general purpose flash.
; You can assign sections to this memory region for only one of the cores. ; You can assign sections to this memory region for only one of the cores.
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. ; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
; Therefore, repurposing this memory region will prevent such middleware from operation. ; Therefore, repurposing this memory region will prevent such middleware from operation.
#define EM_EEPROM_START 0x14000000 #define EM_EEPROM_START 0x14000000
#define EM_EEPROM_SIZE 0x8000 #define EM_EEPROM_SIZE 0x8000
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Cortex-M0+ application flash area ; Cortex-M0+ application flash area
LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000)
{ {
.cy_app_header +0 .cy_app_header +0
{ {
* (.cy_app_header) * (.cy_app_header)
} }
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
RW_IRAM2 PUBLIC_RAM_START UNINIT RW_IRAM2 PUBLIC_RAM_START UNINIT
{ {
* (.cy_sharedmem) * (.cy_sharedmem)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2) ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE
{ {
} }
} }
; Emulated EEPROM Flash area ; Emulated EEPROM Flash area
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
{ {
.cy_em_eeprom +0 .cy_em_eeprom +0
{ {
* (.cy_em_eeprom) * (.cy_em_eeprom)
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00080000 #define __cy_memory_0_length 0x00080000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Emulated EEPROM Flash area */ /* Emulated EEPROM Flash area */
#define __cy_memory_1_start 0x14000000 #define __cy_memory_1_start 0x14000000
#define __cy_memory_1_length 0x8000 #define __cy_memory_1_length 0x8000
#define __cy_memory_1_row_size 0x200 #define __cy_memory_1_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xx6_cm0plus.sct ;* \file cy8c6xx6_cm0plus.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
#if !defined(MBED_ROM_START) #if !defined(MBED_ROM_START)
#define MBED_ROM_START 0x10000000 #define MBED_ROM_START 0x10000000
#endif #endif
;* MBED_APP_START is being used by the bootloader build script and ;* MBED_APP_START is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_START ;* will be calculate by the system. Without bootloader the MBED_APP_START
;* is equal to MBED_ROM_START ;* is equal to MBED_ROM_START
;* ;*
#if !defined(MBED_APP_START) #if !defined(MBED_APP_START)
#define MBED_APP_START MBED_ROM_START #define MBED_APP_START MBED_ROM_START
#endif #endif
#if !defined(MBED_ROM_SIZE) #if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x80000 #define MBED_ROM_SIZE 0x80000
#endif #endif
;* MBED_APP_SIZE is being used by the bootloader build script and ;* MBED_APP_SIZE is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE ;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
;* is equal to MBED_ROM_SIZE ;* is equal to MBED_ROM_SIZE
;* ;*
#if !defined(MBED_APP_SIZE) #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE MBED_ROM_SIZE #define MBED_APP_SIZE MBED_ROM_SIZE
#endif #endif
#if !defined(MBED_RAM_START) #if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x08000000 #define MBED_RAM_START 0x08000000
#endif #endif
#if !defined(MBED_RAM_SIZE) #if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x00010000 #define MBED_RAM_SIZE 0x00010000
#endif #endif
#if !defined(MBED_PUBLIC_RAM_SIZE) #if !defined(MBED_PUBLIC_RAM_SIZE)
#define MBED_PUBLIC_RAM_SIZE 0x200 #define MBED_PUBLIC_RAM_SIZE 0x200
#endif #endif
; The size of the stack section at the end of CM0+ SRAM ; The size of the stack section at the end of CM0+ SRAM
#if !defined(MBED_BOOT_STACK_SIZE) #if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400 #define MBED_BOOT_STACK_SIZE 0x400
#endif #endif
#define STACK_SIZE MBED_BOOT_STACK_SIZE #define STACK_SIZE MBED_BOOT_STACK_SIZE
#if !defined(MBED_PUBLIC_RAM_START) #if !defined(MBED_PUBLIC_RAM_START)
#define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE)
#endif #endif
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM0+ core. ; The following defines control RAM and flash memory allocation for the CM0+ core.
; You can change the memory allocation by editing the RAM and Flash defines. ; You can change the memory allocation by editing the RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', ; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
; RAM ; RAM
#define RAM_START MBED_RAM_START #define RAM_START MBED_RAM_START
#define RAM_SIZE MBED_RAM_SIZE #define RAM_SIZE MBED_RAM_SIZE
; Public RAM ; Public RAM
#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START #define PUBLIC_RAM_START MBED_PUBLIC_RAM_START
#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE #define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE
; Flash ; Flash
#define FLASH_START MBED_APP_START #define FLASH_START MBED_APP_START
#define FLASH_SIZE MBED_APP_SIZE #define FLASH_SIZE MBED_APP_SIZE
; The following defines describe a 32K flash region used for EEPROM emulation. ; The following defines describe a 32K flash region used for EEPROM emulation.
; This region can also be used as the general purpose flash. ; This region can also be used as the general purpose flash.
; You can assign sections to this memory region for only one of the cores. ; You can assign sections to this memory region for only one of the cores.
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. ; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
; Therefore, repurposing this memory region will prevent such middleware from operation. ; Therefore, repurposing this memory region will prevent such middleware from operation.
#define EM_EEPROM_START 0x14000000 #define EM_EEPROM_START 0x14000000
#define EM_EEPROM_SIZE 0x8000 #define EM_EEPROM_SIZE 0x8000
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Cortex-M0+ application flash area ; Cortex-M0+ application flash area
LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000)
{ {
.cy_app_header +0 .cy_app_header +0
{ {
* (.cy_app_header) * (.cy_app_header)
} }
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
RW_IRAM2 PUBLIC_RAM_START UNINIT RW_IRAM2 PUBLIC_RAM_START UNINIT
{ {
* (.cy_sharedmem) * (.cy_sharedmem)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2) ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE
{ {
} }
} }
; Emulated EEPROM Flash area ; Emulated EEPROM Flash area
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
{ {
.cy_em_eeprom +0 .cy_em_eeprom +0
{ {
* (.cy_em_eeprom) * (.cy_em_eeprom)
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00080000 #define __cy_memory_0_length 0x00080000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Emulated EEPROM Flash area */ /* Emulated EEPROM Flash area */
#define __cy_memory_1_start 0x14000000 #define __cy_memory_1_start 0x14000000
#define __cy_memory_1_length 0x8000 #define __cy_memory_1_length 0x8000
#define __cy_memory_1_row_size 0x200 #define __cy_memory_1_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m0
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cy8c6xx7_cm0plus.sct ;* \file cy8c6xx7_cm0plus.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10000000. The valid ;* \note The entry point location is fixed and starts at 0x10000000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
#if !defined(MBED_ROM_START) #if !defined(MBED_ROM_START)
#define MBED_ROM_START 0x10000000 #define MBED_ROM_START 0x10000000
#endif #endif
;* MBED_APP_START is being used by the bootloader build script and ;* MBED_APP_START is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_START ;* will be calculate by the system. Without bootloader the MBED_APP_START
;* is equal to MBED_ROM_START ;* is equal to MBED_ROM_START
;* ;*
#if !defined(MBED_APP_START) #if !defined(MBED_APP_START)
#define MBED_APP_START MBED_ROM_START #define MBED_APP_START MBED_ROM_START
#endif #endif
#if !defined(MBED_ROM_SIZE) #if !defined(MBED_ROM_SIZE)
#define MBED_ROM_SIZE 0x80000 #define MBED_ROM_SIZE 0x80000
#endif #endif
;* MBED_APP_SIZE is being used by the bootloader build script and ;* MBED_APP_SIZE is being used by the bootloader build script and
;* will be calculate by the system. Without bootloader the MBED_APP_SIZE ;* will be calculate by the system. Without bootloader the MBED_APP_SIZE
;* is equal to MBED_ROM_SIZE ;* is equal to MBED_ROM_SIZE
;* ;*
#if !defined(MBED_APP_SIZE) #if !defined(MBED_APP_SIZE)
#define MBED_APP_SIZE MBED_ROM_SIZE #define MBED_APP_SIZE MBED_ROM_SIZE
#endif #endif
#if !defined(MBED_RAM_START) #if !defined(MBED_RAM_START)
#define MBED_RAM_START 0x08000000 #define MBED_RAM_START 0x08000000
#endif #endif
#if !defined(MBED_RAM_SIZE) #if !defined(MBED_RAM_SIZE)
#define MBED_RAM_SIZE 0x00010000 #define MBED_RAM_SIZE 0x00010000
#endif #endif
#if !defined(MBED_PUBLIC_RAM_SIZE) #if !defined(MBED_PUBLIC_RAM_SIZE)
#define MBED_PUBLIC_RAM_SIZE 0x200 #define MBED_PUBLIC_RAM_SIZE 0x200
#endif #endif
; The size of the stack section at the end of CM0+ SRAM ; The size of the stack section at the end of CM0+ SRAM
#if !defined(MBED_BOOT_STACK_SIZE) #if !defined(MBED_BOOT_STACK_SIZE)
#define MBED_BOOT_STACK_SIZE 0x400 #define MBED_BOOT_STACK_SIZE 0x400
#endif #endif
#define STACK_SIZE MBED_BOOT_STACK_SIZE #define STACK_SIZE MBED_BOOT_STACK_SIZE
#if !defined(MBED_PUBLIC_RAM_START) #if !defined(MBED_PUBLIC_RAM_START)
#define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE) #define MBED_PUBLIC_RAM_START (MBED_RAM_START + MBED_RAM_SIZE - STACK_SIZE - MBED_PUBLIC_RAM_SIZE)
#endif #endif
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM0+ core. ; The following defines control RAM and flash memory allocation for the CM0+ core.
; You can change the memory allocation by editing the RAM and Flash defines. ; You can change the memory allocation by editing the RAM and Flash defines.
; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use. ; Note that 2 KB of RAM (at the end of the SRAM) are reserved for system use.
; Using this memory region for other purposes will lead to unexpected behavior. ; Using this memory region for other purposes will lead to unexpected behavior.
; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat', ; Your changes must be aligned with the corresponding defines for the CM4 core in 'xx_cm4_dual.scat',
; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'. ; where 'xx' is the device group; for example, 'cy8c6xx7_cm4_dual.scat'.
; RAM ; RAM
#define RAM_START MBED_RAM_START #define RAM_START MBED_RAM_START
#define RAM_SIZE MBED_RAM_SIZE #define RAM_SIZE MBED_RAM_SIZE
; Public RAM ; Public RAM
#define PUBLIC_RAM_START MBED_PUBLIC_RAM_START #define PUBLIC_RAM_START MBED_PUBLIC_RAM_START
#define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE #define PUBLIC_RAM_SIZE MBED_PUBLIC_RAM_SIZE
; Flash ; Flash
#define FLASH_START MBED_APP_START #define FLASH_START MBED_APP_START
#define FLASH_SIZE MBED_APP_SIZE #define FLASH_SIZE MBED_APP_SIZE
; The following defines describe a 32K flash region used for EEPROM emulation. ; The following defines describe a 32K flash region used for EEPROM emulation.
; This region can also be used as the general purpose flash. ; This region can also be used as the general purpose flash.
; You can assign sections to this memory region for only one of the cores. ; You can assign sections to this memory region for only one of the cores.
; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region. ; Note some middleware (e.g. BLE, Emulated EEPROM) can place their data into this memory region.
; Therefore, repurposing this memory region will prevent such middleware from operation. ; Therefore, repurposing this memory region will prevent such middleware from operation.
#define EM_EEPROM_START 0x14000000 #define EM_EEPROM_START 0x14000000
#define EM_EEPROM_SIZE 0x8000 #define EM_EEPROM_SIZE 0x8000
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; Supervisory flash: User data ; Supervisory flash: User data
#define SFLASH_USER_DATA_START 0x16000800 #define SFLASH_USER_DATA_START 0x16000800
#define SFLASH_USER_DATA_SIZE 0x00000800 #define SFLASH_USER_DATA_SIZE 0x00000800
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
#define SFLASH_NAR_START 0x16001A00 #define SFLASH_NAR_START 0x16001A00
#define SFLASH_NAR_SIZE 0x00000200 #define SFLASH_NAR_SIZE 0x00000200
; Supervisory flash: Public Key ; Supervisory flash: Public Key
#define SFLASH_PUBLIC_KEY_START 0x16005A00 #define SFLASH_PUBLIC_KEY_START 0x16005A00
#define SFLASH_PUBLIC_KEY_SIZE 0x00000C00 #define SFLASH_PUBLIC_KEY_SIZE 0x00000C00
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
#define SFLASH_TOC_2_START 0x16007C00 #define SFLASH_TOC_2_START 0x16007C00
#define SFLASH_TOC_2_SIZE 0x00000200 #define SFLASH_TOC_2_SIZE 0x00000200
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
#define SFLASH_RTOC_2_START 0x16007E00 #define SFLASH_RTOC_2_START 0x16007E00
#define SFLASH_RTOC_2_SIZE 0x00000200 #define SFLASH_RTOC_2_SIZE 0x00000200
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; eFuse ; eFuse
#define EFUSE_START 0x90700000 #define EFUSE_START 0x90700000
#define EFUSE_SIZE 0x100000 #define EFUSE_SIZE 0x100000
; Cortex-M0+ application flash area ; Cortex-M0+ application flash area
LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000) LR_IROM1 FLASH_START (FLASH_SIZE - 0x8000)
{ {
.cy_app_header +0 .cy_app_header +0
{ {
* (.cy_app_header) * (.cy_app_header)
} }
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
RW_IRAM2 PUBLIC_RAM_START UNINIT RW_IRAM2 PUBLIC_RAM_START UNINIT
{ {
* (.cy_sharedmem) * (.cy_sharedmem)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2) ARM_LIB_HEAP +0 EMPTY RAM_START+RAM_SIZE-STACK_SIZE-ImageLimit(RW_IRAM2)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE ARM_LIB_STACK RAM_START+RAM_SIZE EMPTY -STACK_SIZE
{ {
} }
} }
; Emulated EEPROM Flash area ; Emulated EEPROM Flash area
LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE LR_EM_EEPROM EM_EEPROM_START EM_EEPROM_SIZE
{ {
.cy_em_eeprom +0 .cy_em_eeprom +0
{ {
* (.cy_em_eeprom) * (.cy_em_eeprom)
} }
} }
; Supervisory flash: User data ; Supervisory flash: User data
LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE LR_SFLASH_USER_DATA SFLASH_USER_DATA_START SFLASH_USER_DATA_SIZE
{ {
.cy_sflash_user_data +0 .cy_sflash_user_data +0
{ {
* (.cy_sflash_user_data) * (.cy_sflash_user_data)
} }
} }
; Supervisory flash: Normal Access Restrictions (NAR) ; Supervisory flash: Normal Access Restrictions (NAR)
LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE LR_SFLASH_NAR SFLASH_NAR_START SFLASH_NAR_SIZE
{ {
.cy_sflash_nar +0 .cy_sflash_nar +0
{ {
* (.cy_sflash_nar) * (.cy_sflash_nar)
} }
} }
; Supervisory flash: Public Key ; Supervisory flash: Public Key
LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE LR_SFLASH_PUBLIC_KEY SFLASH_PUBLIC_KEY_START SFLASH_PUBLIC_KEY_SIZE
{ {
.cy_sflash_public_key +0 .cy_sflash_public_key +0
{ {
* (.cy_sflash_public_key) * (.cy_sflash_public_key)
} }
} }
; Supervisory flash: Table of Content # 2 ; Supervisory flash: Table of Content # 2
LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE LR_SFLASH_TOC_2 SFLASH_TOC_2_START SFLASH_TOC_2_SIZE
{ {
.cy_toc_part2 +0 .cy_toc_part2 +0
{ {
* (.cy_toc_part2) * (.cy_toc_part2)
} }
} }
; Supervisory flash: Table of Content # 2 Copy ; Supervisory flash: Table of Content # 2 Copy
LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE LR_SFLASH_RTOC_2 SFLASH_RTOC_2_START SFLASH_RTOC_2_SIZE
{ {
.cy_rtoc_part2 +0 .cy_rtoc_part2 +0
{ {
* (.cy_rtoc_part2) * (.cy_rtoc_part2)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
; eFuse ; eFuse
LR_EFUSE EFUSE_START EFUSE_SIZE LR_EFUSE EFUSE_START EFUSE_SIZE
{ {
.cy_efuse +0 .cy_efuse +0
{ {
* (.cy_efuse) * (.cy_efuse)
} }
} }
; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage. ; The section is used for additional metadata (silicon revision, Silicon/JTAG ID, etc.) storage.
CYMETA 0x90500000 CYMETA 0x90500000
{ {
.cymeta +0 { * (.cymeta) } .cymeta +0 { * (.cymeta) }
} }
/* The following symbols used by the cymcuelftool. */ /* The following symbols used by the cymcuelftool. */
/* Flash */ /* Flash */
#define __cy_memory_0_start 0x10000000 #define __cy_memory_0_start 0x10000000
#define __cy_memory_0_length 0x00100000 #define __cy_memory_0_length 0x00100000
#define __cy_memory_0_row_size 0x200 #define __cy_memory_0_row_size 0x200
/* Emulated EEPROM Flash area */ /* Emulated EEPROM Flash area */
#define __cy_memory_1_start 0x14000000 #define __cy_memory_1_start 0x14000000
#define __cy_memory_1_length 0x8000 #define __cy_memory_1_length 0x8000
#define __cy_memory_1_row_size 0x200 #define __cy_memory_1_row_size 0x200
/* Supervisory Flash */ /* Supervisory Flash */
#define __cy_memory_2_start 0x16000000 #define __cy_memory_2_start 0x16000000
#define __cy_memory_2_length 0x8000 #define __cy_memory_2_length 0x8000
#define __cy_memory_2_row_size 0x200 #define __cy_memory_2_row_size 0x200
/* XIP */ /* XIP */
#define __cy_memory_3_start 0x18000000 #define __cy_memory_3_start 0x18000000
#define __cy_memory_3_length 0x08000000 #define __cy_memory_3_length 0x08000000
#define __cy_memory_3_row_size 0x200 #define __cy_memory_3_row_size 0x200
/* eFuse */ /* eFuse */
#define __cy_memory_4_start 0x90700000 #define __cy_memory_4_start 0x90700000
#define __cy_memory_4_length 0x100000 #define __cy_memory_4_length 0x100000
#define __cy_memory_4_row_size 1 #define __cy_memory_4_row_size 1
/* [] END OF FILE */ /* [] END OF FILE */
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -198,7 +198,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -198,7 +198,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED ...@@ -142,7 +142,7 @@ define region IROM8_region = mem:[from __ICFEDIT_region_IROM8_start__ to __ICFED
define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__]; define region EROM1_region = mem:[from __ICFEDIT_region_EROM1_start__ to __ICFEDIT_region_EROM1_end__];
define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__]; define region IRAM1_region = mem:[from __ICFEDIT_region_IRAM1_start__ to __ICFEDIT_region_IRAM1_end__];
/* Public RAM /* Public RAM
* This is an unprotected public RAM region, with the placed .cy_sharedmem section. * This is an unprotected public RAM region, with the placed .cy_sharedmem section.
* This region is used to place objects that require full access from both cores. * This region is used to place objects that require full access from both cores.
* Uncomment the following lines, define region size, and uncomment the placement of * Uncomment the following lines, define region size, and uncomment the placement of
...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram}; ...@@ -200,7 +200,7 @@ place at start of IRAM1_region { readwrite section .intvec_ram};
place in IRAM1_region { readwrite }; place in IRAM1_region { readwrite };
place at end of IRAM1_region { block HSTACK }; place at end of IRAM1_region { block HSTACK };
/* Public RAM /* Public RAM
*To use unprotected public RAM, uncomment the following .cy_sharedmem section placement. *To use unprotected public RAM, uncomment the following .cy_sharedmem section placement.
*/ */
/* /*
......
#! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4 #! armclang -E --target=arm-arm-none-eabi -x c -mcpu=cortex-m4
; The first line specifies a preprocessor command that the linker invokes ; The first line specifies a preprocessor command that the linker invokes
; to pass a scatter file through a C preprocessor. ; to pass a scatter file through a C preprocessor.
;******************************************************************************* ;*******************************************************************************
;* \file cyb06xx5_cm4.sct ;* \file cyb06xx5_cm4.sct
;* \version 2.91 ;* \version 2.91
;* ;*
;* Linker file for the ARMCC. ;* Linker file for the ARMCC.
;* ;*
;* The main purpose of the linker script is to describe how the sections in the ;* The main purpose of the linker script is to describe how the sections in the
;* input files should be mapped into the output file, and to control the memory ;* input files should be mapped into the output file, and to control the memory
;* layout of the output file. ;* layout of the output file.
;* ;*
;* \note The entry point location is fixed and starts at 0x10020000. The valid ;* \note The entry point location is fixed and starts at 0x10020000. The valid
;* application image should be placed there. ;* application image should be placed there.
;* ;*
;* \note The linker files included with the PDL template projects must be ;* \note The linker files included with the PDL template projects must be
;* generic and handle all common use cases. Your project may not use every ;* generic and handle all common use cases. Your project may not use every
;* section defined in the linker files. In that case you may see the warnings ;* section defined in the linker files. In that case you may see the warnings
;* during the build process: L6314W (no section matches pattern) and/or L6329W ;* during the build process: L6314W (no section matches pattern) and/or L6329W
;* (pattern only matches removed unused sections). In your project, you can ;* (pattern only matches removed unused sections). In your project, you can
;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to ;* suppress the warning by passing the "--diag_suppress=L6314W,L6329W" option to
;* the linker, simply comment out or remove the relevant code in the linker ;* the linker, simply comment out or remove the relevant code in the linker
;* file. ;* file.
;* ;*
;******************************************************************************* ;*******************************************************************************
;* \copyright ;* \copyright
;* Copyright 2016-2021 Cypress Semiconductor Corporation ;* Copyright 2016-2021 Cypress Semiconductor Corporation
;* SPDX-License-Identifier: Apache-2.0 ;* SPDX-License-Identifier: Apache-2.0
;* ;*
;* Licensed under the Apache License, Version 2.0 (the "License"); ;* Licensed under the Apache License, Version 2.0 (the "License");
;* you may not use this file except in compliance with the License. ;* you may not use this file except in compliance with the License.
;* You may obtain a copy of the License at ;* You may obtain a copy of the License at
;* ;*
;* http://www.apache.org/licenses/LICENSE-2.0 ;* http://www.apache.org/licenses/LICENSE-2.0
;* ;*
;* Unless required by applicable law or agreed to in writing, software ;* Unless required by applicable law or agreed to in writing, software
;* distributed under the License is distributed on an "AS IS" BASIS, ;* distributed under the License is distributed on an "AS IS" BASIS,
;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ;* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
;* See the License for the specific language governing permissions and ;* See the License for the specific language governing permissions and
;* limitations under the License. ;* limitations under the License.
;******************************************************************************/ ;******************************************************************************/
; The defines below describe the location and size of blocks of memory in the target. ; The defines below describe the location and size of blocks of memory in the target.
; Use these defines to specify the memory regions available for allocation. ; Use these defines to specify the memory regions available for allocation.
; The following defines control RAM and flash memory allocation for the CM4 core. ; The following defines control RAM and flash memory allocation for the CM4 core.
; RAM ; RAM
#define RAM_START 0x08001800 #define RAM_START 0x08001800
#define RAM_SIZE 0x0001E800 #define RAM_SIZE 0x0001E800
; Flash ; Flash
#define FLASH_START 0x10020000 #define FLASH_START 0x10020000
#define FLASH_SIZE 0x00020000 #define FLASH_SIZE 0x00020000
; The size of the stack section at the end of CM4 SRAM ; The size of the stack section at the end of CM4 SRAM
#define STACK_SIZE 0x00001000 #define STACK_SIZE 0x00001000
; The size of the MCU boot header area at the start of FLASH ; The size of the MCU boot header area at the start of FLASH
#define BOOT_HEADER_SIZE 0x00000400 #define BOOT_HEADER_SIZE 0x00000400
; The following defines describe device specific memory regions and must not be changed. ; The following defines describe device specific memory regions and must not be changed.
; External memory ; External memory
#define XIP_START 0x18000000 #define XIP_START 0x18000000
#define XIP_SIZE 0x08000000 #define XIP_SIZE 0x08000000
; Cortex-M4 application flash area ; Cortex-M4 application flash area
LR_IROM1 (FLASH_START + BOOT_HEADER_SIZE) (FLASH_SIZE - BOOT_HEADER_SIZE) LR_IROM1 (FLASH_START + BOOT_HEADER_SIZE) (FLASH_SIZE - BOOT_HEADER_SIZE)
{ {
ER_FLASH_VECTORS +0 ER_FLASH_VECTORS +0
{ {
* (RESET, +FIRST) * (RESET, +FIRST)
} }
ER_FLASH_CODE +0 FIXED ER_FLASH_CODE +0 FIXED
{ {
* (InRoot$$Sections) * (InRoot$$Sections)
* (+RO) * (+RO)
} }
ER_RAM_VECTORS RAM_START UNINIT ER_RAM_VECTORS RAM_START UNINIT
{ {
* (RESET_RAM, +FIRST) * (RESET_RAM, +FIRST)
} }
RW_RAM_DATA +0 RW_RAM_DATA +0
{ {
* (.cy_ramfunc) * (.cy_ramfunc)
* (+RW, +ZI) * (+RW, +ZI)
} }
; Place variables in the section that should not be initialized during the ; Place variables in the section that should not be initialized during the
; device startup. ; device startup.
RW_IRAM1 +0 UNINIT RW_IRAM1 +0 UNINIT
{ {
* (.noinit) * (.noinit)
} }
; Application heap area (HEAP) ; Application heap area (HEAP)
ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE) ARM_LIB_HEAP +0 EMPTY ((RAM_START+RAM_SIZE)-AlignExpr(ImageLimit(RW_IRAM1), 8)-STACK_SIZE)
{ {
} }
; Stack region growing down ; Stack region growing down
ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE ARM_LIB_STACK (RAM_START+RAM_SIZE) EMPTY -STACK_SIZE
{ {
} }
; Used for the digital signature of the secure application and the ; Used for the digital signature of the secure application and the
; Bootloader SDK application. The size of the section depends on the required ; Bootloader SDK application. The size of the section depends on the required
; data size. ; data size.
.cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256 .cy_app_signature (FLASH_START + FLASH_SIZE - 256) 256
{ {
* (.cy_app_signature) * (.cy_app_signature)
} }
} }
; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details. ; Places the code in the Execute in Place (XIP) section. See the smif driver documentation for details.
LR_EROM XIP_START XIP_SIZE LR_EROM XIP_START XIP_SIZE
{ {
cy_xip +0 cy_xip +0
{ {
* (.cy_xip) * (.cy_xip)
} }
} }
/* [] END OF FILE */ /* [] END OF FILE */
...@@ -28,4 +28,4 @@ place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; ...@@ -28,4 +28,4 @@ place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place at address mem:__Reset_Handler_text_start__ { readonly section .Reset_Handler_text }; place at address mem:__Reset_Handler_text_start__ { readonly section .Reset_Handler_text };
place in ROM_region { readonly }; place in ROM_region { readonly };
place in RAM_region { readwrite, place in RAM_region { readwrite,
block CSTACK, block HEAP }; block CSTACK, block HEAP };
\ No newline at end of file
...@@ -90,7 +90,7 @@ SECTIONS ...@@ -90,7 +90,7 @@ SECTIONS
_edata = . ; _edata = . ;
} >RAM } >RAM
.stack : .stack :
{ {
. = ALIGN(4); . = ALIGN(4);
_sstack = .; _sstack = .;
...@@ -113,7 +113,7 @@ SECTIONS ...@@ -113,7 +113,7 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
/* This is used by the startup in order to initialize the .bss secion */ /* This is used by the startup in order to initialize the .bss secion */
_ebss = . ; _ebss = . ;
*(.bss.init) *(.bss.init)
} > RAM } > RAM
__bss_end = .; __bss_end = .;
......
...@@ -25,4 +25,4 @@ do not initialize { section .noinit }; ...@@ -25,4 +25,4 @@ do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly }; place in ROM_region { readonly };
place in RAM_region { readwrite, last block CSTACK}; place in RAM_region { readwrite, last block CSTACK};
\ No newline at end of file
此差异已折叠。
__STACKSIZE__ = 16384; __STACKSIZE__ = 16384;
\ No newline at end of file
此差异已折叠。
__STACKSIZE__ = 16384; __STACKSIZE__ = 16384;
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -25,4 +25,4 @@ do not initialize { section .noinit }; ...@@ -25,4 +25,4 @@ do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly }; place in ROM_region { readonly };
place in RAM_region { readwrite, last block CSTACK}; place in RAM_region { readwrite, last block CSTACK};
\ No newline at end of file
...@@ -25,4 +25,4 @@ do not initialize { section .noinit }; ...@@ -25,4 +25,4 @@ do not initialize { section .noinit };
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec }; place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
place in ROM_region { readonly }; place in ROM_region { readonly };
place in RAM_region { readwrite, last block CSTACK}; place in RAM_region { readwrite, last block CSTACK};
\ No newline at end of file
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册