From d04e3fc134c2a2a58c23749f4bd1c25cfcb6e66f Mon Sep 17 00:00:00 2001 From: Benjamin Walsh Date: Thu, 22 Oct 2015 18:31:51 -0400 Subject: [PATCH] arm/frdm_k64f: only leave space for security in XIP images This board needs 16 bytes to be written with a specific value when the target boots. This is only necessary when running a XIP image which exists around those 16 bytes. Change-Id: Ifd26b3842f09137765d9c7d1678476bfda8a563f Signed-off-by: Benjamin Walsh Signed-off-by: Vlad Lungu --- arch/arm/soc/fsl_frdm_k64f/linker.cmd | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/arm/soc/fsl_frdm_k64f/linker.cmd b/arch/arm/soc/fsl_frdm_k64f/linker.cmd index 6e8fae68c77..b37434afcb5 100644 --- a/arch/arm/soc/fsl_frdm_k64f/linker.cmd +++ b/arch/arm/soc/fsl_frdm_k64f/linker.cmd @@ -21,12 +21,21 @@ * This is the linker script for both standard images and XIP images. */ +#include + /* * K64F Flash configuration fields * These are 16 bytes, which must be loaded to address 0x400, and include * default protection and security settings. * They are loaded at reset to various Flash Memory module (FTFE) registers. */ -#define SKIP_TO_SECURITY_FRDM_K64F . = 0x400; + +/* + * No need to account for this when running a RAM-only image since that + * security feature resides in ROM. + */ +#if defined(CONFIG_XIP) + #define SKIP_TO_SECURITY_FRDM_K64F . = 0x400; +#endif #include