From 52997e197541cf12908b4f341fbe0a0601bbc9f7 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Thu, 31 Aug 2023 08:58:42 +0100 Subject: [PATCH] [nrf noup] boot: zephyr: Add ifdef protection for RAM locking This adds an ifdef check so that RAM is only protected if PCD is enabled, whereas previously this would cause a build failure. Signed-off-by: Jamie McCrae (cherry picked from commit 4ec411c10a594ff214ffadcce05a835d8398652a) --- boot/zephyr/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c index cca749a45..bb48c21c5 100644 --- a/boot/zephyr/main.c +++ b/boot/zephyr/main.c @@ -726,7 +726,7 @@ int main(void) ; } -#if defined(CONFIG_SOC_NRF5340_CPUAPP) && defined(PM_CPUNET_B0N_ADDRESS) +#if defined(CONFIG_SOC_NRF5340_CPUAPP) && defined(PM_CPUNET_B0N_ADDRESS) && defined(CONFIG_PCD_APP) pcd_lock_ram(); #endif #endif /* USE_PARTITION_MANAGER && CONFIG_FPROTECT */