123 lines
4.8 KiB
Plaintext
123 lines
4.8 KiB
Plaintext
/*---------------------------------------------------------------------------- */
|
|
/* Copyright(C) NXP N.V. 2016, 2017, 2018 */
|
|
/* */
|
|
/* All rights are reserved. Reproduction in whole or in part is prohibited */
|
|
/* without the prior written consent of the copy-right owner. */
|
|
/* This source code and any compilation or derivative thereof is the sole */
|
|
/* property of NXP N.V. and is provided pursuant to a Software License */
|
|
/* Agreement. This code is the proprietary information of NXP N.V. and */
|
|
/* is confidential in nature. Its use and dissemination by any party other */
|
|
/* than NXP N.V. is strictly limited by the confidential information */
|
|
/* provisions of the agreement referenced above. */
|
|
/*---------------------------------------------------------------------------- */
|
|
/* Security Classification: Company Confidential */
|
|
/*---------------------------------------------------------------------------- */
|
|
|
|
/* Default configuration from DB */
|
|
#include <configuration.ld>
|
|
|
|
/* Customer overrides e.g. PDC */
|
|
#include <configurationOverwrites.h>
|
|
|
|
#include <config_defines_segTab.ld>
|
|
|
|
#include <elfFormat.ld>
|
|
#include <gdb_defines.ld>
|
|
#include <metadataTLV.ld>
|
|
#include <hardware.ld>
|
|
|
|
|
|
/*****************************************************************************/
|
|
/* OEF / PDC */
|
|
/*****************************************************************************/
|
|
|
|
/* Overrides/Update OEF/PDC settings */
|
|
#ifdef __OEF_wAdditionalFPP
|
|
__PHFW_NV_ADD_FPP_PAGES = __OEF_wAdditionalFPP;
|
|
#endif
|
|
|
|
/* Recalculate CARD_B IAW pages with possible OEF/PDC overrides */
|
|
__PHFW_NV_B_IAW_PAGES = __PHFW_NV_B_IAW_PAGES - __PHFW_NV_ADD_FPP_PAGES;
|
|
|
|
/*****************************************************************************/
|
|
/* NV related settings */
|
|
/*****************************************************************************/
|
|
/* taken from P7x_configuration.ld */
|
|
|
|
/* Calculate according to the PDC settings */
|
|
__PHFW_NV_TOTAL_REQUESTED_FLASH_SIZE_PAGES =
|
|
(
|
|
/* CARD_A */
|
|
__PHFW_NV_A_IAW_PAGES +
|
|
__PHFW_NV_A_OAW_PAGES +
|
|
/* CARD_B */
|
|
__PHFW_NV_B_IAW_PAGES +
|
|
__PHFW_NV_B_OAW_PAGES +
|
|
/* MISC */
|
|
__PHFW_NV_ADD_FPP_PAGES);
|
|
|
|
|
|
/* Symbols used by the Flash configuration for flashdownloader */
|
|
__PHFW_TOTAL_REQUESTED_FLASH_FOR_FLASHDOWNLOADER_SIZE_BYTE =
|
|
__PHFW_NV_TOTAL_REQUESTED_FLASH_SIZE_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
|
|
/* Sanity check */
|
|
ASSERT(__PHFW_TOTAL_REQUESTED_FLASH_FOR_FLASHDOWNLOADER_SIZE_BYTE >
|
|
(__PHFW_NV_A_IAW_PAGES + __PHFW_NV_A_OAW_PAGES + /* CARD_A */
|
|
__PHFW_NV_B_IAW_PAGES + __PHFW_NV_B_OAW_PAGES + /* CARD_B */
|
|
__PHFW_NV_ADD_FPP_PAGES /* MISC */),
|
|
"ASSERT: TotalRequestedFlashSize is smaller than sum of pages.")
|
|
|
|
__PHFW_CARD_B_IAW_FOR_FLASHDOWNLOADER_SIZE_BYTE = __PHFW_NV_B_IAW_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
|
|
__PHFW_CARD_B_ADD_FPP_FOR_FLASHDOWNLOADER_SIZE_BYTE = __PHFW_NV_ADD_FPP_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
|
|
|
|
/* Flash configuration - these settings will depend on the PDC settings and */
|
|
/* are only valid for a particular flash background */
|
|
|
|
__PHFW_NV_PHYS_SIZE_IN_PAGES = /* CARD_A */
|
|
__PHFW_NV_FW_REF_A_PAGES +
|
|
__PHFW_NV_A_IAW_PAGES +
|
|
__PHFW_NV_A_OAW_PAGES +
|
|
/* CARD_B */
|
|
__PHFW_NV_B_IAW_PAGES +
|
|
__PHFW_NV_B_OAW_PAGES +
|
|
/* MISC */
|
|
__PHFW_NV_INIT_FPP_PAGES +
|
|
__PHFW_NV_ADD_FPP_PAGES;
|
|
|
|
|
|
__PHFW_NV_REF_A = __PHFW_NV_FW_REF_A_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
__PHFW_NV_OAW_REF_A = __PHFW_NV_REF_A;
|
|
|
|
__PHFW_NV_IAW_REF_B = __PHFW_NV_PHYS_SIZE_IN_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
__PHFW_NV_OAW_REF_B = __PHFW_NV_PHYS_SIZE_IN_PAGES * __MMU_FLASH_GRANULARITY_BYTES;
|
|
|
|
|
|
|
|
/*****************************************************************************/
|
|
/* ROM related settings */
|
|
/*****************************************************************************/
|
|
/* none */
|
|
|
|
/*****************************************************************************/
|
|
/* RAM related settings */
|
|
/*****************************************************************************/
|
|
__PHFW_CRD_A_RAM_SIZE_BYTE = (__PHFW_RAM_CRD_A_FW * __MMU_RAM_GRANULARITY_BYTES);
|
|
__PHFW_CRD_B_RAM_SIZE_BYTE = __PHFW_TOTAL_RAM_SIZE_BYTE - __PHFW_CRD_A_RAM_SIZE_BYTE;
|
|
|
|
/*****************************************************************************/
|
|
/* MISC */
|
|
/*****************************************************************************/
|
|
/* none */
|
|
/*------------------------------------------------------------------- */
|
|
|
|
/* NOTE: need to be included after PDC/OEF updates */
|
|
#include <memories_vma.ld>
|
|
#include <memories_lma.ld>
|
|
|
|
/* Main entry point to default address */
|
|
__entry_point = 0x0;
|
|
ENTRY (__entry_point)
|