|
#! armcc -E
|
|
; The first line specifies a preprocessor command that the linker invokes
|
|
; to pass a scatter file through a C preprocessor.
|
|
|
|
;********************************************************************************
|
|
;* File Name: Cm0RealView.scat
|
|
;* Version 5.0
|
|
;*
|
|
;* Description:
|
|
;* This Linker Descriptor file describes the memory layout of the PSOC4 device
|
|
;* family. The memory layout of the final binary and hex images as well as
|
|
;* the placement in the PSOC4 memory is described.
|
|
;*
|
|
;*
|
|
;* Note:
|
|
;*
|
|
;* romvectors: Cypress default Interrupt service routine vector table.
|
|
;*
|
|
;* This is the ISR vector table at bootup. Used only for the reset vector.
|
|
;*
|
|
;*
|
|
;* ramvectors: Cypress ram interrupt service routine vector table.
|
|
;*
|
|
;* This is the ISR vector table used by the application.
|
|
;*
|
|
;*
|
|
;********************************************************************************
|
|
;* Copyright 2010-2015, Cypress Semiconductor Corporation. All rights reserved.
|
|
;* You may use this file only in accordance with the license, terms, conditions,
|
|
;* disclaimers, and limitations in the end user license agreement accompanying
|
|
;* the software package with which this file was provided.
|
|
;********************************************************************************/
|
|
#include "cyfitter.h"
|
|
|
|
#define CY_FLASH_SIZE 131072
|
|
#define CY_APPL_ORIGIN 0
|
|
#define CY_FLASH_ROW_SIZE 128
|
|
#define CY_METADATA_SIZE 64
|
|
|
|
|
|
; Define application base address
|
|
#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLE || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)
|
|
|
|
#if CY_APPL_ORIGIN
|
|
#define APPL1_START CY_APPL_ORIGIN
|
|
#else
|
|
#define APPL1_START AlignExpr(ImageLimit(CYBOOTLOADER), CY_FLASH_ROW_SIZE)
|
|
#endif
|
|
|
|
#define APPL_START (APPL1_START + AlignExpr(((CY_FLASH_SIZE - APPL1_START - 2 * CY_FLASH_ROW_SIZE) / 2 ) * (1 - 1), CY_FLASH_ROW_SIZE))
|
|
|
|
#else
|
|
|
|
#define APPL_START 0
|
|
|
|
#endif
|
|
|
|
|
|
; Place Bootloader at the beginning of Flash
|
|
#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLE || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)
|
|
|
|
CYBOOTLOADER 0
|
|
{
|
|
.cybootloader +0
|
|
{
|
|
* (.cybootloader)
|
|
}
|
|
}
|
|
|
|
#if CY_APPL_ORIGIN
|
|
ScatterAssert(APPL_START >= LoadLimit(CYBOOTLOADER))
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
APPLICATION APPL_START (CY_FLASH_SIZE - APPL_START)
|
|
{
|
|
VECTORS +0
|
|
{
|
|
* (.romvectors)
|
|
}
|
|
|
|
RELOCATION +0
|
|
{
|
|
* (.psocinit)
|
|
}
|
|
|
|
CODE ((ImageLimit(RELOCATION) < 0x100) ? 0x100 : ImageLimit(RELOCATION)) FIXED
|
|
{
|
|
* (+RO)
|
|
}
|
|
|
|
ISRVECTORS (0x20000000) UNINIT
|
|
{
|
|
* (.ramvectors, +FIRST)
|
|
}
|
|
|
|
#if (CYDEV_PROJ_TYPE != CYDEV_PROJ_TYPE_STANDARD)
|
|
BTLDR_RUN +0 UNINIT
|
|
{
|
|
* (.bootloaderruntype)
|
|
}
|
|
#endif
|
|
|
|
NOINIT_DATA +0 UNINIT
|
|
{
|
|
* (.noinit)
|
|
}
|
|
|
|
DATA +0
|
|
{
|
|
.ANY (+RW, +ZI)
|
|
}
|
|
|
|
ARM_LIB_HEAP (0x20000000 + 16384 - 0x80 - 0x0800) EMPTY 0x80
|
|
{
|
|
}
|
|
|
|
ARM_LIB_STACK (0x20000000 + 16384) EMPTY -0x0800
|
|
{
|
|
}
|
|
}
|
|
|
|
|
|
#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_BOOTLOADER || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_MULTIAPPBOOTLOADER || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LAUNCHER)
|
|
|
|
CYLOADERMETA (CY_FLASH_SIZE - CY_METADATA_SIZE)
|
|
{
|
|
.cyloadermeta +0 { * (.cyloadermeta) }
|
|
}
|
|
|
|
#endif
|
|
|
|
#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLE || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)
|
|
|
|
CYLOADABLEMETA (CY_FLASH_SIZE - CY_FLASH_ROW_SIZE * (1 - 1) - CY_METADATA_SIZE)
|
|
{
|
|
.cyloadablemeta +0 { * (.cyloadablemeta) }
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
CYFLASHPROTECT 0x90400000
|
|
{
|
|
.cyflashprotect +0 { * (.cyflashprotect) }
|
|
}
|
|
|
|
CYMETA 0x90500000
|
|
{
|
|
.cymeta +0 { * (.cymeta) }
|
|
}
|
|
|
|
CYCHIPPROTECT 0x90600000
|
|
{
|
|
.cychipprotect +0 { * (.cychipprotect) }
|
|
}
|
|
|
|
#if (CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLE || \
|
|
CYDEV_PROJ_TYPE == CYDEV_PROJ_TYPE_LOADABLEANDBOOTLOADER)
|
|
|
|
CYLOADERMETA +0
|
|
{
|
|
.cyloadermeta +0 { * (.cyloadermeta) }
|
|
}
|
|
|
|
#endif
|