From b3ccc4c94c2a8ecdeb0b4ffc79cbcd2b224bd8b5 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Fri, 26 Jul 2024 10:14:49 +0200 Subject: [PATCH] boards/arm/nrf91/common/nrf91_boot_image.c: print message if no image found if there is no valid boot image found we print error message and panic --- boards/arm/nrf91/common/src/nrf91_boot_image.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/boards/arm/nrf91/common/src/nrf91_boot_image.c b/boards/arm/nrf91/common/src/nrf91_boot_image.c index a717430b2c..203332edaf 100644 --- a/boards/arm/nrf91/common/src/nrf91_boot_image.c +++ b/boards/arm/nrf91/common/src/nrf91_boot_image.c @@ -203,6 +203,16 @@ int board_boot_image(const char *path, uint32_t hdr_size) ARM_ISB(); + /* Check if reset is valid */ + + if (vt.reset == 0xffffffff) + { + syslog(LOG_ERR, "Not found image to boot!"); + PANIC(); + } + + syslog(LOG_INFO, "Jump to 0x%" PRIx32 "\n", vt.reset); + /* Jump to non-secure entry point */ nsfunc *ns_reset = (nsfunc *)(vt.reset);