From a0491bfb9af6a63f5215559bd55a4bf8f1cc54e4 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 20 Oct 2023 03:44:43 -0700 Subject: [PATCH] nxp_ucans32k146:Provide board_app_shared_read --- boards/nxp/ucans32k146/src/boot.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/boards/nxp/ucans32k146/src/boot.c b/boards/nxp/ucans32k146/src/boot.c index e0928cf0a8..6548d43b9b 100644 --- a/boards/nxp/ucans32k146/src/boot.c +++ b/boards/nxp/ucans32k146/src/boot.c @@ -45,6 +45,7 @@ #include #include "board_config.h" +#include /**************************************************************************** * Public Functions @@ -61,15 +62,30 @@ * ****************************************************************************/ +static bootloader_app_shared_t can0_config; + +int weak_function board_app_shared_read(bootloader_app_shared_t *shared, eRole_t role) +{ + int rv = -EBADR; + + if (can0_config.signature != 0) { + *shared = can0_config; + rv = OK; + } + + return rv; +} + void s32k1xx_board_initialize(void) { + can0_config.signature = 0; + bootloader_app_shared_read(&can0_config, BootLoader); #ifdef CONFIG_ARCH_LEDS /* Configure on-board LEDs if LED support has been selected. */ board_autoled_initialize(); #endif ucans32k_timer_initialize(); - } /****************************************************************************